Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

EventHubs with 2.67: The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. #30419

Open JohanLindvall opened 4 hours ago

JohanLindvall commented 4 hours ago

Describe the bug

Az cli 2.67.0 creates broken event hub resources, where authorization rules cannot be added.

Downgrading to 2.66.0 and recreating the event hub solves the issue.

Related command

az eventhubs eventhub create --subscription sub --resource-group rg --namespace-name ns --name test --partition-count 4 --cleanup-policy Compact
az eventhubs eventhub authorization-rule create --subscription sub --resource-group rg --namespace-name ns --eventhub-name test --name eventhub-send --rights Send --debug

Fails with a 400:

"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:a068e44c-23b3-48ad-9d8d-9fa644ed1c64_G10, SystemTracker:ns, Timestamp:2024-11-26T12:08:05"}}

Errors

az eventhubs eventhub create --subscription sub --resource-group rg --namespace-name ns --name test --partition-count 4 --cleanup-policy Compact
az eventhubs eventhub authorization-rule create --subscription sub --resource-group rg --namespace-name ns --eventhub-name test --name eventhub-send --rights Send --debug

Fails with a 400:

"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:a068e44c-23b3-48ad-9d8d-9fa644ed1c64_G10, SystemTracker:ns, Timestamp:2024-11-26T12:08:05"}}

Issue script & Debug output

cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/sub/resourceGroups/rg/providers/Microsoft.EventHub/namespaces/ns/eventhubs/test/authorizationRules/eventhub-send?api-version=2023-01-01-preview' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '36' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'a74761d2-abef-11ef-a356-68c6acf4af06' cli.azure.cli.core.sdk.policies: 'CommandName': 'eventhubs eventhub authorization-rule create' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--subscription --resource-group --namespace-name --eventhub-name --name --rights --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.67.0 (DEB) azsdk-python-core/1.31.0 Python/3.12.7 (Linux-6.8.0-49-generic-x86_64-with-glibc2.39)' cli.azure.cli.core.sdk.policies: 'Authorization': '*****' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"properties": {"rights": ["Send"]}} urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/sub/resourceGroups/rg/providers/Microsoft.EventHub/namespaces/nseventhubs/test/authorizationRules/eventhub-send?api-version=2023-01-01-preview HTTP/1.1" 400 446 cli.azure.cli.core.sdk.policies: Response status: 400 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '446' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '38f23314-e786-4b3b-96e5-7d3dfc89cda9' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'a74761d2-abef-11ef-a356-68c6acf4af06_RP' cli.azure.cli.core.sdk.policies: 'x-ms-messaging-activity-id': '37dde2da-34f0-4d19-97b6-ec412bef7e6f' cli.azure.cli.core.sdk.policies: 'x-ms-messaging-routing-id': 'WESTEUROPE|WESTEUROPE|G7|2024-11-26T12:12:07' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '199' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-writes': '2999' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '38f23314-e786-4b3b-96e5-7d3dfc89cda9' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SWEDENSOUTH:20241126T121207Z:38f23314-e786-4b3b-96e5-7d3dfc89cda9' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: AF927FF7439D424FA0D394BA9B4350CC Ref B: FRA231050416027 Ref C: 2024-11-26T12:12:06Z' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 26 Nov 2024 12:12:07 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"MessagingGatewayBadRequest","message":"SubCode=40000. The entity description of type 'EventHubDescription' has unsupported properties for api-version '2022-10' in the request. Try including the correct api-version query string in the request. TrackingId:37dde2da-34f0-4d19-97b6-ec412bef7e6f_G27, SystemTracker:cmb-feed-subscriptionsservice-development.servicebus.windows.net:eventhub-ft-gp-4354, Timestamp:2024-11-26T12:12:07"}}

Expected behavior

I expect a working event hub resource to be created.

Environment Summary

azure-cli 2.67.0

core 2.67.0 telemetry 1.1.0

Dependencies: msal 1.31.0 azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3' Extensions directory '/home/jl/.azure/cliextensions'

Python (Linux) 3.12.7 (main, Nov 13 2024, 04:06:34) [GCC 13.2.0]

Additional context

No response

yonzhan commented 4 hours ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 4 hours ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Saglodha.

github-actions[bot] commented 3 hours ago

Here are some similar issues that might help you. Please check if they can solve your problem.

microsoft-github-policy-service[bot] commented 3 hours ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Saglodha.