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

Nomad v2.17.0+tweaks #620

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Nomad v2.17.0+tweaks #620

wants to merge 4 commits into from

Conversation

angrycub
Copy link

This branch applies all of the Nomad tweaks to the v2.17.0 release. This will enable Nomad and Nomad-pack to leverage to the Extra field on Diagnostics.

angrycub added 3 commits July 24, 2023 20:07
Expose a callback to handle unknown variables found in hcl syntax. This is
useful in situations where the variables aren't known statically upfront.

A merge of the following commits:
ccf34c5
eb14f83
@angrycub angrycub added the v2 Relates to the v2 line of releases label Jul 25, 2023
@angrycub angrycub self-assigned this Jul 25, 2023
Comment on lines +104 to +106
if fn, ok := d.bodyConvertors[val.Type()]; ok {
return fn(body, ctx, val.Addr().Interface())
}
Copy link
Author

Choose a reason for hiding this comment

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

Nomad allows for constraint blocks where certain operators can be expressed as LHS constants. For example, the canonical distinct_hosts constraint is written as follows:

constraint {
  operator  = "distinct_hosts"
  value     = "true"
}

However, Nomad supports an alternative representation of this same constraint.

constraint {
    distinct_hosts = true
}

Before re-adding this code, the shortened form would produce the following error.

Unsupported argument; An argument named "distinct_hosts" is not expected here.

Fixes hashicorp/nomad#18122 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Relates to the v2 line of releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant