Skip to content

Pin setup-envtest to a fixed version - #7151

Merged
jhrozek merged 1 commit into
mainfrom
pin-setup-envtest
Nov 16, 2026
Merged

jhrozek merged 1 commit into
mainfrom
pin-setup-envtest

Conversation

@jhrozek

@jhrozek jhrozek commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The operator integration tests started failing on every PR at setup, before any test runs:

go: sigs.k8s.io/controller-runtime/tools/[email protected]: module sigs.k8s.io/[email protected] found (v0.22.6-0.20260125163108-a19ec76a3c5d), but does not contain package sigs.k8s.io/controller-runtime/tools/setup-envtest

setup-envtest is a nested module. Since about 10:30 UTC today the Go module proxy answers the branch query tools/setup-envtest/@v/release-0.22.info with 404 "not found: temporarily unavailable", while the root module's branch query and exact-version queries still work. On a 404 Go falls back to the shorter module path, lands on the root controller-runtime module, and fails. Nothing changed upstream: release-0.22 is still at the same January commit and resolving with GOPROXY=direct still finds the nested module.

  • Pin setup-envtest to v0.0.0-20260125163108-a19ec76a3c5d, which is exactly what @release-0.22 resolved to in the last passing run (branch head a19ec76a3c5d), so the tool binary is unchanged.
  • Exact versions resolve through the proxy, and the tool no longer moves when the branch does.

Type of change

  • Other (describe): CI / test tooling fix

Test plan

  • Manual testing (describe below)

Installed the pinned version into a scratch GOBIN through proxy.golang.org; setup-envtest version reports v0.0.0-20260125163108-a19ec76a3c5d and setup-envtest use 1.31.0 -p path resolves the envtest assets. The Operator Tests Integration job on this PR exercises the full task.

The operator integration tests install setup-envtest with
`@release-0.22`, a branch query on the nested
sigs.k8s.io/controller-runtime/tools/setup-envtest module. Since
2026-11-16 the Go module proxy answers that query with 404 "not found:
temporarily unavailable". Go then falls back to the root
controller-runtime module, which does not contain the package, so every
run of operator-test-integration fails before any test starts.

Pin the pseudo-version that release-0.22 resolved to before the outage
(the branch head, commit a19ec76a3c5d). Exact versions resolve through
the proxy, and the tool no longer changes under us when the branch
moves.

Co-authored-by: Mecatl <[email protected]>
@jhrozek
jhrozek requested a review from ChrisJBurns as a code owner November 16, 2026 10:52
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Nov 16, 2026

@rdimitrov rdimitrov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: the pin is correct and makes the install deterministic.

Design: setup-envtest is installed and used in exactly one place, operator-test-integration in cmd/thv-operator/Taskfile.yml, and the pin is made there. CI reaches it only through that task. The pseudo-version resolves on the Go proxy and is the same commit @release-0.22 resolves to today, so contributors and CI get an identical binary and use 1.31.0 returns the same assets. Nothing changes for users; this is a dev/CI-only task.

Not blocking: Renovate has no manager for Taskfile go install lines, so this pin (like ogen and swag) will go stale unless someone bumps it by hand. A one-line "manually maintained" note next to the pin would help. A tagged version (e.g. v0.25.x, which also builds) would read better than a pseudo-version, but it is not required.

🤖 Reviewed with Claude Code

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.30%. Comparing base (fcbf966) to head (ed5de64).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7151   +/-   ##
=======================================
  Coverage   81.30%   81.30%           
=======================================
  Files         883      883           
  Lines       90108    90108           
=======================================
+ Hits        73259    73264    +5     
+ Misses      16844    16839    -5     
  Partials        5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhrozek
jhrozek merged commit 9386113 into main Nov 16, 2026
47 checks passed
@jhrozek
jhrozek deleted the pin-setup-envtest branch November 16, 2026 11:21
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants