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

populate Nomad token for task runner update hooks #16266

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Feb 27, 2023

Fixes #16259

The TaskUpdateRequest struct we send to task runner update hooks was not populating the Nomad token that we get from the task runner (which we do for the Vault token). This results in task runner hooks like the template hook overwriting the Nomad token with the zero value for the token. This causes in-place updates of a task to break templates (but not other uses that rely on identity but don't currently bother to update it, like the identity hook).

@tgross tgross added this to the 1.5.0 milestone Feb 27, 2023
@tgross tgross requested a review from jrasell February 27, 2023 15:12
The `TaskUpdateRequest` struct we send to task runner update hooks was not
populating the Nomad token that we get from the task runner (which we do for the
Vault token). This results in task runner hooks like the template hook
overwriting the Nomad token with the zero value for the token. This causes
in-place updates of a task to break templates (but not other uses that rely on
identity but don't currently bother to update it, like the identity hook).
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.

LGTM!

@tgross tgross merged commit f619b0b into main Feb 27, 2023
@tgross tgross deleted the task-update-nomad-token branch February 27, 2023 15:48
philrenaud pushed a commit that referenced this pull request Mar 14, 2023
The `TaskUpdateRequest` struct we send to task runner update hooks was not
populating the Nomad token that we get from the task runner (which we do for the
Vault token). This results in task runner hooks like the template hook
overwriting the Nomad token with the zero value for the token. This causes
in-place updates of a task to break templates (but not other uses that rely on
identity but don't currently bother to update it, like the identity hook).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.4.x backport to 1.4.x release line theme/template type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jobs with Nomad Variables are always broken by canary deployments
2 participants