Skip to content

Mint Vault token before copying Mergify backport labels - #8076

Open
fr4nc1sc0-r4m0n wants to merge 4 commits into
mainfrom
fix/mergify-labels-copier-vault-token
Open

fr4nc1sc0-r4m0n wants to merge 4 commits into
mainfrom
fix/mergify-labels-copier-vault-token

Conversation

@fr4nc1sc0-r4m0n

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Mergify backports of Observability Agentic Workflow sync PRs get oblt-aw/ai/merge-ready from this labels copier, but the label is applied with GITHUB_TOKEN. GitHub does not start new labeled workflow runs from that actor, so automerge never wakes.

Summary

  • Set use-ephemeral-token: true on elastic/oblt-actions/mergify/labels-copier@v1 so the action mints a Vault token and copies labels with it
  • Grant the job id-token: write for OIDC

Depends on: elastic/oblt-actions#1171 merged and released on @v1, plus a catalog-info TokenPolicy for this workflow path, or mint will fail closed.

Validation

  • After the action release and catalog-info policy are live, open or use a mergify/bp/ PR that copies merge-ready
  • Timeline labeled actor is the Vault app (not github-actions[bot])
  • Observability Agentic Workflow — Pull Request runs on that labeled event

Related issue: elastic/oblt-aw#2336

GITHUB_TOKEN label writes do not retrigger pull_request labeled workflows,
so oblt-aw automerge never starts on merge-ready backports.
@mergify

mergify Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @fr4nc1sc0-r4m0n? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The prerequisite Vault TokenPolicy deployment and downstream workflow triggering remain unverified.

No open issues 🎉

What changed in this PR

Updates Mergify backport label copying to use an ephemeral GitHub token so copied labels can trigger downstream automerge workflows.

Changes:

  • Grants OIDC permission to mint a token through Vault.
  • Passes the minted token to the labels-copier action.
File Description
.github/​workflows/​mergify-labels-copier.yml Adds token creation and uses it when copying backport labels.

Review effort: Balanced

mallendem
mallendem previously approved these changes Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

Mint inside labels-copier instead of a separate create-token step.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The published @v1 action does not support the new input, so the upstream release must land or a supported revision must be referenced.

1 open issue

Review effort: Balanced

Comment thread .github/workflows/mergify-labels-copier.yml
Copilot AI balanced review requested due to automatic review settings October 27, 2026 09:40
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n enabled auto-merge (squash) October 27, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human verification is needed to confirm the required action release and TokenPolicy are deployed and copied labels trigger the intended workflow.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Label writes use the Vault token from TokenPolicy; only id-token: write is needed for OIDC.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human verification is needed that the supporting action release and workflow-specific Vault policy are live and copied labels trigger the downstream workflow.

No open issues 🎉

Review effort: Balanced

@fr4nc1sc0-r4m0n

Copy link
Copy Markdown
Contributor Author

Dropped unused pull-requests: write / repository-projects: read from this job — they only apply to GITHUB_TOKEN; with use-ephemeral-token: true, label scopes come from the TokenPolicy, so only id-token: write is needed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants