Skip to content
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

jobspec2: ensure consistent error handling between var-file & var. #11165

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented Sep 9, 2021

As per Nomad documentation, all variables used within a job specification must be defined via a variable block within the job specification file. Attempting to perform an override on a variable that doesn't exist will result in a parse error. This change fixes the behaviour, so there is consistency no matter where the override came.

closes #11149

@jrasell jrasell self-assigned this Sep 9, 2021
@hashicorp-cla
Copy link

hashicorp-cla commented Sep 9, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@isabeldepapel isabeldepapel left a comment

Choose a reason for hiding this comment

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

LGTM

@jrasell jrasell added this to the 1.2.0 milestone Sep 10, 2021
@apollo13
Copy link
Contributor

apollo13 commented Sep 27, 2021

While this fixes a "bug" it will also break for all the users relying on the current behavior. Would it be possible to only merge this if an escape hatch (command line flag to allow lenient parsing) is also supplied in the same release?

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HCL2 variables behave differently when passed via -var and -var-file
5 participants