Repository navigation
test(upgrade): add dependency and generation compatibility checks - #792
Merged
Merged
Conversation
Signed-off-by: thxCode <thxcode0824@gmail.com>
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
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.
What type of PR is this?
/kind enhancement
/area testing
What this PR does / why we need it:
Add
hack/check/upgrade-compat.shto 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 --checkcalls, 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 lintpasses 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?