Skip to content

Conversation

@luca-nardelli
Copy link

This PR enhances the error reporting while interpolating by providing a default error message for mandatory variables when they are not set. The default error message corresponds to the name of the variable itself, so it's easier to point out where the issue is.

I have updated the relevant test accordingly.

This was a quick wordaround to get the variable name in the error message, but if you have other ideas for formatting the error please let me know and I'll see what I can do!

Signed-off-by: Luca Nardelli [email protected]

Resolves #7504

Add default value before raising UnsetRequiredSubstitution

Signed-off-by: Luca Nardelli <[email protected]>
@luca-nardelli luca-nardelli force-pushed the improve-mandatory-variables-issues branch from 6e4e8ec to d51249a Compare October 15, 2020 07:55
Copy link
Contributor

@aiordache aiordache left a comment

Choose a reason for hiding this comment

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

LGTM! @ulyssessouza ?

Copy link
Contributor

@ulyssessouza ulyssessouza left a comment

Choose a reason for hiding this comment

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

LGTM

@aiordache aiordache added this to the 1.28.0 milestone Dec 2, 2020
@aiordache aiordache merged commit f1059d7 into docker:master Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Missing mandatory value" error is imprecise/bloated

3 participants