fix(dataprotection): shorten backup policy derived names#10274
Conversation
|
Auto Cherry-pick Instructions |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10274 +/- ##
==========================================
+ Coverage 52.73% 52.92% +0.19%
==========================================
Files 534 534
Lines 61231 61250 +19
==========================================
+ Hits 32288 32415 +127
+ Misses 25683 25589 -94
+ Partials 3260 3246 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Runtime validation update for the naming fix scope:
Boundary: this is patch-image scoped validation of the #10274 naming behavior. The full PITR readback/cleanup lane later hit an environment blocker in the vcluster API NodePort path, so this comment does not claim release-ready or full OceanBase PITR acceptance. |
|
Final runtime validation update for the #10274 naming scope:
Evidence from the addon validation lane:
Boundary:
|
|
Closeout addendum for the 74-char OceanBase PITR validation lane:
Final boundary for this PR:
|
|
I think a cleaner naming scheme would be to drop the Using the same base name, e.g. If preserving the existing short-name output is intentional for compatibility, that tradeoff should be called out explicitly. Otherwise, I suggest switching to the suffix-free naming scheme and updating the tests accordingly. |
|
After looking more closely at the compatibility behavior, keeping the existing suffixes makes sense here because Dropping the suffixes would be a broader naming change and would require migration/compatibility handling for existing objects. So my previous suggestion is more of a possible future cleanup, not a blocker for this PR. |
|
/cherry-pick release-1.0 |
|
/cherry-pick release-1.1 |
|
🤖 says: cherry pick action finished successfully 🎉! |
|
🤖 says: cherry pick action finished successfully 🎉! |
(cherry picked from commit 9546baf)
(cherry picked from commit 9546baf)
Summary
constant.ShortenKubeName.Motivation
OceanBase Restore long-name validation for #10266 reached patch-image scoped PASS on the 70-character live path, but the strongest 74-character attempt exposed an earlier Kubernetes name-length blocker before the Restore path could run:
<restore>-<component>-backup-policycan reach 65 chars;<restore>-<component>-backup-schedulecan reach 67 chars.These names are DataProtection-derived resources, not OceanBase-specific resources, so the name hardening should live in the controller helper that generates them.
Validation
go generate ./pkg/testutil/k8s/mocksKUBEBUILDER_ASSETS="$(/Users/wei/ApeCloud/kubeblocks/bin/setup-envtest-release-0.21 use 1.26.1 -p path)" go test ./controllers/dataprotection -run 'TestAPIs/BackupPolicyDriver' -count=1 -vPASS, 130/130 specsgo test -c ./controllers/dataprotectionPASSKUBEBUILDER_ASSETS="$(/Users/wei/ApeCloud/kubeblocks/bin/setup-envtest-release-0.21 use 1.26.1 -p path)" go test ./pkg/dataprotection/restore -count=1PASSgit diff --checkPASSBoundary
This PR only hardens generated BackupPolicy/BackupSchedule names. It does not change the #10266 Restore prepareData/postReady name-shortening path and does not claim release-ready validation. The affected addon team still needs a patch-image sideload run for the 74-character long-name lane.