docker / docker/buildx

poor error message for invalid syntax on secret

Open
#1,183 2 comments 0 reactions 1 assignee View on GitHub

@crazy-max is already working on this.

Since Jun 24, 2022.

kind/enhancement
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

The error message emitted by buildx if the syntax is invalid is not as good as it could be. It does not state that it is the secret itself that is at error, but rather it states something about the value of the secret.

Example

target "x" {
...
  secret = [ "foo,bar=123" ]
}
error: invalid field 'foo' must be a key=value pair

This is not really helpful here. What field "foo"? A more helpful error message would explain that the secret in target "x" must be a string on the form "[id=value,]src=path/to/secret".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.