[Core] Remove AzureGermanCloud from built-in cloud list - #33959
[Core] Remove AzureGermanCloud from built-in cloud list#33959Yeming Liu (isra-fel) wants to merge 1 commit into
Conversation
The Azure German cloud (Microsoft Cloud Germany) was decommissioned. Its built-in `AzureGermanCloud` entry in Azure CLI is no longer usable and can be confused with other sovereign clouds. Remove the cloud definition and its enum entry from azure-cli-core, and update the affected unit test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi Yeming Liu (@isra-fel), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Removes the decommissioned Microsoft Cloud Germany (AzureGermanCloud) entry from azure-cli-core’s built-in cloud definitions to avoid confusion and prevent use of a non-functional cloud target.
Changes:
- Removes
AzureGermanCloudfromCloudNameEnum, deletes theAZURE_GERMAN_CLOUDdefinition, and drops it fromHARD_CODED_CLOUD_LIST. - Updates
test_switch_active_cloudto validate switching using other remaining sovereign clouds.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/azure-cli-core/azure/cli/core/cloud.py | Removes the built-in German cloud definition and excludes it from the hard-coded cloud list. |
| src/azure-cli-core/azure/cli/core/tests/test_cloud.py | Updates the core cloud-switching unit test to stop referencing the removed cloud. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| synapse_analytics_endpoint='.dev.azuresynapse.sovcloud-api.fr')) | ||
|
|
||
| HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD, AZURE_BLEU_CLOUD] | ||
| HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_BLEU_CLOUD] |
|
Core |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Live test skipped⏭️ Skipping the live test for this revision because the only test file(s) changed are These |
There was a problem hiding this comment.
Upstream CI
Azure.azure-cli
- Result: failure
- Included checks:
Azure.azure-cli (Test Extensions Loading Python314) - Failure details:
- Test Extensions Loading Python314 / Load extensions (PR-related)
- Evidence:
File "/opt/az/azcliextensions/authV2/azext_authV2/_params.py", line 13, in <module> \n from azure.cli.core.cloud import AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD \n ImportError: cannot import name 'AZURE_GERMAN_CLOUD' from 'azure.cli.core.cloud' - Next action: This PR removes
AZURE_GERMAN_CLOUDfromazure.cli.core.cloud, but theauthV2extension still imports that symbol directly, so extension loading now breaks. Either keep a deprecatedAZURE_GERMAN_CLOUDalias/constant incloud.pyfor backward compatibility, or coordinate removing the import fromazext_authV2/_params.pyin the same change (or a companion extensions PR) before merging. - Verify: Re-run
Test Extensions Loading Python314 / Load extensionsafter the fix and confirm theImportErroris gone.
- Evidence:
- Test Extensions Loading Python314 / Load extensions (PR-related)
Azure.azure-cli Full Test
- Result: failure
- Included checks:
Automation Full Test Python314 Profile Latest instance7,Automation Full Test Python312 Profile Latest instance7 - Failure details:
- Automation Full Test Python314/Python312 Profile Latest instance7 / azdev test (PR-related)
- Evidence:
ex = CLIError(CloudNotRegisteredException('azuregermancloud')) ... # This exception usually caused by a no match HTTP request. - Next action: An existing recorded test still exercises the now-removed
azuregermancloudcloud name and raisesCloudNotRegisteredException. Update or remove the test(s)/recordings that referenceazuregermancloudto match the intentional removal, consistent with the cleanup already done intest_cloud.py. - Verify: Re-run the two
azdev testjobs and confirm no remaining reference toazuregermancloudtriggersCloudNotRegisteredException.
- Evidence:
- Automation Full Test Python314/Python312 Profile Latest instance7 / azdev test (PR-related)
Test validation
- Live test: Skipped: no runnable changed test files were found (PR changes only
azure-cli-coreunit tests, not runnable byazdev --live). - Regression coverage: Not applicable to the changed files.
Review-skill findings
No deterministic skill findings; no confirmed semantic findings beyond the CI evidence above.
Summary: Both CI failures are PR-related — removing AZURE_GERMAN_CLOUD from azure.cli.core.cloud breaks a downstream extension import and leaves at least one live recorded test still referencing the removed cloud name. Please address both before merge.
|
🔔 Routing this PR to @Azure/act-platform-engineering-squad. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
🤖 PR Validation — ❌ Action needed
❌AzureCLI-FullTest
Description
The Azure German cloud (Microsoft Cloud Germany) was decommissioned. Its built-in
AzureGermanCloudentry in the Azure CLI is no longer usable and can be confused with other sovereign clouds. This PR removes it fromazure-cli-core.Changes:
AzureGermanCloudenum entry, theAZURE_GERMAN_CLOUDdefinition, and its entry inHARD_CODED_CLOUD_LISTincloud.py.test_switch_active_cloudto no longer reference the German cloud.Testing Guide
azure-cli-coretest_cloud.py: 14 passed, 1 skipped