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

parsing should error if scaling block includes multiple policy blocks #7788

Merged
merged 2 commits into from
Apr 23, 2020

Conversation

cgbaker
Copy link
Contributor

@cgbaker cgbaker commented Apr 23, 2020

resolves #7716

updated scaling policy parsing so that multiple policy blocks result in an error (previously, they were merged). also expanded testing to make sure that a minimal block doesn't return an error (these checks are performed later during job validation)

…block

also, check that parsing a minimal scaling block doesn't throw any errors
@cgbaker cgbaker requested a review from jrasell April 23, 2020 12:41
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Tiny suggestion to the CHANGELOG entry, otherwise looks excellent .

BUG FIXES:

* api: autoscaling policies should not be returned for stopped jobs [[GH-7768](https://github.com/hashicorp/nomad/issues/7768)]
* jobspec: autoscaling policy block should return a parsing error multiple `policy` blocks are provided [[GH-7716](https://github.com/hashicorp/nomad/issues/7716)]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* jobspec: autoscaling policy block should return a parsing error multiple `policy` blocks are provided [[GH-7716](https://github.com/hashicorp/nomad/issues/7716)]
* jobspec: autoscaling policy block should return a parsing error when multiple `policy` blocks are provided [[GH-7716](https://github.com/hashicorp/nomad/issues/7716)]

@cgbaker cgbaker merged commit 3a5cfda into master Apr 23, 2020
@cgbaker cgbaker deleted the b-7716-scaling-policy-parsing branch April 23, 2020 13:57
@github-actions
Copy link

github-actions bot commented Jan 9, 2023

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 Jan 9, 2023
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.

multiple policy blocks in a scaling block should result in an error
2 participants