Repository navigation
[CI] mqttv5 ADR namespace repair: reuse role assignments inherited from the resource group - #412
Merged
Ewerton Scaboro da Silva (ewertons) merged 1 commit intoOct 11, 2026
Conversation
…om the resource group Role assignments scoped to the namespace are removed with it; assignments on the resource group survive. Skip a grant when an assignment of the same role to the same principal exists at the target scope or above, so the job needs only Contributor when the grants are made once on the resource group. A grant that is missing and cannot be created fails with a message saying so.
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 11, 2026 07:24
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The lookup correctly includes ancestor assignments and filters out unrelated descendant scopes.
0 open findings
What changed in this PR
Updates ADR namespace repair to reuse inherited role assignments, reducing required CI permissions.
Changes:
- Detects applicable role assignments at target or ancestor scopes.
- Fails immediately with actionable guidance when assignment creation is unauthorized.
- Documents revised OIDC permission requirements.
| File | Description |
|---|---|
c/eng/e2e-mqttv5-adr-namespace.ps1 |
Reuses inherited assignments and improves authorization failure handling. |
c/docs/eng/end-to-end-tests.md |
Documents resource-group grants and CI permissions. |
.github/workflows/ci-c-e2e-mqttv5-adr-namespace.yml |
Updates workflow permission guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ewerton Scaboro da Silva (ewertons)
deleted the
ci/mqttv5-adr-inherited-grants
branch
October 11, 2026 07:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Role assignments scoped to the ADR namespace are deleted with it; the repair job then needs role-assignment write to recreate them, which the CI identity may not be allowed to have.
c/eng/e2e-mqttv5-adr-namespace.ps1: before granting, look up assignments of the role to the principal at the target scope or any parent; skip if present. A missing grant that cannot be created (AuthorizationFailed) fails at once with a message to grant it on the resource group.end-to-end-tests.md: the identity needs Contributor on the resource group; role assignment write only if the link's grants are not on the resource group (or the namespace identity changes).Validation: script run with a stubbed
az(all grants inherited: no creates; one missing and denied: fails with that message); scope match checked against sibling/parent scopes; actionlint and zizmor clean.