Skip to content

Don't add skaffold labels by default in render, and deprecate the --add-skaffold-labels flag #5653

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

Merged

Conversation

nkubala
Copy link
Contributor

@nkubala nkubala commented Apr 8, 2021

Fixes: #5542
Related: #5644 (both add the same logic for supporting Deprecated field on flags
Merge before/after: #5644

Description

this change flips our default value for --add-skaffold-labels on skaffold render to false. previously, the skaffold.dev/run-id and app.kubernetes.io/managed-by labels were being added to all manifests hydrated by Skaffold when this flag wasn't explicitly specified, but these labels provide no value to users.

this change also deprecates this flag, since there isn't really a reason for users to be adding these labels to any hydrated resources through Skaffold.

@nkubala nkubala requested a review from a team as a code owner April 8, 2021 22:37
@google-cla google-cla bot added the cla: yes label Apr 8, 2021
@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from b41e6cf to 1c35477 Compare April 13, 2021 17:58
@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #5653 (2222e3f) into master (d14f34d) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #5653    +/-   ##
========================================
  Coverage   70.78%   70.79%            
========================================
  Files         432      436     +4     
  Lines       16242    16356   +114     
========================================
+ Hits        11497    11579    +82     
- Misses       3901     3923    +22     
- Partials      844      854    +10     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/flags.go 89.02% <ø> (ø)
pkg/skaffold/build/jib/init.go 83.05% <0.00%> (-4.45%) ⬇️
pkg/skaffold/color/formatter.go 96.00% <0.00%> (-4.00%) ⬇️
pkg/skaffold/docker/image.go 78.34% <0.00%> (-1.39%) ⬇️
pkg/skaffold/schema/profiles.go 88.46% <0.00%> (-1.15%) ⬇️
pkg/skaffold/build/jib/jib.go 69.46% <0.00%> (-1.08%) ⬇️
pkg/skaffold/parser/config.go 79.56% <0.00%> (-0.13%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
pkg/skaffold/util/tar.go 50.66% <0.00%> (ø)
cmd/skaffold/app/cmd/cmd.go 63.80% <0.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d14f34d...2222e3f. Read the comment docs.

@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from 8573786 to faa4377 Compare April 27, 2021 21:39
@google-cla
Copy link

google-cla bot commented Apr 27, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Apr 27, 2021
@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from faa4377 to ff04697 Compare April 28, 2021 19:19
@google-cla
Copy link

google-cla bot commented Apr 28, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from ff04697 to 1cb5471 Compare April 29, 2021 19:30
@google-cla
Copy link

google-cla bot commented Apr 29, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from 1cb5471 to 347d2b2 Compare April 29, 2021 21:17
@google-cla
Copy link

google-cla bot commented Apr 29, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from 347d2b2 to 8e8c2e8 Compare April 29, 2021 21:43
@google-cla google-cla bot added cla: yes and removed cla: no labels Apr 29, 2021
@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from 8e8c2e8 to 170efb9 Compare April 29, 2021 22:21
@briandealwis
Copy link
Member

@googlebot I consent

@nkubala
Copy link
Contributor Author

nkubala commented Apr 30, 2021

this has got to be the most frustrating CI experience on a PR that i've ever had. i've probably hit the docker pull rate limit two dozen times on various Travis jobs here.

"dev": true,
"debug": true,
"run": true,
},
FlagAddMethod: "BoolVar",
DefinedOn: []string{"render"},
Copy link
Member

@briandealwis briandealwis May 3, 2021

Choose a reason for hiding this comment

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

You need to add dev, debug, and run here. It might make sense to invert the defaults so DevValuePerCommand = { "render": false }.

You should need to regenerate the man pages when changing the defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You need to add dev, debug, and run here.

I just updated this, but after pushing the change I'm thinking we don't actually want to define this for dev/debug/run here - do we really want this flag to be available for use on those commands? skaffold won't work correctly if the user messes with it.

It might make sense to invert the defaults so DevValuePerCommand = { "render": false }.

regardless of my above comment, agree with this

You should need to regenerate the man pages when changing the defaults.

I think we also don't need to do this, since this flag is Deprecated it won't show up in the help text.

@pull-request-size pull-request-size bot added size/M and removed size/S labels May 3, 2021
@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from 11881af to 1fae845 Compare May 3, 2021 21:12
@pull-request-size pull-request-size bot added size/S and removed size/M labels May 3, 2021
@nkubala nkubala force-pushed the deprecate-render-skaffold-labels branch from a5f1818 to 2222e3f Compare May 5, 2021 17:43
@nkubala nkubala merged commit e4d0146 into GoogleContainerTools:master May 5, 2021
@nkubala nkubala deleted the deprecate-render-skaffold-labels branch May 5, 2021 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider not adding Skaffold labels by default in render
2 participants