Skip to content
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

Fix two issues with profiles #3278

Merged
merged 2 commits into from
Nov 26, 2019
Merged

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Nov 21, 2019

Fix #3277
Fix #3261

@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #3278 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/config/options.go 100% <100%> (ø) ⬆️
pkg/skaffold/schema/profiles.go 88.63% <100%> (+0.06%) ⬆️

@petr-buchin
Copy link

@dgageot Thank you very much for a fix of my issue!
However, what do you think - maybe it's better to create some hash of profiles string, instead of trimming it to 62 characters and adding z ?

Hash from the whole profiles string will actually change with the profiles string, but trimmed string will not, if changes were made after "trim point".

@dgageot
Copy link
Contributor Author

dgageot commented Nov 22, 2019

Well, you're right, I was a bit "lazy" on this one ;-)
I'm not sure I like the solution with a digest, it's not something users can really decipher.

  • We could add one label per profile (profile.1=..., profile2=...)
  • Or we could remove that altogether. I'm not sure it brings a lot of value.

@balopat wdyt?

@dgageot
Copy link
Contributor Author

dgageot commented Nov 22, 2019

OK, I decided to replace my ugly hack and use a key per profile instead.
(It doesn't run any check on profile names, though)

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I do think there is value in the profile.0, profile.1, ... label schema - it shows the order of the application for the profiles, which matters. Regarding the 63 character validation: I think that's a low probability enough issue + validation now will fail with a meaningful error message as the label validation will be exactly on the profile name.

@dgageot dgageot merged commit fccbce0 into GoogleContainerTools:master Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants