Extract availabilityZoneLiveCount from Ev2 central config - #329
Conversation
8b829e9 to
bf19208
Compare
We need the real (live) AZ count per region, not just the planned count, so sanitize it into config.yaml alongside availabilityZoneCount, for both the public and ff clouds. Also lowercase region name keys during sanitization, since the source central config has a couple of regions with inconsistent casing (Finlandcentral, Netherlandsnortheast) and region keys must stay lowercase to match Azure ARM region naming.
bf19208 to
04fdd4b
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The embedded Ev2 config YAML adds availabilityZoneLiveCount for public but not for ff, which will break template execution for ff contexts if the new key is referenced due to missingkey=error.
Pull request overview
This PR updates the Ev2 config sanitization pipeline to surface a new per-region field (availabilityZoneLiveCount) representing the live (actual) number of availability zones, and normalizes region name keys to lowercase to match existing conventions and avoid casing inconsistencies from the central config export.
Changes:
- Added
availabilityZoneLiveCountto the sanitized region config output and regenerated thepubliccloud Ev2 config YAML accordingly. - Lowercased sanitized region map keys (
region.Name) during sanitization to enforce consistent lowercase region identifiers. - Updated the embedded Ev2 config YAML (
config/ev2config/config.yaml) forpublicwith the refreshed central config export.
File summaries
| File | Description |
|---|---|
| config/ev2config/sanitizer/sanitizedconfig.go | Extends sanitized region schema with availabilityZoneLiveCount. |
| config/ev2config/sanitizer/sanitize.go | Populates the new field and lowercases region name keys during sanitization. |
| config/ev2config/config.yaml | Regenerates public region entries to include availabilityZoneLiveCount and updated region keys/data. |
Review details
Suppressed comments (1)
config/ev2config/config.yaml:115
availabilityZoneLiveCountis added forpublicregions, but theffcloud region entries earlier in this same file still do not defineavailabilityZoneLiveCount. Because config preprocessing executes templates withmissingkey=error, any template that starts using.availabilityZoneLiveCountwill fail forffcontexts due to the missing key. To keep the schema consistent across clouds, addavailabilityZoneLiveCountto allffregions as well (even if temporarily equal toavailabilityZoneCountuntil a refreshed central config export is available).
tenantid: 33e01921-4d64-4f8c-a055-5bdaffd5e33d
tenantname: msazurecloud
geneva:
actions:
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The changes are additive, consistent with existing config consumption patterns, and appear correctly propagated into the regenerated embedded Ev2 config.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
/lgtm |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bennerv, geoberle, stevekuznetsov 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 |
Summary
availabilityZoneLiveCountto the sanitized Ev2 region config, alongside the existingavailabilityZoneCount, so we know the real (live) number of AZs in a region, not just the planned count.Finlandcentral,Netherlandsnortheast) which broke the lowercase convention used everywhere else.config/ev2config/config.yamlfor both thepublicandffclouds from fresh Ev2 central config exports.Test plan
make testmake lint