-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
[Bug]: WithAfterReadyCommand incorrect iterator scope #2668
Comments
Looks like |
Bump module requirement to 1.22? |
Hi @itsnotapt thanks for reporting this. We usually test honouring the Go version matrix (current two minors: e.g. 1.22 and 1.23) so at some point we for sure were covering 1.21 but I'm afraid we did not have a test honouring the execution order. I'd expect that users of the library are in the same Go support matrix, but I see it could not be the case. It would be super easy to fix this with your patch, although I'd like to know more about your use case and your reason to stay in 1.21. |
Hi @mdelapenya, we've updated to |
Testcontainers version
0.32.0
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host arch
ARM64
Go version
1.22.4
Docker version
Server: Docker Desktop 4.22.1 (118664) Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.6 Git commit: a61e2b4 Built: Fri Jul 21 20:35:38 2023 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.21 GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8 runc: Version: 1.1.7 GitCommit: v1.1.7-0-g860f061 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
The
for
loop for generating the functions associated withWithAfterReadyCommand
is referencing the wrong scope.Consider this test:
This will fail with
go 1.21
. However, if you update togo 1.22
or use the env varGOEXPERIMENT=loopvar
the test will pass.Simple fix is to update the scope for
exec
attestcontainers-go/options.go
Line 275 in 70b90cc
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: