-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Prefix Skaffold labels with 'skaffold-' #2062
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
I'm a bit worried that somebody may forget to add the |
pkg/skaffold/config/options_test.go
Outdated
"two": "second", | ||
"three": "", | ||
"four": "", | ||
"cleanup": "true", |
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.
why cleanup and skaffold-cleanup both exist here?
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.
If I understand correctly, in #2002, it's question of keeping both for sometimes to make sure not to break potential use from skaffold users.
If this is excessive precaution, we might just replace the existing ones.
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.
ah understood. this is for backward compatibility. However these are labels that skaffold uses internally to track pods that needed to cleaned-up. Users should not have to care about these labels.
So. removing them should be fine.
Thats is a great thought. The labeller could have something is "AddSkaffoldPrefixIfRequired". However there is an exception to this rule when you want to add k8 recommended style labels. |
@tejal29 good point. So at the very least, we should check if the label already has a Further, it seems to be common convention to delimit label namespaces with a Now that I think about it, should we not use a more expressive prefix than |
@corneliusweig I like the idea of a |
@pyaillet good catch! I as a user would be surprised, if my label was prefixed. So I would say, no prefix for any explicitly user-specified labels. Or what is your feeling? |
@charlyx there is one contrived piece of code where the prefixing everything is not correct. The helm deployer needs to apply labels after creating the objects in k8s. For that, the labeler needs to merge existing and new skaffold labels. Those existing labels should of course not be prefixed with |
I see three options there:
I think the second might be a good option, WDYT ? |
Thanks @pyaillet i feel we should go with your current implementation and enforce "skaffold-" prefix via code reviews and not use |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
I signed it! |
Codecov Report
@@ Coverage Diff @@
## master #2062 +/- ##
=======================================
Coverage 56.12% 56.12%
=======================================
Files 180 180
Lines 7753 7753
=======================================
Hits 4351 4351
Misses 2986 2986
Partials 416 416
Continue to review full report at Codecov.
|
I'm ok with my commits being contributed to this project. |
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 it will be the task of the reviewer to ensure proper label prefixes, you could add a godoc comment to the Labeller
interface (pkg/skaffold/deploy/labels.go) with a reminder that labels should be namespaced appropriately.
@pyaillet Looks like you dont have the CLA signed for the following email id. |
I signed it! |
Really strange, when I got to the CLA page I got: |
Is it related to this comment from GoogleBot ? |
Please have them confirm that here in the pull request
We have @tejal29 :)
…Sent from my iPhone
On 6 May 2019, at 8:38 PM, Pierre-Yves Aillet ***@***.***> wrote:
Is it related to this comment from GoogleBot ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I think the CLA has been signed, looks like it just hasn't updated on the PR @tejal29 |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
Thanks @pyaillet and @priyawadhwa. I forced a Re-Scan and the error is "CLAs are signed, but unable to verify author consent" which is terminal |
Is it possible that this broke CI/CD:
|
As the prefix set here is |
Looks like something else might be adding the label. |
It's strange, the only label value prefixed by |
yeah looks like the version is not get populated. :( maybe we shd fix this to check if version is not empty. |
But the version string (albeit weird) is not the problem, as it fits the regexp. @Jonathan34 I think you are using kustomize to deploy, correct? Can you check if you do some label magic there? And are you using the |
is there a good place i can confidentially share the logs? The guilty label seems to be the following: the tag policy i set is: tagPolicy:
gitCommit: {} here is an abstract of the log:
actually the One overlay i have looks like this:
I am willing to show my config to someone in a video conf or anything, but i can't send the whole package. Or I need to switch to the google enterprise support portal... |
I take it you are talking about |
yes;
|
So the skaffold image does have a version set (albeit a strange one): docker run --rm -ti gcr.io/k8s-skaffold/skaffold:latest skaffold version \
-o "{{.Version}} {{.GitCommit}} {{.GitTreeState}}" yields
Overall, to me it does not look like |
umm we shd fix that. Sorry about it. |
Hi 👋
First of all, thanks for your work!
I hope this PR meets #2002 expectations 😄
Thanks to @pyaillet for his help 🤗