Update Velero hook scripts to rewrite go.mod require with branch-aligned upstream tags and replace with downstream branches#39
Conversation
|
@copilot not downstream tag, but closest aligned upstream velero version such as v1.18.1, v1.18.1-rc.2, etc. |
Updated in commit 2d9eddf. The Velero hooks no longer write downstream branch values into |
|
@copilot This change introduces a new env var, VELERO_REQUIRE_VERSION, but I don’t see that variable defined or passed anywhere else in this repo. Can we avoid adding a new input and instead make the hook determine the target Velero upstream tag from existing branch-specific context already used by these scripts? Right now the fallback just preserves whatever upstream-looking version is already in go.mod, which doesn’t actually guarantee we rewrite to the correct version. Please revise this so the hook works without introducing a new variable. |
Updated in commit 843937e. Removed |
Current Velero hooks only rewrote
replace, leavingrequirepotentially inconsistent with intended Velero version metadata.Scope
rebasebot-hook-scripts/go-replace_velero_oadp-dev.shrebasebot-hook-scripts/go-replace_velero_oadp-1.6.shrebasebot-hook-scripts/go-replace_velero_oadp-1.5.shBehavior change
replaceentries to the target downstream branch (oadp-dev/oadp-1.6/oadp-1.5).requireentries using an upstream Velero tag (for examplev1.18.1orv1.18.1-rc.2), not downstream branch names.requireversion source is now derived from existing branch-specific context in the scripts (no new input variable):oadp-1.6: fixed aligned upstream tagv1.18.1oadp-1.5: latest alignedv1.16.xupstream release tag from Velero tagsoadp-dev: latest upstream Velero tag (including RC tags)go.modforms:require github.com/.../... vX.Y.Zgithub.com/.../... vX.Y.Zreplacecleanup remains unchanged.oadp-devandoadp-1.5), scripts now:Authorization: BearerwhenGITHUB_TOKENis present,Result
requirenow reflects branch-aligned upstream Velero version intent, whilereplacecontinues to pin to downstream forks/branches, preventing mixed or misleading dependency metadata during rebase automation.