docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

Better error messages when using unsupported compose file syntax #651

Closed jcsirot closed 5 years ago

jcsirot commented 5 years ago

- What I did Docker App prints a more specific error messages when the template uses one of these compose file syntax

- A picture of a cute animal (not mandatory but encouraged) Hawaiian_bobtail_squid04 img_assist_custom

codecov[bot] commented 5 years ago

Codecov Report

Merging #651 into master will decrease coverage by 0.04%. The diff coverage is 87.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #651      +/-   ##
==========================================
- Coverage   72.19%   72.14%   -0.05%     
==========================================
  Files          51       52       +1     
  Lines        2658     2675      +17     
==========================================
+ Hits         1919     1930      +11     
- Misses        490      497       +7     
+ Partials      249      248       -1
Impacted Files Coverage Δ
internal/commands/root.go 72.11% <0%> (ø) :arrow_up:
internal/store/bundle.go 71% <100%> (ø) :arrow_up:
internal/commands/image/list.go 81.81% <100%> (-1.79%) :arrow_down:
internal/yaml/yaml.go 80% <100%> (ø) :arrow_up:
internal/commands/image/command.go 100% <100%> (ø) :arrow_up:
internal/commands/image/rm.go 61.29% <83.33%> (-8.48%) :arrow_down:
internal/commands/image/tag.go 88.23% <88.23%> (ø)
types/parameters/parameters.go 92.06% <0%> (-4.77%) :arrow_down:

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 fb71be0...994bc0d. Read the comment docs.

GordonTheTurtle commented 5 years ago

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "composefile-syntax-improved-error-messages" git@github.com:jcsirot/docker-app.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354106912
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

silvin-lubecki commented 5 years ago

@jcsirot can you squash?

jcsirot commented 5 years ago

@silvin-lubecki done

silvin-lubecki commented 5 years ago

@jcsirot I see that the errors are capitalised which I thought was against Go best practices. @silvin-lubecki what do we do in the CLI?

You are right @chris-crone nice catch. Indeed the docker/cli error messages are not capitalized.

jcsirot commented 5 years ago

@chris-crone @silvin-lubecki Here the error message is composed of several sentences ending with ponctuation. So maybe we should keep it capitalised?