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

job parsing: fix panic when variable validation is missing condition #16018

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

tgross
Copy link
Member

@tgross tgross commented Feb 1, 2023

Fixes #12513


Test using the example jobspec from #12513:

$ nomad job run -var 'image_id=foo-' example.nomad
Error getting job struct: Error parsing job file from example.nomad:
example.nomad:5,14-14: Missing required argument; The argument "condition" is required, but no definition was found.
example.nomad:5,3-13: Invalid variable validation specification; validation requires a condition.

@tgross tgross requested a review from shoenig February 1, 2023 21:11
@tgross tgross added this to the 1.5.0 milestone Feb 1, 2023
@tgross tgross added backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line type/bug theme/crash labels Feb 1, 2023
@tgross tgross force-pushed the b-cli-missing-condition-panic branch from ddbd9c3 to 8c85475 Compare February 1, 2023 21:14
Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line theme/crash type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jobspec using validation with missing constraint causes panic
2 participants