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

client: interpolate meta blocks with task environment #10876

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

tgross
Copy link
Member

@tgross tgross commented Jul 8, 2021

Fixes #6506 so our meta docs are correct.

Adds missing interpolation step to the meta blocks when building the task
environment. Also fixes incorrect parameter order in the test assertion and
adds diagnostics to the test.

Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

In the services version of this, we interpolate both the key and the value of a meta block. Do we want to do the same here?

https://github.com/hashicorp/nomad/blob/main/client/taskenv/services.go#L165

goes to

m[taskEnv.ReplaceEnv(k)] = taskEnv.ReplaceEnv(v)

Adds missing interpolation step to the `meta` blocks when building the task
environment. Also fixes incorrect parameter order in the test assertion and
adds diagnostics to the test.
@tgross tgross force-pushed the b-meta-interpolation branch from 47e8f0b to 1cc1bda Compare July 8, 2021 19:44
Copy link
Member

@shoenig shoenig 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 merged commit d0fb5c8 into main Jul 8, 2021
@tgross tgross deleted the b-meta-interpolation branch July 8, 2021 20:03
@notnoop notnoop mentioned this pull request Jul 28, 2021
notnoop pushed a commit that referenced this pull request Jul 29, 2021
Adds missing interpolation step to the `meta` blocks when building the task
environment. Also fixes incorrect parameter order in the test assertion and
adds diagnostics to the test.
@github-actions
Copy link

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 Nov 15, 2022
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.

Variable interpolation does not work in the meta stanza
3 participants