-
Notifications
You must be signed in to change notification settings - Fork 101
CMR-11030: Fix failure to launch Docker with Testcontainers #2351
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Script executed:
Repository: nasa/Common-Metadata-Repository
<shell_result>
Repository: nasa/Common-Metadata-Repository
Exit code: 2
stderr:
</shell_result>
Script executed:
Repository: nasa/Common-Metadata-Repository
<shell_result>
Repository: nasa/Common-Metadata-Repository
Exit code: 0
stdout:
</shell_result>
Script executed:
Repository: nasa/Common-Metadata-Repository
<shell_result>
Repository: nasa/Common-Metadata-Repository
Exit code: 0
stderr:
</shell_result>
Script executed:
Repository: nasa/Common-Metadata-Repository
<shell_result>
Repository: nasa/Common-Metadata-Repository
Exit code: 0
</shell_result>
Testcontainers 2.0.0 release notes breaking changes
<web_search_result>
Testcontainers Java 2.0.0 (released Oct 14, 2025) — breaking changes (summary):
Sources: GitHub release notes for testcontainers-java 2.0.0. [1] (github.com)
Citations:
</web_search_result>
Script executed:
Repository: nasa/Common-Metadata-Repository
<shell_result>
Repository: nasa/Common-Metadata-Repository
Exit code: 0
stdout:
</shell_result>
Testcontainers FixedHostPortGenericContainer constructor 2.0 changes
<web_search_result>
Short answer: In Testcontainers 2.0 the old no-arg / String-image constructors (including FixedHostPortGenericContainer(String)) are deprecated/removed — FixedHostPortGenericContainer remains deprecated (you should avoid fixed host ports) and container constructors now require a DockerImageName instance (e.g. new GenericContainer(DockerImageName.parse("image:tag"))). Also many container classes were moved to module-specific packages. See release notes and API docs for details. [1][2][3][4]
References
</web_search_result>
Major breaking API changes in Testcontainers 2.0.2 will cause compilation failures
The bump from 1.21.3 to 2.0.2 introduces breaking changes that will prevent the codebase from compiling:
FixedHostPortGenericContainer(String)constructor has been removed/deprecated in 2.0. The new API requiresDockerImageName.parse("image:tag").redis-utils-lib/src/cmr/redis_utils/embedded_redis_server.clj—(FixedHostPortGenericContainer. redis-image)message-queue-lib/src/cmr/message_queue/queue_server/embedded_sqs_server.clj—(FixedHostPortGenericContainer. elasticmq-image)elastic-utils-lib/src/cmr/elastic_utils/embedded_elastic_server.clj—(FixedHostPortGenericContainer. image)(2 instances)All constructor calls must be updated to use
DockerImageName.parse()before this version bump will work.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FixedHostPortGenericContainer is deprecated but is not removed. No change needed for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
💡 Result:
Yes — Testcontainers 2.0.2 provides a FixedHostPortGenericContainer(String dockerImageName) constructor, but the constructor is marked deprecated (use of fixed host ports is discouraged). [1][2]
Sources:
@TylerHeald1, you're absolutely right! I apologize for the confusion. The
FixedHostPortGenericContainer(String)constructor is indeed still available in Testcontainers 2.0.2, though it's marked as deprecated. The version bump from 1.21.3 to 2.0.2 should work without requiring any code changes to the constructor calls.Thank you for the clarification—the upgrade can proceed as-is! 👍