Add prek hook to keep the Go toolchain version in sync - #69338
Merged
Conversation
potiuk
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496 and
jscheffl
as code owners
July 3, 2026 14:41
The Go toolchain version is pinned in eight places (go-sdk/go.mod, the go_example module, the setup-go step in both CI workflow copies, the golang alpine builder image used by the e2e conftest and by breeze, and the default_language_version.golang in the top-level and go-sdk prek configs). They have no cross-file include, so a dependency bump that raises the go directive in go-sdk/go.mod leaves the rest behind and the drift only surfaces as an opaque "go.mod requires go >= <new>" failure deep in CI — as happened in PR apache#69214. Add a prek hook that treats go-sdk/go.mod as the single source of truth and fails when any other site disagrees at major.minor granularity, pointing directly at the drifting file.
potiuk
force-pushed
the
add-go-version-sync-hook
branch
from
July 6, 2026 20:33
670cfb6 to
5947bbc
Compare
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
potiuk
added a commit
that referenced
this pull request
Jul 6, 2026
…69338) (#69498) The Go toolchain version is pinned in eight places (go-sdk/go.mod, the go_example module, the setup-go step in both CI workflow copies, the golang alpine builder image used by the e2e conftest and by breeze, and the default_language_version.golang in the top-level and go-sdk prek configs). They have no cross-file include, so a dependency bump that raises the go directive in go-sdk/go.mod leaves the rest behind and the drift only surfaces as an opaque "go.mod requires go >= <new>" failure deep in CI — as happened in PR #69214. Add a prek hook that treats go-sdk/go.mod as the single source of truth and fails when any other site disagrees at major.minor granularity, pointing directly at the drifting file. (cherry picked from commit 0a48fee) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Jul 7, 2026
…69338) (#69498) The Go toolchain version is pinned in eight places (go-sdk/go.mod, the go_example module, the setup-go step in both CI workflow copies, the golang alpine builder image used by the e2e conftest and by breeze, and the default_language_version.golang in the top-level and go-sdk prek configs). They have no cross-file include, so a dependency bump that raises the go directive in go-sdk/go.mod leaves the rest behind and the drift only surfaces as an opaque "go.mod requires go >= <new>" failure deep in CI — as happened in PR #69214. Add a prek hook that treats go-sdk/go.mod as the single source of truth and fails when any other site disagrees at major.minor granularity, pointing directly at the drifting file. (cherry picked from commit 0a48fee) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Jul 9, 2026
…69338) (#69498) The Go toolchain version is pinned in eight places (go-sdk/go.mod, the go_example module, the setup-go step in both CI workflow copies, the golang alpine builder image used by the e2e conftest and by breeze, and the default_language_version.golang in the top-level and go-sdk prek configs). They have no cross-file include, so a dependency bump that raises the go directive in go-sdk/go.mod leaves the rest behind and the drift only surfaces as an opaque "go.mod requires go >= <new>" failure deep in CI — as happened in PR #69214. Add a prek hook that treats go-sdk/go.mod as the single source of truth and fails when any other site disagrees at major.minor granularity, pointing directly at the drifting file. (cherry picked from commit 0a48fee) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Aug 5, 2026
…69338) (#69498) The Go toolchain version is pinned in eight places (go-sdk/go.mod, the go_example module, the setup-go step in both CI workflow copies, the golang alpine builder image used by the e2e conftest and by breeze, and the default_language_version.golang in the top-level and go-sdk prek configs). They have no cross-file include, so a dependency bump that raises the go directive in go-sdk/go.mod leaves the rest behind and the drift only surfaces as an opaque "go.mod requires go >= <new>" failure deep in CI — as happened in PR #69214. Add a prek hook that treats go-sdk/go.mod as the single source of truth and fails when any other site disagrees at major.minor granularity, pointing directly at the drifting file. (cherry picked from commit 0a48fee) Co-authored-by: Jarek Potiuk <jarek@potiuk.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.
Adds a prek hook,
check-go-version-in-sync, that keeps the Go toolchain version consistent across every file that pins it, withgo-sdk/go.modas the single source of truth.The Go version is pinned in eight places:
go-sdk/go.mod, thego_examplemodule, thesetup-gostep in both CI workflow copies, thegolang:<ver>-alpinebuilder image used by the e2e conftest and by breeze, anddefault_language_version.golangin the top-level andgo-sdkprek configs. They have no cross-file include, so a dependency bump that raises thegodirective ingo-sdk/go.modleaves the rest behind — and the drift only surfaces as an opaquego.mod requires go >= <new>failure deep in CI, as happened in #69214. The hook fails fast and points at the exact drifting file, comparing atmajor.minorgranularity.Modelled on the existing
check-java-sdk-version-in-synchook.related: #69214
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines