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

multiple policy blocks in a scaling block should result in an error #7716

Closed
cgbaker opened this issue Apr 14, 2020 · 1 comment · Fixed by #7788
Closed

multiple policy blocks in a scaling block should result in an error #7716

cgbaker opened this issue Apr 14, 2020 · 1 comment · Fixed by #7788
Assignees
Milestone

Comments

@cgbaker
Copy link
Contributor

cgbaker commented Apr 14, 2020

Nomad version

0.11.0

Issue

the job parser is merging multiple policy blocks in a scaling block. it should probably throw an error in this case. this loop should be replaced by a simple conditional:

if o := listVal.Filter("policy"); len(o.Items) > 0 {
for _, o := range o.Elem().Items {
var m map[string]interface{}
if err := hcl.DecodeObject(&m, o.Val); err != nil {
return err
}
if err := mapstructure.WeakDecode(m, &result.Policy); err != nil {
return err
}
}

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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 Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants