Skip to content

test(upgrade): add dependency and generation compatibility checks - #792

Merged
thxCode merged 1 commit into
mainfrom
upgrade-compat-spike
Oct 25, 2026
Merged

thxCode merged 1 commit into
mainfrom
upgrade-compat-spike

Conversation

@thxCode

@thxCode thxCode commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind enhancement
/area testing

What this PR does / why we need it:

Add hack/check/upgrade-compat.sh to verify dependency and generated-output migrations. It snapshots file contents and types, reports additions/deletions/changes, and checks the resolved module graph against Kubernetes release cohorts, local replacement stamps and staged patch state. The Development module map links the helper.

Patch probes use bounded, read-only git apply --check calls, including already-applied deletion patches whose target file is empty. Module checks allow absent optional dependencies while rejecting a present Kubernetes module from another release line.

Which issue(s) this PR links to:

None. This supplies validation for the staged Go/Kubernetes upgrade.

Special notes for your reviewer:

Validation: 36 self-test assertions pass, including exact diff counts, space-containing paths, symlinks, malformed input, patch states and module failures. Local replacement stamps are checked at arbitrary directory depth, including required stamps that are missing or empty. The previous implementation fails four of the five added stamp cases. Restoring the former CSI exclusion or mandatory gengo v1 rule makes the corresponding regression case fail. Full make lint passes with the current module compiler (GOTOOLCHAIN=go1.26.9); documentation lint passes.

The real graph check correctly exits nonzero for one existing inconsistency: kube-aggregator is required at v0.35.1 while its local staged source is stamped v0.35.3. All three staged patches are recognized as applied without changing the tree. The later dependency migration corrects that pin. The unchanged pinned linter cannot read the host Go 1.27 export data; exact-Go-1.27 lint remains a later upgrade gate.

Does this PR introduce a user-facing change?

NONE

Signed-off-by: thxCode <thxcode0824@gmail.com>
@gpustack-code-review

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@thxCode
thxCode merged commit d0cd915 into main Oct 25, 2026
11 checks passed
@thxCode
thxCode deleted the upgrade-compat-spike branch October 25, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant