Skip to content

New Oracle FREE support#7624

Closed
ecki wants to merge 1 commit into
testcontainers:mainfrom
ecki:main
Closed

New Oracle FREE support#7624
ecki wants to merge 1 commit into
testcontainers:mainfrom
ecki:main

Conversation

@ecki

@ecki ecki commented Oct 7, 2023

Copy link
Copy Markdown

Is this something you want in the existing module or in a new module? Any reason why its not supported yet? Want to add the new Oracle image as a compatibility in the existing OracleContainer instead? (besides the APEX port it seems to work).

@ecki ecki requested a review from a team October 7, 2023 17:32

@eddumelendez eddumelendez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, @ecki! Please add proper tests and docs.


public static final String NAME = "oracle";

private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("container-registry.oracle.com/database/free");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, take into account this image instead. It offers many improvements that are suitable for testing.

@ecki ecki Oct 9, 2023

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to stick to the official image, but maybe we can make the existing Oracle Ntainer accept all of them, instead? (And should in this case the module be renamed or a new one addd with all 3 images?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, the official image is heavy and it takes around 3 min to start. That's not the experience we want to provide. If you are willing to do that then you can opt-in by using

DockerImageName image = DockerImageName.parse("container-registry.oracle.com/database/free").asCompatibleSubstituteFor("gvenzl/oracle-free");
new OracleFreeContainer(image);

Comment on lines +68 to +74
/**
* @deprecated use {@link #OracleContainer(DockerImageName)} instead
*/
@Deprecated
public OracleFreeContainer() {
this(DEFAULT_IMAGE_NAME.withTag(DEFAULT_TAG));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it, please.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the most useful constructor and I am actually using it. Any idea why it is deprecated by the source class I copied? How am I supposed to get the default image?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testcontainers recommends to used fixed images. The main reason is because default constructors it will hide what version is using the library. Reading the test code should explain even against what version is being used. In this example, would be new OracleFreeContainer("gvenzl/oracle-free:23.3-slim-faststart")

Comment on lines +86 to +89
public OracleFreeContainer(Future<String> dockerImageName) {
super(dockerImageName);
preconfigure();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it, please.

preconfigure();
}

private void preconfigure() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a configure() method that can be overridden so you lines 83 and 88 can be deleted.

@ecki ecki Oct 9, 2023

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes maybe, I was sticking to the original source, should we fix/change the original class then as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as part of this PR. Another PR would be welcomed.

@eddumelendez eddumelendez added this to the next milestone Oct 9, 2023
@eddumelendez

Copy link
Copy Markdown
Member

Hi @ecki, I wonder if you are able to continue working on this PR? Hope everything is doing well.

@ecki

ecki commented Oct 23, 2023

Copy link
Copy Markdown
Author

Yes but I probably just close it, I am not sure why I made my own copy when in principle only the image name changes.

btw free starts really fast, it only needs 4mins for downloads, which is then (hopefully) cached.

@ecki ecki closed this Oct 23, 2023
@eddumelendez eddumelendez removed this from the next milestone Oct 23, 2023
@ecki

ecki commented Nov 21, 2023

Copy link
Copy Markdown
Author

Implement by #7749 (for inofficial image)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants