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

fix(compose): container initialisation #2844

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

stevenh
Copy link
Collaborator

@stevenh stevenh commented Oct 21, 2024

Fix compose to fully initialise the containers it returns. This ensures that running things like checks for running behave as expected.

Extracts the functionality to connect to reaper into a helper method so its consistent across uses.

Fix data race in daemonHost function converting it to a method to make use of encapsulation.

Export the functionality to create a container from a ContainerList response via provider.ContainerFromType.

Enforce no bare returns instead of no named returns as that was the original intention.

Fixes #2667

Copy link

netlify bot commented Oct 21, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit d5a1383
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/671f801db9c416000839a29e
😎 Deploy Preview https://deploy-preview-2844--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@stevenh stevenh force-pushed the fix/compose-containers branch from c6182a4 to 75829c8 Compare October 22, 2024 00:42
Fix compose to fully initialise the containers it returns. This ensures
that running things like checks for running behave as expected.

Extracts the functionality to connect to reaper into a helper method so
its consistent across uses.

Fix data race in daemonHost function converting it to a method to make
use of encapsulation.

Fix container and network requests so they use sessionID from labels if
available so that user specified values are respected.

Export the functionality to create a container from a ContainerList
response via provider.ContainerFromType.

Enforce no bare returns instead of no named returns as that was the
original intention.

Fixes #2667
@stevenh stevenh force-pushed the fix/compose-containers branch from 75829c8 to 30ba8c3 Compare October 22, 2024 07:09
@stevenh stevenh marked this pull request as ready for review October 22, 2024 07:54
@stevenh stevenh requested a review from a team as a code owner October 22, 2024 07:54
@stevenh stevenh requested a review from mdelapenya October 22, 2024 07:54
* main:
  fix!: data races (#2843)
  fix: mongodb replicaset should work with auth (#2847)
  chore: use require.(No)Error(t,err) instead of t.Fatal(err) (#2851)
  fix: simplify fully-qualified image names (#2846)
@mdelapenya mdelapenya self-assigned this Oct 28, 2024
@mdelapenya mdelapenya added compose Docker Compose. bug An issue with the library labels Oct 28, 2024
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdelapenya mdelapenya merged commit 66f17a7 into main Oct 28, 2024
122 checks passed
@mdelapenya mdelapenya deleted the fix/compose-containers branch October 28, 2024 12:51
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Oct 29, 2024
* main:
  chore: use require.Len instead of assert.Len (testcontainers#2854)
  chore: bump ryuk to 0.11.0 (testcontainers#2853)
  chore: enable usestdlibvars linter (testcontainers#2850)
  fix(compose): container initialisation (testcontainers#2844)
  fix!: data races (testcontainers#2843)
  fix: mongodb replicaset should work with auth (testcontainers#2847)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the library compose Docker Compose.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Creation of DockerContainer results invalid state
2 participants