Skip to content

fix(dev): stop transient stg-global V2 racing the shared rollout for Entra apps - #6323

Merged
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
raelga:rael/stg2-geneva-mise-coexist
Jul 30, 2026
Merged

fix(dev): stop transient stg-global V2 racing the shared rollout for Entra apps#6323
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
raelga:rael/stg2-geneva-mise-coexist

Conversation

@raelga

@raelga raelga commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Jira: AROSLSRE-1653

What

Stop the transient stg-global "V2" rollout (serviceGroup Microsoft.Azure.ARO.HCP.Global.StgGlobal) from managing the environment-scoped Entra apps that the canonical stg global rollout also manages:

  • configurations/geneva-identities-stg.tmpl.bicepparam: hardcode genevaActionApplicationManage = false (this bicepparam is V2-only).
  • configurations/mise-identity-stg.tmpl.bicepparam: new V2-only bicepparam with miseApplicationDeploy = false (the original mise-identity.tmpl.bicepparam is shared with the canonical global-pipeline.yaml, so it cannot be edited in place).
  • global-pipeline-stg.yaml: point the mise-identity step at the new -stg bicepparam.

Why

Both the canonical stg global rollout and this transient V2 rollout run the geneva-identities and mise-identity ARM steps, which manage the same env-scoped Entra apps arohcp-ga-stg and arohcp-mise-stg (created via the Microsoft Graph bicep extension) with the same fixed entraAppOwnerIds. So app ownership races between the two rollouts: whichever runs last owns the app, and the other rollout's deploy identity (which only holds Application.ReadWrite.OwnedBy) then fails to manage it with Authorization_RequestDenied: Insufficient privileges ... Target: /resources/entraApp.

This is a regression, not a permanent permission gap. The V2 rollout ran these two steps successfully on 2026-07-23 (rollout c4ef4d6d) while it owned the apps, then failed on 2026-07-29 (rollout 2b50cb98) once ownership had moved to the canonical rollout.

The V2 global rollout does not consume either app: no step declares dependsOn on them and neither bicep template has outputs. The only MISE consumer is the regular stg svc rollout, which looks up arohcp-mise-stg independently. So the V2 rollout has no reason to manage these apps. With the params off, both ARM steps become empty no-op deployments that succeed, ending the tug-of-war without any tenant-admin Graph grant. This mirrors the coexistence handling already used for grafana-group-roles.

Revisit (app ownership / cleanup) when arohcp-stg is decommissioned.

Testing

make validate-changed-config-pipelines passes (validates the changed global-pipeline-stg.yaml and its bicepparam references). Confirmed the new mise bicepparam matches all params declared in templates/mise-identity.bicep.

Copilot AI review requested due to automatic review settings July 29, 2026 23:54
@openshift-ci
openshift-ci Bot requested review from sclarkso and weherdh July 29, 2026 23:54

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.

Pull request overview

This PR updates the stg-global V2 coexistence deployment pipeline to avoid re-managing environment-scoped Entra apps that are already owned by the shared (canonical) stg global rollout, preventing Microsoft Graph Authorization_RequestDenied failures when the V2 deploy identity lacks app-write permissions.

Changes:

  • Point the mise-identity ARM step in global-pipeline-stg.yaml to a new V2-only bicepparam file.
  • Add mise-identity-stg.tmpl.bicepparam that disables MISE Entra app deployment during coexistence (miseApplicationDeploy = false).
  • Hardcode genevaActionApplicationManage = false in geneva-identities-stg.tmpl.bicepparam to skip Geneva Actions Entra app management during coexistence.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
dev-infrastructure/global-pipeline-stg.yaml Switches the mise-identity step to use the new stg-global V2-specific bicepparam file.
dev-infrastructure/configurations/mise-identity-stg.tmpl.bicepparam New V2-only param file that disables deploying the environment-scoped MISE Entra app during coexistence.
dev-infrastructure/configurations/geneva-identities-stg.tmpl.bicepparam Forces Geneva Actions Entra app management off during coexistence to avoid Graph permission failures.

…Entra apps

The transient StgGlobal (V2) global rollout re-runs the geneva-identities
and mise-identity ARM steps, which manage the environment-scoped Entra apps
arohcp-ga-stg and arohcp-mise-stg via the Microsoft Graph bicep extension.
The canonical stg global rollout manages the same two apps with the same
fixed entraAppOwnerIds, so ownership races between the two rollouts: whichever
runs last owns the app, and the other rollout's deploy identity (which only
holds Application.ReadWrite.OwnedBy) then fails to manage it with
Authorization_RequestDenied. This is a regression: the V2 rollout succeeded
on these steps on 2026-07-23 (rollout c4ef4d6d) while it owned the apps, then
failed on 2026-07-29 (rollout 2b50cb98) once ownership had moved.

The V2 global rollout does not consume either app (no dependsOn, no bicep
outputs; the stg svc rollout looks up arohcp-mise-stg independently), so it
has no reason to manage them. Set genevaActionApplicationManage=false on the
V2-only geneva bicepparam and add a V2-only mise bicepparam with
miseApplicationDeploy=false (the original mise bicepparam is shared with the
canonical global pipeline, so it cannot be edited in place). Both ARM steps
become empty no-op deployments that succeed, ending the tug-of-war.

This mirrors the coexistence handling already used for grafana-group-roles.
Revisit at arohcp-stg decommission.
@raelga
raelga force-pushed the rael/stg2-geneva-mise-coexist branch from 0020c1e to 45b7222 Compare July 30, 2026 00:24
Copilot AI review requested due to automatic review settings July 30, 2026 00:24
@raelga raelga changed the title fix(dev): skip Entra app management on transient stg-global V2 during coexistence fix(dev): stop transient stg-global V2 racing the shared rollout for Entra apps Jul 30, 2026

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

dev-infrastructure/configurations/geneva-identities-stg.tmpl.bicepparam:16

  • The file header comment says this V2 bicepparam is identical to the canonical file except for sourcing Key Vault names from stgGlobalV2, but this PR also hardcodes genevaActionApplicationManage=false for coexistence. Please update the header comment so future readers don't miss this behavioral difference.
param genevaActionApplicationManage = false

@venkateshsredhat

Copy link
Copy Markdown
Collaborator

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: raelga, venkateshsredhat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@raelga

raelga commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Validated locally that this renders in EV2 resolve mode (the dimension ARO-HCP CI doesn't cover).

Ran the sdp-pipelines EV2RA generator the same way the ADO "Generate Ev2 Manifests" step does, in resolve mode where every config reference becomes a __path.to.value__ dunder string, against this PR's merge commit 45b7222d0566 and the full Microsoft.Azure.ARO.HCP.Global entrypoint (all service groups):

aro ev2 manifests test --output-format resolve   # Global entrypoint, resolve mode
...
PASS  Renders in EV2 resolve mode - should pass sdp-pipelines EV2 generation.

No failed to preprocess, no range can't iterate over __...__, no can't evaluate errors. So the geneva/mise bicepparam changes are safe for the sdp-pipelines manifest generation step.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 52090fd into Azure:main Jul 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants