fix(compose): avoid race conditions when caching services by mdelapenya · Pull Request #2528 · testcontainers/testcontainers-go
Navigation Menu
{{ message }}
testcontainers / testcontainers-go Public
- Notifications You must be signed in to change notification settings
- Fork 591
Comments
Merged
mdelapenya merged 1 commit intotestcontainers:mainfrom
May 3, 2024Merged
fix(compose): avoid race conditions when caching services#2528
mdelapenya merged 1 commit intotestcontainers:mainfrom
fix(compose): avoid race conditions when caching services#2528
mdelapenya merged 1 commit intotestcontainers:mainfrom
Conversation
Copy link
Member
mdelapenya
commented
May 3, 2024
mdelapenya
commented
What does this PR do?
This PR uses the existing lock to protect the access to the containers map, which after #2485 caused the race condition.
Why is it important?
Prevent race conditions
Related issues
How to test this PR
I discovered this issue while running the compose tests with -race.
mdelapenya
requested a review
from a team
as a code owner
mdelapenya
self-assigned this
Copy link
✅ Deploy Preview for testcontainers-go ready!
| Name | Link |
|---|---|
| 🔨 Latest commit | d702774 |
| 🔍 Latest deploy log | https://app.netlify.com/sites/testcontainers-go/deploys/6634a34deb67fd000827ddc0 |
| 😎 Deploy Preview | https://deploy-preview-2528--testcontainers-go.netlify.app |
| 📱 Preview on mobile |
To edit notification comments on pull requests, go to your Netlify site configuration.
mdelapenya
merged commit
5e97046
into
testcontainers:main
mdelapenya
deleted the
fix-reace-condition-compose
branch
mdelapenya added a commit to khartld/testcontainers-go that referenced this pull request
May 7, 2024* main: (44 commits) feat: expose JSON representation of a container with Inspect (testcontainers#2534) chore(deps): bump test-summary action to v2.3 (testcontainers#2535) chore(deps): bump jinja2 from 3.1.3 to 3.1.4 (testcontainers#2533) Update devcontainer image (testcontainers#2531) chore(influxdb): include more characters in wait for log regex (testcontainers#2532) fix(compose): avoid race conditions when caching services (testcontainers#2528) chore(deps): bump golangci/golangci-lint-action from 3.7.0 to 5.1.0 (testcontainers#2525) chore(deps): bump mkdocs-material from 8.2.7 to 9.1.21 (testcontainers#2524) chore(compose): return error in options (testcontainers#2520) chore(deps): bump github.com/compose-spec/compose-go/v2 from v2.0.0-rc8 to v2.1.0 (testcontainers#2519) chore(deps): bump github.com/containerd/containerd from 1.7.12 to 1.7.15 (testcontainers#2517) break: return error from Customize request option (testcontainers#2267) fix: wrong copy paste (testcontainers#2515) docs: add documentation for Exec method (testcontainers#2451) docs: document the SSHd tunnel (testcontainers#2514) fix: enhance host configuration port binding (testcontainers#2512) feat: forward host ports to a container using an SSH tunnel (testcontainers#2471) Update follow_logs.md with adding missing package (testcontainers#2513) fix: don't retry on permanent APIClient errors (testcontainers#2506) feat: support overriding the default recreate options for compose (testcontainers#2511) ...
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment