Improve compose validation errors #492
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When trying to substitute an env var for a value in a recipe config file, abra sometimes gives an error like:
FATA[0000] unable to validate recipe: error while interpolating services.ssh.ports.[].published: failed to cast to expected type: strconv.Atoi: parsing "": invalid syntax caller="/drone/src/cli/internal/validate.go:71 ValidateRecipe" stack="/drone/src/cli/internal/validate.go:71
Steps to reproduce:
Create a recipe with a compose file that includes, for example, a section with
Run
abra app new mynewrecipe
Get error
Thanks for the report @marlon ! I'm not super familiar with Go but it seems
Atoi
is trying to cast to an integer; maybe it would help to provide a default e.g.published: ${PORT:-22}
?Yeh @marlon I think @3wordchant hit the nail on the head here. Also you can check that you're threading the
PORT=...
through in the.env
file also?In the same spirit as #525 I think we should try to catch these errors and reinterpret them to something that someone who doesn't know internals can make sense of.
valid env variable substitution in compose file throws an errorto Improve compose validation errors