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: Sanitize image names when default repo unset #6678

Merged

Conversation

halvards
Copy link
Contributor

@halvards halvards commented Oct 5, 2021

Description
This change ensures that image names from skaffold.yaml are sanitized even when the Skaffold default repo is not set.

This is relevant for ko images with names that consist of the ko:// scheme prefixed, followed by a Go import path that may contain uppercase characters, e.g., ko://github.com/GoogleContainerTools/skaffold/cmd/skaffold.

Fixes: #6675
Tracking: #6041
Related: #4952

This change ensures that image names from `skaffold.yaml` are sanitized
even when the Skaffold default repo is not set.

This is relevant for ko images with names that consist of the `ko://`
scheme prefixed, followed by a Go import path that may contain uppercase
characters, e.g.,
`ko://github.com/GoogleContainerTools/skaffold/cmd/skaffold`.

Fixes: GoogleContainerTools#6675
Tracking: GoogleContainerTools#6041
Related: GoogleContainerTools#4952
@halvards halvards requested a review from a team as a code owner October 5, 2021 12:18
@halvards halvards requested a review from tejal29 October 5, 2021 12:18
@google-cla google-cla bot added the cla: yes label Oct 5, 2021
@halvards halvards added the kokoro:run runs the kokoro jobs on a PR label Oct 5, 2021
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Oct 5, 2021
@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #6678 (752edc8) into main (290280e) will decrease coverage by 0.68%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6678      +/-   ##
==========================================
- Coverage   70.48%   69.80%   -0.69%     
==========================================
  Files         515      523       +8     
  Lines       23150    23834     +684     
==========================================
+ Hits        16317    16637     +320     
- Misses       5776     6112     +336     
- Partials     1057     1085      +28     
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%> (ø)
pkg/skaffold/build/docker/docker.go 86.44% <66.66%> (-2.85%) ⬇️
pkg/skaffold/build/docker/errors.go 63.33% <80.00%> (-2.23%) ⬇️
... and 85 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...752edc8. Read the comment docs.

@tejal29 tejal29 merged commit 86da7e7 into GoogleContainerTools:main Oct 5, 2021
@halvards halvards deleted the ko-scheme-prefix-no-default-repo branch October 5, 2021 23:17
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.

Image name not sanitized when default repo is unset
3 participants