Skip to content

[v3-3-test] Catch lang-SDK Go example module drift before it reaches main (#70568) - #70624

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-bce20ff-v3-3-test
Jul 28, 2026
Merged

[v3-3-test] Catch lang-SDK Go example module drift before it reaches main (#70568)#70624
potiuk merged 1 commit into
v3-3-testfrom
backport-bce20ff-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor
  • Catch lang-SDK Go example module drift before it reaches main

kubernetes-tests/lang_sdk/go_example is a separate Go module that resolves
the SDK through a replace onto ../../../go-sdk, so it carries its own copy
of the SDK's indirect requirements. Nothing re-tidies it when a dependency
moves inside /go-sdk, and Dependabot bumps exactly one module per PR.

The blast radius is what makes this worth guarding. Go refuses to build an
inconsistent module, so once such a bump merges, "Kubernetes tests / K8S
Lang-SDK" fails at the Build Go bundle step on every pull request until
someone notices and tidies the module by hand — not just on the PR that
caused it.

Dependabot security updates do not consult .github/dependabot.yml, so no
per-directory configuration prevents this, and a second Dependabot PR for the
example module would merge at a different time and leave main red in between.
The drift has to fail the bump PR itself.

The check is go mod tidy -diff in the example module: it asks exactly the
question the failing CI step asks, never writes to the working tree, and
exits non-zero when the module is untidy.

  • Let prek provide the Go toolchain for the tidy check

Static checks run on a runner whose preinstalled toolchains are deleted to
free disk space before prek starts, so the check could never find go there
and failed on every run. Asking prek for the toolchain is how the Go SDK's
own tidy hook already gets one, and it pins the same version everywhere.
(cherry picked from commit bce20ff)

Co-authored-by: Jarek Potiuk jarek@potiuk.com

…main (#70568)

* Catch lang-SDK Go example module drift before it reaches main

kubernetes-tests/lang_sdk/go_example is a separate Go module that resolves
the SDK through a `replace` onto ../../../go-sdk, so it carries its own copy
of the SDK's indirect requirements. Nothing re-tidies it when a dependency
moves inside /go-sdk, and Dependabot bumps exactly one module per PR.

The blast radius is what makes this worth guarding. Go refuses to build an
inconsistent module, so once such a bump merges, "Kubernetes tests / K8S
Lang-SDK" fails at the Build Go bundle step on every pull request until
someone notices and tidies the module by hand — not just on the PR that
caused it.

Dependabot security updates do not consult .github/dependabot.yml, so no
per-directory configuration prevents this, and a second Dependabot PR for the
example module would merge at a different time and leave main red in between.
The drift has to fail the bump PR itself.

The check is `go mod tidy -diff` in the example module: it asks exactly the
question the failing CI step asks, never writes to the working tree, and
exits non-zero when the module is untidy.

* Let prek provide the Go toolchain for the tidy check

Static checks run on a runner whose preinstalled toolchains are deleted to
free disk space before prek starts, so the check could never find `go` there
and failed on every run. Asking prek for the toolchain is how the Go SDK's
own tidy hook already gets one, and it pins the same version everywhere.
(cherry picked from commit bce20ff)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk
potiuk marked this pull request as ready for review July 28, 2026 16:22
@potiuk
potiuk merged commit 15ec9f0 into v3-3-test Jul 28, 2026
29 of 38 checks passed
@potiuk
potiuk deleted the backport-bce20ff-v3-3-test branch July 28, 2026 16:23
@vatsrahul1001 vatsrahul1001 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 4, 2026
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 4, 2026
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
…main (#70568) (#70624)

* Catch lang-SDK Go example module drift before it reaches main

kubernetes-tests/lang_sdk/go_example is a separate Go module that resolves
the SDK through a `replace` onto ../../../go-sdk, so it carries its own copy
of the SDK's indirect requirements. Nothing re-tidies it when a dependency
moves inside /go-sdk, and Dependabot bumps exactly one module per PR.

The blast radius is what makes this worth guarding. Go refuses to build an
inconsistent module, so once such a bump merges, "Kubernetes tests / K8S
Lang-SDK" fails at the Build Go bundle step on every pull request until
someone notices and tidies the module by hand — not just on the PR that
caused it.

Dependabot security updates do not consult .github/dependabot.yml, so no
per-directory configuration prevents this, and a second Dependabot PR for the
example module would merge at a different time and leave main red in between.
The drift has to fail the bump PR itself.

The check is `go mod tidy -diff` in the example module: it asks exactly the
question the failing CI step asks, never writes to the working tree, and
exits non-zero when the module is untidy.

* Let prek provide the Go toolchain for the tidy check

Static checks run on a runner whose preinstalled toolchains are deleted to
free disk space before prek starts, so the check could never find `go` there
and failed on every run. Asking prek for the toolchain is how the Go SDK's
own tidy hook already gets one, and it pins the same version everywhere.
(cherry picked from commit bce20ff)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants