Skip to content

fix(find-configs): log skaffold.yaml parsing errors at debug #6748

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

briandealwis
Copy link
Member

Log any errors in skaffold find-configs at debug level to enable diagnosing why a skaffold.yaml is not being recognized.

cc: @peterlin741

@briandealwis briandealwis requested a review from a team as a code owner October 19, 2021 18:46
@briandealwis briandealwis requested a review from tejal29 October 19, 2021 18:46
@google-cla google-cla bot added the cla: yes label Oct 19, 2021
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #6748 (47d7201) into main (290280e) will decrease coverage by 0.78%.
The diff coverage is 65.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6748      +/-   ##
==========================================
- Coverage   70.48%   69.69%   -0.79%     
==========================================
  Files         515      536      +21     
  Lines       23150    24311    +1161     
==========================================
+ Hits        16317    16944     +627     
- Misses       5776     6251     +475     
- Partials     1057     1116      +59     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/flags.go 89.00% <0.00%> (-1.82%) ⬇️
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/cmd/lint.go 52.94% <52.94%> (ø)
cmd/skaffold/app/cmd/cmd.go 70.49% <75.00%> (-0.57%) ⬇️
cmd/skaffold/app/cmd/debug.go 100.00% <100.00%> (ø)
cmd/skaffold/app/cmd/runner.go 64.17% <100.00%> (ø)
cmd/skaffold/app/flags/image.go 76.27% <100.00%> (+3.72%) ⬆️
... and 122 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 23f65f2...47d7201. Read the comment docs.

@@ -88,7 +89,16 @@ func findConfigs(directory string) (map[string]string, error) {
}

err := walk.From(directory).When(isYaml).Do(func(path string, _ walk.Dirent) error {
if cfgs, err := schema.ParseConfig(path); err == nil && len(cfgs) > 0 {
if ctx.Err() != nil {
return ctx.Err()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we return an actionable error here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I only added to fast-exit should the context be cancelled.

@briandealwis briandealwis force-pushed the log-findconfigs-errors branch from 05f5788 to 47d7201 Compare October 29, 2021 03:00
@briandealwis briandealwis enabled auto-merge (squash) October 29, 2021 03:00
@briandealwis briandealwis merged commit d655137 into GoogleContainerTools:main Nov 1, 2021
@briandealwis briandealwis deleted the log-findconfigs-errors branch November 1, 2021 19:14
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.

2 participants