-
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 long app names #685
Conversation
59427cd
to
4515439
Compare
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
4515439
to
aaab30c
Compare
@@ -122,3 +125,10 @@ func (a RecordedAppChanges) Begin(meta ChangeMeta) (*ChangeImpl, error) { | |||
|
|||
return change, nil | |||
} | |||
|
|||
func (a RecordedAppChanges) changeLabelValue() string { |
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.
anything we are doing to deal with renames of an app? (or is this future work?)
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.
As of now, we abandon all the app-changes in case of a rename (with user confirmation), so this check should be good for now to resolve the issue. The only difference that will be there now is that we will not be able to list the app-changes with old names. Example:
$ kapp deploy -a very-long-name -f config.yml
$ kapp rename -a very-long-name --new-name short-name
$ kapp app-changes list -a very-long-name
kapp: Error: App 'very-long-name' (namespace: name-limit) does not exist:
The error would happen because of the meta
calls.
For future, we can completely migrate to using the label.
LGTM |
Linked the related issue ^ |
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.
LGTM!
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
What this PR does / why we need it:
Use app label to as app change label for long app names
If app names have more than 63 character, use the app label as app change label instead of the app name as there is a hard limit on the number of characters that can be present in a label value
This is the first step towards fixing #646
Does this PR introduce a user-facing change?
Additional Notes for your reviewer:
Review Checklist:
a link to that PR
change
Additional documentation e.g., Proposal, usage docs, etc.: