Skip to content

fix: skip nil strategies in wait.ForAll#3032

Merged
mdelapenya merged 5 commits into
testcontainers:mainfrom
mdelapenya:skip-nil-wait-for-all
Mar 28, 2025
Merged

fix: skip nil strategies in wait.ForAll#3032
mdelapenya merged 5 commits into
testcontainers:mainfrom
mdelapenya:skip-nil-wait-for-all

Conversation

@mdelapenya
Copy link
Copy Markdown
Member

What does this PR do?

This PR skips nil wait strategies in case some downstream consumer uses the wait.ForAll without checking the validity of all the straegies in the list.

A clear example is building a list of strategies depending on certain conditions, and using forAll multiple times.

Why is it important?

Avoid runtime panics

@mdelapenya mdelapenya requested a review from a team as a code owner March 12, 2025 20:01
@mdelapenya mdelapenya added the bug An issue with the library label Mar 12, 2025
@mdelapenya mdelapenya self-assigned this Mar 12, 2025
@mdelapenya mdelapenya requested a review from stevenh March 12, 2025 20:01
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 12, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 586315d
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67e680e7ffa98c00081e664e
😎 Deploy Preview https://deploy-preview-3032--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.

Comment thread wait/all.go Outdated
Comment thread wait/all_test.go
* main:
  chore: prepare for next minor development cycle (0.37.0)
  chore: use new version (v0.36.0) in modules and examples
  chore: dockerise docs build (testcontainers#3060)
  chore(deps): bump golang.org/x/net from 0.23.0 to 0.36.0 in /modules/dynamodb (testcontainers#3059)
  chore(deps): bump github.com/magiconair/properties from 1.8.7 to 1.8.9 (testcontainers#3057)
  chore(deps): bump golangci/golangci-lint-action from 6.3.0 to 6.5.2 (testcontainers#3052)
  chore(deps): bump golang.org/x/sys from 0.28.0 to 0.31.0 (testcontainers#3056)
  chore(deps): bump actions/setup-go from 5.3.0 to 5.4.0 (testcontainers#3054)
  chore(deps): bump golang.org/x/net in /modules/scylladb (testcontainers#3058)
  chore(deps): bump github/codeql-action from 3.28.11 to 3.28.12 (testcontainers#3053)
  chore(deps): bump golang.org/x/net in /modules/databend (testcontainers#3055)
  feat(azure)!: add Azurite, EventHubs and ServiceBus in the new Azure module, deprecating the old Azurite module (testcontainers#3008)
  fix: update script path in chmod
  fix: update sonar script path (testcontainers#3045)
  chore(ci): manage Sonar projects from Github actions (testcontainers#3039)
  chore(deps): bump github.com/docker/buildx in /modules/compose (testcontainers#3043)
  chore(deps): bump github.com/containerd/containerd/v2 (testcontainers#3042)
  deps(compose): bump compose to v2.34.0 and compose-go to v2.4.9 (testcontainers#3041)
  chore(deps): bump golang.org/x/net in /modules/yugabytedb (testcontainers#3040)
  chore(deps)!: bump github.com/docker/docker from 27.1.1+incompatible to 28.0.1+incompatible (testcontainers#3017)
Copy link
Copy Markdown
Contributor

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Looking good just the lint failures to fix.

@mdelapenya mdelapenya merged commit 9d52130 into testcontainers:main Mar 28, 2025
186 checks passed
@mdelapenya mdelapenya deleted the skip-nil-wait-for-all branch March 28, 2025 11:40
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Mar 28, 2025
* main:
  fix: skip nil strategies in wait.ForAll (testcontainers#3032)
  chore: prepare for next minor development cycle (0.37.0)
  chore: use new version (v0.36.0) in modules and examples
  chore: dockerise docs build (testcontainers#3060)
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants