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

Backport of cli: fix panic on job plan when -diff=false into release/1.5.x #16951

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #16944 to be assessed for backporting due to the inclusion of the label backport/1.5.x.

The below text is copied from the body of the original PR.


PR #14492 introduced a new check to return 0 when the nomad job plan command returns a diff of type None.

But the -diff CLI flag was also being used to control whether the plan request should return the diff of not instead of just controlling if the diff was printed.

This means that when -diff=false is set the response does not include any diff information, and so the new check panics.

This commit fixes the problem by always requesting a diff and using the -diff only for controlling output, as it's currently documented.

Closes #16939

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-fix-panic-on-job-plan/happily-merry-emu branch from 5ef2f31 to 3e5baed Compare April 21, 2023 00:33
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 089e09f into release/1.5.x Apr 21, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-fix-panic-on-job-plan/happily-merry-emu branch April 21, 2023 00:33
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.

2 participants