Gateway API Upgrade Playbook¶
Mechanical checklist for bumping the sigs.k8s.io/gateway-api dependency.
Distilled from the v1.6.0 upgrade retrospective
(issue #58): the bump
itself takes under an hour — the cost lives in suite adaptation and
verification. Work through the sections in order.
Before the bump¶
-
Check the nightly canary results. The
nightly-gwapi-canaryCI job runs the conformance suite from gateway-api'smainbranch every night, so the next release's breakage should already be filed as canary-flaggedneeds-triageissues. Review them before you start: -
Review the upstream release notes for:
- new conformance tests — they run automatically once the suite module is bumped (see Suite adaptation),
- features moving between the standard and experimental channels,
- CRD schema changes — new fields matter for the chart's
requires/requiresFieldsstripping.
The bump¶
-
Take the Renovate MR, or bump manually.
go.modpins two modules — the API types and the conformance suite — and they must move together: -
Refresh the offline schemas. The target copies the gateway CRDs of the release pinned in
go.modfrom the module cache intotests/schemas/: -
Add an old-release schema bundle if the previous default release should join the degraded-profile coverage (the
tests/schemas-ga-*bundles):Then create
tests/schemas-ga-v1.6/expected-stripped.txt: run./scripts/test-templates.shand seed the allowlist from the degraded profile's⊘ <name> stripped:output lines (one test name per line,#comments allowed). -
Regenerate the gateway library's
requiresannotations: -
Update the pinned default release. The conformance suite refuses to run when the installed CRDs and the suite disagree on
bundle-version, so both places must matchgo.mod:defaultGatewayAPIVersionintests/e2e/main_test.go- the
standard-install.yamlURL (and the log line next to it) inscripts/start-dev-env.sh
-
Update the nightly old-release matrix. If you added a schema bundle in step 3, add the same release tag to the
GWAPI_RELEASElist of thenightly-gwapi-matrixjob in.gitlab-ci.yml— the list mirrors thetests/schemas-ga-*bundles.
Suite adaptation¶
-
Diff
SupportedFeatures.tests/conformance/gateway_conformance_test.godeclares every standard-channel entry offeatures.AllFeaturesminus an explicitexcludedset, so features the new release adds enroll automatically. For each new feature, either implement it in the chart or add it toexcludedwith a concrete upstream-capability reason — never under-declare to dodge a failing test. -
Review the new tests before CI meets them. The shard script enumerates the suite's test names from the module cache, and with a single shard it prints them all — run it before and after the bump and diff:
-
Expect the shards to rebalance.
scripts/shard-conformance-tests.shmaps each test name to a shard via a CRC32 hash modulo the shard count, so new upstream tests shift existing assignments and shard durations change. If a shard outgrows its job timeout, raise theparallel:count of thetest-gateway-conformancejob in.gitlab-ci.yml. -
Skip individual broken upstream tests via
opts.SkipTests, each entry with an issue link in a comment. Nevert.Skip()the whole suite. -
Leave the suite's consistency budgets alone.
MaxTimeToConsistencyand the object-status budgets stay at upstream defaults because they absorb cluster-infra latency (kube-proxy DNAT programming, apiserver churn) that HAPTIC can't control; HAPTIC's own latency contracts live in dedicated e2e assertions instead. The full rationale is encoded in the budget-doctrine comments intests/conformance/gateway_conformance_test.go— keep those comments intact in review.
Verification¶
-
Run the offline template harness. The degraded profiles must pass with zero failing tests, and each bundle's stripped set must exactly match its
expected-stripped.txt: -
Trigger a nightly-style pipeline on the MR branch. It runs the full heartbeat stack plus
nightly-gwapi-matrixandnightly-gwapi-canary, proving the matrix and canary jobs live on the new release: -
Debug any failing conformance test locally on a fresh kind cluster — never take a verdict from a reused cluster:
kind delete cluster --name haptic-e2e TEST_RUN_PATTERN="^$" make test-e2e TEST_RUN_PATTERN='^TestGatewayAPIConformance/HTTPRouteWeight$' make test-gateway-conformanceTEST_RUN_PATTERN="^$"boots the cluster and chart without running the e2e tests; the second pattern selects one conformance test by its upstreamShortName.
Process guardrails¶
- Deliverable-ref discipline. Before the first fix, write down the MR whose head pipeline must go green. Land every fix on that branch, and cite that pipeline's ID in every "green" claim. In the v1.6.0 campaign, fixes accumulated on a side branch for hours while the MR pipeline stayed red.
-
Commit-content verification. Before declaring a fix pushed, diff the pushed commit against the intended change — the commit message is not the content. In the v1.6.0 campaign, a fix commit shipped only its CHANGELOG line (the
values.yamledit was never staged) and burned two CI rounds: