ci: fix Discovery Module Release toolchain and cover discovery modules pre-merge - #25
Merged
Merged
Conversation
discovery/etcd and discovery/mdns declare go 1.25.0, forced by their golang.org/x/net, x/sys and x/text requirements, which came in with the advisory fix in 0aa9069. actions/setup-go pins GOTOOLCHAIN=local, so the job's Go 1.23 refused to build them: go: go.mod requires go >= 1.25.0 (running go 1.23.12; GOTOOLCHAIN=local) The other four discovery modules stay at go 1.23.0 and build fine on a 1.25 toolchain, so the job now uses the highest directive across the set.
The discovery modules are separate Go modules, so the root `go test ./...` never reached them. Their first build was the post-merge release job, which is how the go 1.25.0 directive bump in 0aa9069 reached main before anything tried to compile it. Modules are enumerated with find rather than hardcoded, so a new submodule is covered automatically -- the release job's fixed list would skip it. The loop visits every module before exiting non-zero, so one broken module does not hide the rest.
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.
The
Discovery Module Releasejob failed on the v1.3.1 release run (run 30721527132):Cause
The advisory fix in 0aa9069 pulled
golang.org/x/net v0.54.0,x/sys v0.45.0andx/text v0.37.0intodiscovery/etcdanddiscovery/mdns. All three declarego 1.25.0, sogo getraised those two modules fromgo 1.23.0togo 1.25.0. The release job pinsgo-version: 1.23, andactions/setup-gosetsGOTOOLCHAIN=local, so Go hard-failed instead of fetching a newer toolchain.Reverting the directive is not an option — it would mean reverting the security upgrades. The job has to run on >= 1.25. The other four discovery modules stay at
go 1.23.0and build fine on a 1.25 toolchain.Changes
release.yml— Discovery Module Release now uses Go 1.25.ci.yml— newDiscovery Modulesjob. The discovery modules are separate Go modules, so the rootgo test ./...never reached them; their first build was the post-merge release job, which is why this landed on main before anything compiled it. Modules are enumerated withfindrather than hardcoded, so a new submodule is covered automatically.Verification
Replayed the release job's steps (
go mod tidy && go vet && go test -race, thengo mod verify) against agit archivescratch copy withGOTOOLCHAIN=local: base module and all five submodules pass, all six verify, andgo mod tidyis a no-op. The new CI job's script was run as-is — exit 0 across all six modules, and exit 1 with an::error::annotation when a module is given an unsatisfiable directive, having still visited every other module.Note
v1.3.1 itself published fine; only the tagging job failed, so
discovery/*/v1.3.1tags were never created — those tags are still atv1.2.0, and appear to have been skipped for v1.3.0 too. Worth checking separately whether discovery tagging has ever succeeded since ac0fe18 added it.