Skip to content

fix: ensure run-id is added to resources in skaffold apply #6674

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
merged 2 commits into from
Oct 5, 2021

Conversation

nkubala
Copy link
Contributor

@nkubala nkubala commented Oct 4, 2021

Fixes: #6657

Description
This change ensures that we add the skaffold.dev/run-id labels to all resources created in skaffold apply. This was not happening before this change, as the --add-skaffold-labels flag was not defined on the apply subcommand, causing the value to default to false.

The --add-skaffold-labels flag was deprecated in #5653 on May 5, 2021, putting us at just over 5 months since deprecation. Our deprecation policy would mandate a 6 month period, but I would propose an exception to this rule as this is the correct way to address this issue, and is a scenario that does not "fit neatly into this policy": https://skaffold.dev/docs/references/deprecation/#exceptions

As a result of this change, we will now always apply and skaffold-specific labels in Skaffold, with the exception of during skaffold render in which we will never apply them.

@nkubala nkubala requested a review from a team as a code owner October 4, 2021 22:36
@nkubala nkubala requested a review from MarlonGamez October 4, 2021 22:36
@google-cla google-cla bot added the cla: yes label Oct 4, 2021
Copy link
Contributor

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm, with nit.

@nkubala nkubala force-pushed the remove-add-labels branch from 3888af7 to b28c63a Compare October 5, 2021 16:50
@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #6674 (fa32d85) into main (290280e) will decrease coverage by 0.70%.
The diff coverage is 35.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6674      +/-   ##
==========================================
- Coverage   70.48%   69.78%   -0.71%     
==========================================
  Files         515      523       +8     
  Lines       23150    23834     +684     
==========================================
+ Hits        16317    16632     +315     
- Misses       5776     6114     +338     
- Partials     1057     1088      +31     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/flags.go 89.00% <0.00%> (-1.82%) ⬇️
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
pkg/diag/recommender/container_errors.go 0.00% <0.00%> (ø)
pkg/diag/validator/pod.go 1.32% <0.00%> (ø)
pkg/skaffold/build/buildpacks/logger.go 0.00% <ø> (ø)
pkg/skaffold/build/cluster/logs.go 0.00% <ø> (-16.67%) ⬇️
cmd/skaffold/app/cmd/cmd.go 70.32% <66.66%> (-0.73%) ⬇️
pkg/diag/validator/resource.go 47.05% <66.66%> (ø)
cmd/skaffold/app/cmd/debug.go 100.00% <100.00%> (ø)
pkg/skaffold/build/buildpacks/lifecycle.go 83.59% <100.00%> (ø)
... and 82 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 f15f502...fa32d85. Read the comment docs.

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.

apply and deploy are not checking deployment health
2 participants