refactor(dev-infrastructure): read per-region acr replication state via configRef - #6400
Merged
openshift-merge-bot[bot] merged 3 commits intoAug 4, 2026
Conversation
…r own script folder (AROSLSRE-1699) Point ocp-acr-replication, svc-acr-replication, cs-postgres-access, and maestro-postgres-access at their own scripts/<name> subfolder instead of the repo root, matching the pattern already used by housekeeping, upgrade-aks-cluster, oidc-storage-setup, cleanup-prometheus-pvc, and istio-upgrade. workingDir stays non-empty (required for EV2's scoped-package archiving, unsetting it breaks EV2), but the archive is now limited to the step's own script directory instead of the whole repo. This lets the incremental-rollout content-hash actually reflect that script's inputs, instead of effectively depending on the entire monorepo's content. command is updated to be relative to the new workingDir.
…own script folder (AROSLSRE-1699) Same fix as the acr-replication/postgres-access steps: point workingDir at scripts/grafana-group-roles instead of the repo root, so the EV2 package archive and incremental-rollout cache key actually reflect this step's own inputs.
…ia configRef (AROSLSRE-1699) Replace acr.ocp.regionEndpointDisabledRegions (a single global space-separated list of regions, checked for membership in the CLI) with acr.ocp.replicationState (a per-region boolean), threaded to the ocp-acr-replication step as REPLICATION_STATE. Each region now carries its own desired replication endpoint state via the normal region-override config mechanism (config.msft.clouds-overlay.yaml regions.<name>.acr.ocp.replicationState), the same pattern already used for other per-region overrides like kusto.location. The Go CLI reads REPLICATION_STATE directly and acts on it idempotently, instead of parsing a list and checking region membership. eastus2euap keeps its override (regionEndpointDisabledRegions: 'eastus2euap' -> regions.eastus2euap.acr.ocp.replicationState: false), everything else defaults to enabled (true). Suggested by Steve K. as a config-shape simplification during review of PR Azure#6369.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies per-region ACR replica regional data-endpoint control by replacing the global acr.ocp.regionEndpointDisabledRegions list with a per-region boolean acr.ocp.replicationState, passed into the acr-replication Go helper as REPLICATION_STATE.
Changes:
- Update
dev-infrastructure/scripts/acr-replicationto readREPLICATION_STATE(strconv.ParseBool) and treat it as the desired endpoint-enabled state (defaulttruewhen unset). - Thread
acr.ocp.replicationStateinto theocp-acr-replicationpipeline step asREPLICATION_STATE, and remove the old disabled-regions list wiring. - Migrate config defaults/schema/overlays and re-materialize rendered dev configs to the new
replicationStatefield.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dev-infrastructure/svc-pipeline.yaml | Runs postgres-access from its script directory (consistent with buildStep output location). |
| dev-infrastructure/scripts/acr-replication/main.go | Replaces disabled-region list parsing with REPLICATION_STATE boolean parsing + defaulting. |
| dev-infrastructure/scripts/acr-replication/main_test.go | Updates unit tests for REPLICATION_STATE true/false and adds invalid-value coverage. |
| dev-infrastructure/region-pipeline.yaml | Passes REPLICATION_STATE from acr.ocp.replicationState and runs acr-replication from its script directory. |
| dev-infrastructure/global-pipeline-stg.yaml | Runs grafana-group-roles from its script directory (consistent with buildStep output location). |
| config/rendered/dev/pers/westus3.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/rendered/dev/perf/westus3.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/rendered/dev/dev/westus3.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/rendered/dev/cspr/westus3.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/rendered/dev/ci01/centralus.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/rendered/dev/ci00/centralus.yaml | Materialized config: replaces old list field with replicationState: true. |
| config/config.yaml | Updates defaults and documentation from list-based config to boolean replicationState. |
| config/config.schema.json | Updates schema: replaces string list field with boolean replicationState. |
| config/config.msft.clouds-overlay.yaml | Adds per-region override setting replicationState: false for eastus2euap in public/prod. |
Collaborator
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
What
Replace
acr.ocp.regionEndpointDisabledRegions(a single global space-separated list of regions, checked for membership in the CLI) withacr.ocp.replicationState(a per-region boolean), threaded to theocp-acr-replicationstep asREPLICATION_STATE.Each region now carries its own desired replication endpoint state via the normal region-override config mechanism (
config.msft.clouds-overlay.yamlregions.<name>.acr.ocp.replicationState), the same pattern already used for other per-region overrides likekusto.location. The CLI readsREPLICATION_STATEdirectly and acts on it idempotently, instead of parsing a list and checking region membership.eastus2euapkeeps its override (regionEndpointDisabledRegions: 'eastus2euap'->regions.eastus2euap.acr.ocp.replicationState: false); every other region defaults to enabled (true).Why
Suggested by Steve K. during review of #6369 as a config-shape simplification: a per-region scalar is simpler to read and override than a global list the CLI has to parse and match against the current region.
Testing
go test ./...passes indev-infrastructure/scripts/acr-replication(added cases forREPLICATION_STATEtrue/false/invalid).cd config && make materializere-renderedconfig/rendered/dev/**(committed) and passed all helmtest/pipeline unit tests.regions.eastus2euap.acr.ocp.replicationStateoverride resolves without schema errors viatemplatize inspect --cloud public --deploy-env prod --region eastus2euap(remaining errors from that command are pre-existing, unrelated to missing sensitive/msft-internal overlay files not available in this checkout).