Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Oracle FREE support #7624

Closed
wants to merge 1 commit into from
Closed

New Oracle FREE support #7624

wants to merge 1 commit into from

Conversation

ecki
Copy link

@ecki ecki commented Oct 7, 2023

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 as a code owner October 7, 2023 17:32
Copy link
Member

@eddumelendez eddumelendez left a comment

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
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.

Copy link
Author

@ecki ecki Oct 9, 2023

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
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
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
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
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
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
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.

Copy link
Author

@ecki ecki Oct 9, 2023

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
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
Member

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

@ecki
Copy link
Author

ecki commented Oct 23, 2023

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
Copy link
Author

ecki commented Nov 21, 2023

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.

None yet

2 participants