ci: use CGO for tests to enable race detector#10261
Merged
Conversation
``` go: -race requires cgo; enable cgo by setting CGO_ENABLED=1 ``` We're explicitly using CGO on macOS now for FSEvents support and purposefully NOT using CGO on other platforms since we don't need it. The race detector (`-race`) requires it, however, so for the e2e make task, it should alway be on. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Codecov ReportBase: 73.89% // Head: 73.89% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## v2 #10261 +/- ##
=======================================
Coverage 73.89% 73.89%
=======================================
Files 2 2
Lines 272 272
=======================================
Hits 201 201
Misses 60 60
Partials 11 11 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
glours
approved these changes
Feb 9, 2023
milas
added a commit
to milas/compose
that referenced
this pull request
Feb 9, 2023
I misunderstood the cause of the symptom in docker#10261 - thought that we'd explicitly turned off CGO for Windows with some of the build changes recently, but we don't even have `gcc` on the CI node, so it's actually just `-race` entirely that's the trouble. For right now, going the easy route and disabling it. We can look at getting a C toolchain on the Windows machine later.
milas
added a commit
to milas/compose
that referenced
this pull request
Feb 9, 2023
I misunderstood the cause of the symptom in docker#10261 - thought that we'd explicitly turned off CGO for Windows with some of the build changes recently, but we don't even have `gcc` on the CI node, so it's actually just `-race` entirely that's the trouble. For right now, going the easy route and disabling it. We can look at getting a C toolchain on the Windows machine later. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
ndeloof
pushed a commit
that referenced
this pull request
Feb 10, 2023
I misunderstood the cause of the symptom in #10261 - thought that we'd explicitly turned off CGO for Windows with some of the build changes recently, but we don't even have `gcc` on the CI node, so it's actually just `-race` entirely that's the trouble. For right now, going the easy route and disabling it. We can look at getting a C toolchain on the Windows machine later. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
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
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.
What I did
Explicitly enable CGO for e2e tests to avoid errors:
We're explicitly using CGO on macOS now for FSEvents support and purposefully NOT using CGO on other platforms since we don't need it.
The race detector (
-race) requires it, however, so for the e2e make task, it should alway be on.Related issue
See sample failed run from
v2on Windows: https://github.com/docker/compose/actions/runs/4136372230/jobs/7150139071(not mandatory) A picture of a cute animal, if possible in relation to what you did
