fix: exempt Microsoft.Chaos/targets from reserved name preflight check#8240
Conversation
#8239) Azure Chaos Studio target names (e.g. microsoft-azurekubernetesservicechaosmesh) are service-mandated and cannot be renamed by users. ARM does not enforce the reserved-word rule on these resources, so the preflight warning was a false positive. Add Microsoft.Chaos/targets to azureReservedResourceNameExemptTypes and add corresponding test coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Exempts Microsoft.Chaos/targets from the reserved-name preflight warning to avoid false positives for Chaos Studio target resources whose names are service-mandated (Fixes #8239).
Changes:
- Added
Microsoft.Chaos/targetsto the reserved-name check exemption allowlist. - Extended tests to ensure the exemption applies to the exact type and child types via prefix matching, and that no warning is emitted end-to-end.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go |
Adds Microsoft.Chaos/targets to the exemption list used by the reserved-name preflight check. |
cli/azd/pkg/infra/provisioning/bicep/bicep_provider_reserved_names_test.go |
Adds unit + integration-style test coverage validating the exemption and suppression of warnings. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
wbreza
left a comment
There was a problem hiding this comment.
Reviewed the diff and existing context — LGTM. ✅
Summary of review:
- Exemption is added in the right place (�zureReservedResourceNameExemptTypes) and the new // Service-mandated names ... comment block is a nice taxonomy split from the prior "Convention-named" group.
- Matching semantics are correct: isReservedNameCheckExempt lower-cases and uses HasPrefix(... + "/"), so Microsoft.Chaos/targets, Microsoft.Chaos/targets/capabilities, and microsoft.chaos/targets are all covered as expected.
- Scope is appropriately narrow — limited to Microsoft.Chaos/targets, not broader patterns.
- Test coverage is thorough: end-to-end case in TestCheckReservedResourceNames plus three targeted cases in TestIsReservedNameCheckExempt (exact, child via prefix, case-insensitive).
- Copilot bot's only inline comment (case-insensitive coverage) was directly addressed in commit 3f297a4.
No new findings. Safe to merge.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
#8240) * fix: exempt Microsoft.Chaos/targets from reserved name preflight check (#8239) Azure Chaos Studio target names (e.g. microsoft-azurekubernetesservicechaosmesh) are service-mandated and cannot be renamed by users. ARM does not enforce the reserved-word rule on these resources, so the preflight warning was a false positive. Add Microsoft.Chaos/targets to azureReservedResourceNameExemptTypes and add corresponding test coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add case-insensitive test for Chaos Studio exemption (iteration 1) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add cspell override for azurekubernetesservicechaosmesh Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: therealjohn <1501196+therealjohn@users.noreply.github.com>
Summary
Fixes #8239
Azure Chaos Studio target names (e.g.
microsoft-azurekubernetesservicechaosmesh) are service-mandated and cannot be renamed by users. ARM does not enforce the reserved-word rule onMicrosoft.Chaos/targets, so the preflight warning was a false positive that misleadingly claimed "The deployment will fail."Changes
Microsoft.Chaos/targetstoazureReservedResourceNameExemptTypesinbicep_provider.gobicep_provider_reserved_names_test.go:TestIsReservedNameCheckExempt: exact type + child type (capabilities) via prefix matchTestCheckReservedResourceNames: end-to-end resource entry confirming no warning is emitted