-
Notifications
You must be signed in to change notification settings - Fork 110
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
Use app label as app-change label for new apps #710
Conversation
4edcd38
to
b186171
Compare
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.
A few thoughts and I am thinking about whether migrated apps that use the label name today is being considered.
b186171
to
dd01037
Compare
I see that you called out that we won't be any change for existing + migrated apps. That checks out. What I was wondering is, since app-changes are something we garbage collect. Would it make sense to do this at an app-change level?
So the huge downside is we make one more call till the app is migrated. And from a kapp-controller perspective. For stable packages that do not have diffs, this might be forever till they are reinstalled. I am trying to figure out how we can potentially move to using just the new label. The path we are taking right now feels like we will be handling both cases for a long time since we cannot definitely said that no Since, this is a case that is consciously not being handled in the PR. We can however track how we can "taper off" using old labels as a separate issue since this fix might be needed sooner rather than later. TL;DR: The path to us not supporting the old label at all in the future is not clear. But we might track that separately and improve on the cases that we do not handle. |
@100mik Thanks for bringing this up. I was planning to take that up separately, but now I think that we should at least decide how we migrate the app-changes for existing apps before making this change. How about we add one more label to app-changes (not label value, but new label itself). For new apps we will use the new label itself, for old apps we will use the old label but also add the new label to the app changes. After some releases we will switch to using the new label only. New app-changes for existing apps:
New app-changes for new apps:
Does this make sense? I will see how these changes looks from code perspective. |
Yeah, I think adding both labels now does give us a part forward. We should do that if it is feasible 🤔 |
1f1bd3f
to
310fb85
Compare
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.
The changes look good to me, adding both labels leave more room for us to plan out the migration!
I was wondering if there is a straightforward way of putting together tests for this, but I believe we do not have any form of tests involving older versions of kapp
. So I am happy with these changes as long as we have verified the tabulated test cases. Let me know if you need a hand with the verification!
- Introduce a new label kapp.k14s.io/app-change-app-label for app changes which uses the app label as value - Use the old label to list and delete app-changes created for exiting apps, but also add this new label to them. - Use the new label to list and delete app-changes created for new apps, but add the old label if length of app name is less than the maximum allowed length of a label key Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
310fb85
to
b8796a3
Compare
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.
The additional condition makes sense!
What this PR does / why we need it:
kapp.k14s.io/app-change-app-label
for app changes which uses the app label as valueWhich issue(s) this PR fixes:
Fixes #646
Does this PR introduce a user-facing change?
Additional Notes for your reviewer:
In future, after x number of releases, we can stop using the legacy label and start using the new label for existing apps as well. Since all the app-changes created for them would most probably have both the labels, it won't result in any loss of app-changes.
Review Checklist:
a link to that PR
change
Additional documentation e.g., Proposal, usage docs, etc.: