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: bugs for skaffold.yaml files read in via stdin #6970

Merged

Conversation

aaron-prindle
Copy link
Contributor

This fix modifies the behavior for 2 pieces of how skaffold.yaml's read in via stdin work:

  1. Makes it so that the SourceFile field for a SkaffoldConfigEntry is - for files read in via stdin instead of /abs/path/skaffold.yaml/- which is what the value is currently.
  2. Makes it so that util.ReadConfiguration is idempotent for skaffold.yaml files read in via stdin by storing the []byte from os.Stdin that are read in. Currently once the Reader that is os.Stdin is read, subsequent calls to util.ReadConfiguration are empty for stdin skaffold.yaml files

These changes are required for supporting stdin for skaffold.yaml's with the line # support that #6955 provides

@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #6970 (c2454e9) into main (290280e) will decrease coverage by 1.70%.
The diff coverage is 56.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6970      +/-   ##
==========================================
- Coverage   70.48%   68.77%   -1.71%     
==========================================
  Files         515      551      +36     
  Lines       23150    25368    +2218     
==========================================
+ Hits        16317    17447    +1130     
- Misses       5776     6738     +962     
- Partials     1057     1183     +126     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/dev.go 84.61% <0.00%> (ø)
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_tests.go 62.50% <14.28%> (-1.14%) ⬇️
cmd/skaffold/app/cmd/lsp.go 28.12% <28.12%> (ø)
cmd/skaffold/app/cmd/fix.go 68.85% <40.00%> (-7.62%) ⬇️
cmd/skaffold/app/cmd/lint.go 42.85% <42.85%> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/skaffold.go 76.19% <70.00%> (-8.43%) ⬇️
... and 177 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 cb636a8...c2454e9. Read the comment docs.

Copy link
Contributor

@MarlonGamez MarlonGamez left a comment

Choose a reason for hiding this comment

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

lgtm

@aaron-prindle aaron-prindle merged commit 7ccebe5 into GoogleContainerTools:main Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants