-
Notifications
You must be signed in to change notification settings - Fork 2k
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
extra_claims job ID without periodic suffix for batch jobs #23798
Comments
🤦 That's embarrassing. It should use the parent job ID when available, just as we do for other job claims. Will fix. |
When we interpolate job fields for the `vault.default_identity.extra_claims` block, we forgot to use the parent job ID when that's available (as we do for all other claims). This changeset fixes the bug and adds a helper method that'll hopefully remind us to do this going forward. Also added a missing changelog entry for #23675 where we implemented the `extra_claims` block originally, which shipped in Nomad 1.8.3. Fixes: #23798
hey @tgross I've run into this as well unfortunately, in my quest to migrate some clusters to workload identity. Do you know more or less when this bug fix will ship? |
I've got a PR up with the fix #23817 but I've been on PTO the last couple weeks. Planning on shipping this in the upcoming Nomad 1.8.4. |
When we interpolate job fields for the `vault.default_identity.extra_claims` block, we forgot to use the parent job ID when that's available (as we do for all other claims). This changeset fixes the bug and adds a helper method that'll hopefully remind us to do this going forward. Also added a missing changelog entry for #23675 where we implemented the `extra_claims` block originally, which shipped in Nomad 1.8.3. Fixes: #23798
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. |
Proposal
Add a
vault.default_identity.extra_claims
interpolation for the job ID that does not include the/periodic-1234567
suffix, the same way thenomad_job_id
does not include it.Currently
${job.id}
looks something like thismy-batch-job-name/periodic-1723556632
and I'd like a variable (perhaps${job.name}
?) that gives me justmy-batch-job-name
Use-cases
Attempted Solutions
Currently available interpolations:
nomad/nomad/structs/workload_id.go
Lines 235 to 252 in 90d646a
Sorry @tgross for not realizing this when the PR was still a PR.
The text was updated successfully, but these errors were encountered: