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

jobspec: expose the hcl2 strict config parameter for user toggling #11164

Closed
jrasell opened this issue Sep 9, 2021 · 2 comments · Fixed by #11284
Closed

jobspec: expose the hcl2 strict config parameter for user toggling #11164

jrasell opened this issue Sep 9, 2021 · 2 comments · Fixed by #11284
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/hcl theme/jobspec type/enhancement

Comments

@jrasell
Copy link
Member

jrasell commented Sep 9, 2021

When running plan/run/validate commands on job specification files that use hclv2 rendering, users may wish to pass generic variables files which include variables not used by the job. Currently, Nomad parsing with return an error as override variables must be matched with a variable definition in the job specification file.

Internally, the jobspec2 parsing includes a strict config parameter which can defined whether these undefined variable occurrences are treated as an error or a warning. This currently is not exposed to users to change the behaviour, however, should be considered, to cover such use cases.

Opened as a result of discussion within #11149

@jrasell jrasell added type/enhancement theme/cli theme/jobspec theme/hcl stage/accepted Confirmed, and intend to work on. No timeline committment though. labels Sep 9, 2021
@jrasell jrasell added this to Needs Triage in Nomad - Community Issues Triage via automation Sep 9, 2021
@jrasell jrasell moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Sep 9, 2021
@apollo13
Copy link
Contributor

apollo13 commented Sep 9, 2021

Thanks for opening this. I am wondering if changing the default to strict=false and not adding a cli option would be an option. More code means more complexity and personally I cannot imagine that people rely on the behavior of strict=true.

If you think simply changing the default is not an option, please let me know how the env variable / cli flag should be named and I'll try to come up with a PR.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/hcl theme/jobspec type/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants