Skip to content

Conversation

schmichael
Copy link
Member

Back in #24074 I thought it was necessary to wrap labels in a list to support quoted keys in hcl2. This... doesn't appear to be true at all? The simpler labels={...} syntax appears to work just fine.

I updated the docs and a test (and modernized it a bit). I also switched some other examples to the labels = {} format from the old labels{} format.

Description

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

Back in #24074 I thought it was necessary to wrap labels in a list to
support quoted keys in hcl2. This... doesn't appear to be true at all?
The simpler `labels={...}` syntax appears to work just fine.

I updated the docs and a test (and modernized it a bit). I also switched
some other examples to the `labels = {}` format from the old `labels{}`
format.
@schmichael schmichael added the theme/docs Documentation issues and enhancements label Aug 15, 2025
@schmichael schmichael requested a review from a team as a code owner August 15, 2025 22:17
@schmichael schmichael requested a review from a team as a code owner August 15, 2025 22:17
@schmichael schmichael added the theme/testing Test related issues label Aug 15, 2025
@schmichael schmichael requested a review from a team as a code owner August 15, 2025 22:17
no_copy = true
labels = {
label_key = "label_value"
"dotted.keys" = "always work"
Copy link
Member Author

Choose a reason for hiding this comment

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

New entry. (Sorry the new file and formatting makes it hard to spot)

labels = {
owner = "hashicorp-nomad"
key = "val"
"dotted.keys" = "work"
Copy link
Member Author

Choose a reason for hiding this comment

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

New entry. (Sorry the new file and formatting makes it hard to spot)

Copy link
Contributor

@aimeeu aimeeu left a comment

Choose a reason for hiding this comment

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

thanks for updating the docs!

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM

@tgross tgross added backport/website This will backport PR changes to `stable-website` && the latest release-branch backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.8.x backport to 1.8.x release line backport/ent/1.9.x+ent Changes are backported to 1.9.x+ent backport/1.9.x backport to 1.9.x release line backport/1.10.x backport to 1.10.x release line labels Aug 20, 2025
@schmichael schmichael merged commit ee5059a into main Aug 20, 2025
73 of 74 checks passed
@schmichael schmichael deleted the docs-dotted-labels branch August 20, 2025 16:26
schmichael added a commit that referenced this pull request Aug 20, 2025
Backport of just the docs update from #26535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/ent/1.9.x+ent Changes are backported to 1.9.x+ent backport/website This will backport PR changes to `stable-website` && the latest release-branch backport/1.8.x backport to 1.8.x release line backport/1.9.x backport to 1.9.x release line backport/1.10.x backport to 1.10.x release line theme/docs Documentation issues and enhancements theme/driver/docker theme/testing Test related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants