-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add check for owner references in backup sync, removing if missing #7032
Conversation
Signed-off-by: Jeffrey Koehler <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7032 +/- ##
==========================================
+ Coverage 61.00% 61.16% +0.15%
==========================================
Files 252 258 +6
Lines 26898 27327 +429
==========================================
+ Hits 16409 16714 +305
- Misses 9326 9430 +104
- Partials 1163 1183 +20 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request for feedback on a specific section.
Updated the code to check a bit better, and account for ownership references. I've tried writing some tests, but I'm having difficulty getting the tests to run, and I'm really not understanding how the existing testing works. I cant figure out how |
How about splitting the newly added logic into a separate function so that you can add unit tests for the function easily? |
@deefdragon Could you sign off the commit to pass the DCO checking? |
sorry. work has kept me super busy the last week. I will get the tests in and signed off hopefully Saturday. |
@deefdragon Do you have time to handle the PR now? As we are close to the FC date, if you don't have enough time, I'll take it over |
I'll try to get to it tonight and clean it up/test it/sign it, but if I don't finish it tonight, feel free to take over. (I originally ran into this because I'm migrating my cluster, which is taking most of my attention. sorry for the delays.) |
Signed-off-by: Jeffrey Koehler <[email protected]>
Signed-off-by: Jeffrey Koehler <[email protected]>
Should be signed, split out, and tested. I arguably went overboard on the tests, but I'd rather overdo it than miss something. |
Please add a summary of your change
Loops through the list of Ownership References in a backup when synchronizing. For each ownership reference, it checks for the referenced schedule, and if it exists, keeps it, but if it does not exist, removes it, and logs as such.
This is only a draft as I am unsure if this is the best approach/inline with the desired usage of OwnershipReferences in velero. If a seperate approach is desired, I can update as requested.
Does your change fix a particular issue?
Fixes #7031
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.Will update docs as requested where relevant, but I don't think they are relevant anywhere in this particular case?