-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Issue 8803: use deterministic name to create backupRepository #8808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ff90870 to
fb10165
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8808 +/- ##
=======================================
Coverage 59.56% 59.57%
=======================================
Files 370 370
Lines 40229 40228 -1
=======================================
+ Hits 23964 23966 +2
+ Misses 14766 14764 -2
+ Partials 1499 1498 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@sseago @shubham-pampattiwar Please help to review this PR. For the existing code, there is a comment in function However, after discussion, we don't see a problem of using a deterministic name. |
|
@msfrucht Please also have a look. |
Signed-off-by: Lyndon-Li <[email protected]>
fb10165 to
3c5ebba
Compare
|
cc: @msfrucht |
I agree. Any existing BackupRepository will be found using the BackupRepositoryKey. And any new BackupRepository can be created deterministically and allow for ok on Conflict since that implies the named format is ok. I approve with a caveat, though it is a pre-existing issue.
The BackupLocation is the name of the BackupStorageLocation. This is why in the bug report the name of the BSL is a uuid. Internally, we generate them as such to avoid this issue. The name of the BackupRepository object will be at least the length of the name of the BackupStorageLocation. If the BackupStorageLocation name is set to the maximum allowed for a Kubernetes object. The object creation will fail. This isn't the only time we've seen. I fully admit to making this error as well. And why our internal project has a standing policy that object names should not be concatenated to create new object names. With the exception for object names with a 64-character maximum like Service due to DNS format. Because this is a pre-existing problem in the design, I do not see it as blocking, just a note that still needs further refinement. The previous format with generateName also had this issue and was slightly worse due to the additional suffix. |
Please open another issue for this problem. We have multiple areas in the code with this problem, not only for backupRepository CRs. |
Fully agreed. For the new code, let's keep this in mind in coding and review. |
|
Fix issue #8803, use deterministic name to create backupRepository