-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Deprecate withEnterpriseEdition due to version pinning #10613
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
32ee567
b762d88
cdbab6c
328e780
b0392e9
c41468d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,16 +34,17 @@ | |
| public class Neo4jContainer extends GenericContainer<Neo4jContainer> { | ||
|
|
||
| /** | ||
| * The image defaults to the official Neo4j image: <a href="https://hub.docker.com/_/neo4j/">Neo4j</a>. | ||
| * The default tag (version) to use. | ||
| * @deprecated this should not be used anywhere besides also deprecated method {@link #withEnterpriseEdition()} | ||
kiview marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| */ | ||
| private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("neo4j"); | ||
| private static final String ENTERPRISE_TAG_4_4 = "4.4-enterprise"; | ||
|
|
||
| /** | ||
| * The default tag (version) to use. | ||
| * The image defaults to the official Neo4j image: <a href="https://hub.docker.com/_/neo4j/">Neo4j</a>. | ||
| */ | ||
| private static final String DEFAULT_TAG = "4.4"; | ||
| private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("neo4j"); | ||
|
|
||
| private static final String ENTERPRISE_TAG = DEFAULT_TAG + "-enterprise"; | ||
| private static final String ENTERPRISE_SUFFIX = "-enterprise"; | ||
|
|
||
| /** | ||
| * Default port for the binary Bolt protocol. | ||
|
|
@@ -204,15 +205,40 @@ public String getHttpsUrl() { | |
| * needs either a commercial, education or evaluation license. | ||
| * | ||
| * @return This container. | ||
| * @deprecated This method will force the use of the old 4.4. (LTS) version to be used as the enterprise image, | ||
| * use {@link #withEnterpriseImage} to actively accept the license and use the enterprise version of | ||
| * the initial defined community version. | ||
| */ | ||
| public Neo4jContainer withEnterpriseEdition() { | ||
| if (!standardImage) { | ||
| throw new IllegalStateException( | ||
| String.format("Cannot use enterprise version with alternative image %s.", getDockerImageName()) | ||
| ); | ||
| } | ||
| setDockerImageName(DEFAULT_IMAGE_NAME.withTag(ENTERPRISE_TAG_4_4).asCanonicalNameString()); | ||
| LicenseAcceptance.assertLicenseAccepted(getDockerImageName()); | ||
|
|
||
| addEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes"); | ||
|
|
||
| return self(); | ||
| } | ||
|
|
||
| setDockerImageName(DEFAULT_IMAGE_NAME.withTag(ENTERPRISE_TAG).asCanonicalNameString()); | ||
| /** | ||
| * Configures the container to use the enterprise edition of the default docker image. | ||
| * <br><br> | ||
| * Please have a look at the <a href="https://neo4j.com/licensing/">Neo4j Licensing page</a>. While the Neo4j | ||
| * Community Edition can be used for free in your projects under the GPL v3 license, Neo4j Enterprise edition | ||
| * needs either a commercial, education or evaluation license. | ||
| * | ||
| * @return This container | ||
| **/ | ||
meistermeier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| public Neo4jContainer withEnterpriseImage() { | ||
| if (!standardImage) { | ||
| throw new IllegalStateException( | ||
| String.format("Cannot use enterprise version with alternative image %s.", getDockerImageName()) | ||
| ); | ||
| } | ||
| setDockerImageName(DockerImageName.parse(getDockerImageName() + ENTERPRISE_SUFFIX).asCanonicalNameString()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this will break existing users. Why not improve the exception's message?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From a technical, formal perspective I would say, that you are right.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a) how many users are on 4.4 still And expect the enterprise version of it when they actually want 5.26 or basically anything else, it's a bug
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to propose something else: How does that sound?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will play with this. Thanks for the feedback. |
||
| LicenseAcceptance.assertLicenseAccepted(getDockerImageName()); | ||
|
|
||
| addEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes"); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.