text:
az servicebus queue create and az servicebus queue update ignore --enable-partitioning

Describe the bug
When creating the servicebus queue with az servicebus queue create and the parameter --enable-partitioning is set to true this is ignored by the cli and the setting is still disabled in portal.
Furthermore when using az servicebus queue update to enable partitioning bad request is returned.
Command Name
az servicebus queue create
az servicebus queue update
Errors:
(MessagingGatewayBadRequest) <Error>400<Detail>SubCode=40000. Partitioning cannot be changed for Queue. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:545e4894-b18d-4b96-9ed6-00ab14a406bd_G1, SystemTracker:sb-bof-nlst-rc.servicebus.windows.net:clearance-processing, Timestamp:2022-11-25T11:55:39</Detail></Error>
Code: MessagingGatewayBadRequest
Message: <Error>400<Detail>SubCode=40000. Partitioning cannot be changed for Queue. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:545e4894-b18d-4b96-9ed6-00ab14a406bd_G1, SystemTracker:sb-bof-nlst-rc.servicebus.windows.net:clearance-processing, Timestamp:2022-11-25T11:55:39</Detail></Error>

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az servicebus queue create --name {} --namespace-name {} --resource-group {} --enable-session --enable-batched-operations --max-size {} --enable-partitioning {} --lock-duration {} --max-delivery-count {} --debug
look in portal --> partitioning is disabled
az servicebus queue update --name {} --namespace-name {} --resource-group {} --enable-session --enable-batched-operations --max-size {} --enable-partitioning {} --lock-duration {} --max-delivery-count {} --debug

Expected Behavior
should work as documented here and here
Environment Summary
Windows-10-10.0.22621-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.42.0

Extensions:
account 0.2.5
application-insights 0.1.16
azure-devops 0.25.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

route to CXP team

@ulluoink Thanks for the feedback! Partitions can't be enabled post creation, i.e., on update, so the service is returning the expected error. Azure CLI should not have a flag for it on update. We will update accordingly.
As for the flag being ignored, we will investigate and get back to you.

@ulluoink Could you run the create command where you see that partitioning is not enabled with the --debug flag and share the output here (removing any sensitive information)?
I've just tried it out and can confirm that it does indeed get enabled.

executing the "az servicebus queue create" on an existing queue results in
ERROR: (MessagingGatewayBadRequest) 400SubCode=40000. Partitioning cannot be changed for Queue.
Which is kind of expected like You have written because the queue really exists. But I would not expect an error as other cli create commands work just like that even if resources exist.
Running "az servicebus queue create" if the queue does not exists returns this:
az servicebus queue create
--name $Name     --namespace-name $NamespaceName
--resource-group $ResourceGroup     --enable-session
--enable-batched-operations     --max-size $MaxSize
--enable-partitioning $true     --lock-duration $LockDuration
--max-delivery-count $MaxDeliveryCount      --debug

DEBUG: cli.knack.cli: Command arguments: ['servicebus', 'queue', 'create', '--name', 'clearance-processing', '--namespace-name', 'sb-*****', '--resource-group', 'rg-***-stateful', '--enable-session', '--enable-batched-operations', '--max-size', '1024', '**--enable-partitioning', 'True'**, '--lock-duration', '00:01:00', '--max-delivery-count', '10', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0222B418>, <function OutputProducer.on_global_arguments at 0x0230D730>, <function CLIQuery.on_global_arguments at 0x0232B388>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'servicebus': ['azure.cli.command_modules.servicebus']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: servicebus                0.011        21        75
DEBUG: cli.azure.cli.core: Total (1)                 0.011        21        75
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: Total (0)                 0.000         0         0
DEBUG: cli.azure.cli.core: Loaded 21 groups, 75 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : servicebus queue create
DEBUG: cli.azure.cli.core: Command table: servicebus queue create
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04894E80>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '***\.azure\commands\2022-12-01.08-26-22.servicebus_queue_create.109384.log'.
INFO: az_command_data_logger: command args: servicebus queue create --name {} --namespace-name {} --resource-group {} --enable-session --enable-batched-operations --max-size {} --enable-partitioning {} --lock-duration {} --max-delivery-count {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x048BAF58>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x04840E38>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x048CE4F0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0230D778>, <function CLIQuery.handle_query_parameter at 0x0232B3D0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x048CE4A8>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceBusManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='***\\.azure\\service_principal_entries.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='***\\.azure\\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: ***\.azure\msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/***/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/***/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/***/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? False
DEBUG: msal.application: Region to be used: None
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceBusManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/***/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/***/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/***/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? False
DEBUG: msal.application: Region to be used: None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 112f6c11-126e-442e-9c15-7850ae9f2a91
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***?api-version=2022-01-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '74bd4ef9-7149-11ed-97d0-6c5d3a1b5bb7'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'servicebus queue create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --namespace-name --resource-group --enable-session --enable-batched-operations --max-size --enable-partitioning --lock-duration --max-delivery-count --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-azure-mgmt-servicebus/8.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***?api-version=2022-01-01-preview HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '3512c704-25f4-4407-b92f-5b353904ecf6_M9SN1_M9SN1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server-SB': 'Service-Bus-Resource-Provider/SN1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server': 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'e7a9007c-6e56-4ae2-8abd-cbfeace5842d'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20221201T072623Z:e7a9007c-6e56-4ae2-8abd-cbfeace5842d'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 01 Dec 2022 07:26:22 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***","name":"sb-***","type":"Microsoft.ServiceBus/Namespaces","location":"West Europe","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"provisioningState":"Succeeded","metricId":"***:sb-***","createdAt":"2022-07-28T12:46:29.473Z","updatedAt":"2022-11-25T10:21:01.577Z","serviceBusEndpoint":"https://sb-***.servicebus.windows.net:443/","status":"Active"}}
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 000dafc1-2cf2-46d0-93a2-10efdde8d640
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing?api-version=2022-01-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'PUT'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '178'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '74bd4ef9-7149-11ed-97d0-6c5d3a1b5bb7'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'servicebus queue create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --namespace-name --resource-group --enable-session --enable-batched-operations --max-size --enable-partitioning --lock-duration --max-delivery-count --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-azure-mgmt-servicebus/8.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"properties": {"lockDuration": "PT1M", "maxSizeInMegabytes": 1024, "requiresSession": true, "maxDeliveryCount": 10, "enableBatchedOperations": true, "enablePartitioning": true}}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing?api-version=2022-01-01-preview HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server': 'Microsoft-HTTPAPI/2.0'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20221201T072626Z:9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 01 Dec 2022 07:26:26 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing","name":"clearance-processing","type":"Microsoft.ServiceBus/namespaces/queues","location":"westeurope","properties":{"maxMessageSizeInKilobytes":1024,"lockDuration":"PT1M","maxSizeInMegabytes":1024,"requiresDuplicateDetection":false,"requiresSession":true,"defaultMessageTimeToLive":"P10675199DT2H48M5.4775807S","deadLetteringOnMessageExpiration":false,"enableBatchedOperations":true,"duplicateDetectionHistoryTimeWindow":"PT10M","maxDeliveryCount":10,"sizeInBytes":0,"messageCount":0,"status":"Active","autoDeleteOnIdle":"P10675199DT2H48M5.4775807S","enablePartitioning":false,"enableExpress":false,"countDetails":{"activeMessageCount":0,"deadLetterMessageCount":0,"scheduledMessageCount":0,"transferMessageCount":0,"transferDeadLetterMessageCount":0},"createdAt":"2022-12-01T07:26:25.743Z","updatedAt":"2022-12-01T07:26:25.893Z","accessedAt":"0001-01-01T00:00:00"}}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x048BA6E8>, <function _x509_from_base64_to_hex_transform at 0x048BA730>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04894FA0>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.__main__: Command ran in 4.495 seconds (init: 0.359, invoke: 4.136)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3353 in cache
WARNING: telemetry.check: Negative: The ***\.azure\telemetry.txt was modified at 2022-12-01 08:19:54.000753, which in less than 600.000000 s
{
  "accessedAt": "0001-01-01T00:00:00",
  "autoDeleteOnIdle": "10675199 days, 2:48:05.477581",
  "countDetails": {
    "activeMessageCount": 0,
    "deadLetterMessageCount": 0,
    "scheduledMessageCount": 0,
    "transferDeadLetterMessageCount": 0,
    "transferMessageCount": 0
  },
  "createdAt": "2022-12-01T07:26:25.743000+00:00",
  "deadLetteringOnMessageExpiration": false,
  "defaultMessageTimeToLive": "10675199 days, 2:48:05.477581",
  "duplicateDetectionHistoryTimeWindow": "0:10:00",
  "enableBatchedOperations": true,
  "enableExpress": false,
  "enablePartitioning": false,
  "forwardDeadLetteredMessagesTo": null,
  "forwardTo": null,
  "id": "/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing",
  "location": "westeurope",
  "lockDuration": "0:01:00",
  "maxDeliveryCount": 10,
  "maxMessageSizeInKilobytes": 1024,
  "maxSizeInMegabytes": 1024,
  "messageCount": 0,
  "name": "clearance-processing",
  "requiresDuplicateDetection": false,
  "requiresSession": true,
  "resourceGroup": "rg-***",
  "sizeInBytes": 0,
  "status": "Active",
  "systemData": null,
  "type": "Microsoft.ServiceBus/namespaces/queues",
  "updatedAt": "2022-12-01T07:26:25.893000+00:00"
}

@ulluoink > @PramodValavala-MSFT PramodValavala-MSFT executing the "az servicebus queue create" on an existing queue results in ERROR: (MessagingGatewayBadRequest) 400SubCode=40000. Partitioning cannot be changed for Queue.

Which is kind of expected like You have written because the queue really exists. But I would not expect an error as other cli create commands work just like that even if resources exist.
Running "az servicebus queue create" if the queue does not exists returns this:

az servicebus queue create `
    --name $Name `
    --namespace-name $NamespaceName `
    --resource-group $ResourceGroup `
    --enable-session `
    --enable-batched-operations `
    --max-size $MaxSize `
    --enable-partitioning $true`
    --lock-duration $LockDuration `
    --max-delivery-count $MaxDeliveryCount `
    --debug

DEBUG: cli.knack.cli: Command arguments: ['servicebus', 'queue', 'create', '--name', 'clearance-processing', '--namespace-name', 'sb-*****', '--resource-group', 'rg-***-stateful', '--enable-session', '--enable-batched-operations', '--max-size', '1024', '**--enable-partitioning', 'True'**, '--lock-duration', '00:01:00', '--max-delivery-count', '10', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0222B418>, <function OutputProducer.on_global_arguments at 0x0230D730>, <function CLIQuery.on_global_arguments at 0x0232B388>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'servicebus': ['azure.cli.command_modules.servicebus']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: servicebus                0.011        21        75
DEBUG: cli.azure.cli.core: Total (1)                 0.011        21        75
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: Total (0)                 0.000         0         0
DEBUG: cli.azure.cli.core: Loaded 21 groups, 75 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : servicebus queue create
DEBUG: cli.azure.cli.core: Command table: servicebus queue create
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04894E80>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '***\.azure\commands\2022-12-01.08-26-22.servicebus_queue_create.109384.log'.
INFO: az_command_data_logger: command args: servicebus queue create --name {} --namespace-name {} --resource-group {} --enable-session --enable-batched-operations --max-size {} --enable-partitioning {} --lock-duration {} --max-delivery-count {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x048BAF58>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x04840E38>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x048CE4F0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0230D778>, <function CLIQuery.handle_query_parameter at 0x0232B3D0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x048CE4A8>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceBusManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='***\\.azure\\service_principal_entries.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='***\\.azure\\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: ***\.azure\msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/***/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/***/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/***/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? False
DEBUG: msal.application: Region to be used: None
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceBusManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/***/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/***/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/***/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/***/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? False
DEBUG: msal.application: Region to be used: None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 112f6c11-126e-442e-9c15-7850ae9f2a91
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***?api-version=2022-01-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '74bd4ef9-7149-11ed-97d0-6c5d3a1b5bb7'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'servicebus queue create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --namespace-name --resource-group --enable-session --enable-batched-operations --max-size --enable-partitioning --lock-duration --max-delivery-count --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-azure-mgmt-servicebus/8.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***?api-version=2022-01-01-preview HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '3512c704-25f4-4407-b92f-5b353904ecf6_M9SN1_M9SN1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server-SB': 'Service-Bus-Resource-Provider/SN1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server': 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'e7a9007c-6e56-4ae2-8abd-cbfeace5842d'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20221201T072623Z:e7a9007c-6e56-4ae2-8abd-cbfeace5842d'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 01 Dec 2022 07:26:22 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"sku":{"name":"Premium","tier":"Premium","capacity":1},"id":"/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***","name":"sb-***","type":"Microsoft.ServiceBus/Namespaces","location":"West Europe","tags":{},"properties":{"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","disableLocalAuth":false,"zoneRedundant":false,"provisioningState":"Succeeded","metricId":"***:sb-***","createdAt":"2022-07-28T12:46:29.473Z","updatedAt":"2022-11-25T10:21:01.577Z","serviceBusEndpoint":"https://sb-***.servicebus.windows.net:443/","status":"Active"}}
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 000dafc1-2cf2-46d0-93a2-10efdde8d640
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing?api-version=2022-01-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'PUT'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '178'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '74bd4ef9-7149-11ed-97d0-6c5d3a1b5bb7'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'servicebus queue create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --namespace-name --resource-group --enable-session --enable-batched-operations --max-size --enable-partitioning --lock-duration --max-delivery-count --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-azure-mgmt-servicebus/8.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"properties": {"lockDuration": "PT1M", "maxSizeInMegabytes": 1024, "requiresSession": true, "maxDeliveryCount": 10, "enableBatchedOperations": true, "enablePartitioning": true}}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing?api-version=2022-01-01-preview HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server': 'Microsoft-HTTPAPI/2.0'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20221201T072626Z:9e4ed985-6691-46b3-abed-b4b871715d81'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 01 Dec 2022 07:26:26 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing","name":"clearance-processing","type":"Microsoft.ServiceBus/namespaces/queues","location":"westeurope","properties":{"maxMessageSizeInKilobytes":1024,"lockDuration":"PT1M","maxSizeInMegabytes":1024,"requiresDuplicateDetection":false,"requiresSession":true,"defaultMessageTimeToLive":"P10675199DT2H48M5.4775807S","deadLetteringOnMessageExpiration":false,"enableBatchedOperations":true,"duplicateDetectionHistoryTimeWindow":"PT10M","maxDeliveryCount":10,"sizeInBytes":0,"messageCount":0,"status":"Active","autoDeleteOnIdle":"P10675199DT2H48M5.4775807S","enablePartitioning":false,"enableExpress":false,"countDetails":{"activeMessageCount":0,"deadLetterMessageCount":0,"scheduledMessageCount":0,"transferMessageCount":0,"transferDeadLetterMessageCount":0},"createdAt":"2022-12-01T07:26:25.743Z","updatedAt":"2022-12-01T07:26:25.893Z","accessedAt":"0001-01-01T00:00:00"}}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x048BA6E8>, <function _x509_from_base64_to_hex_transform at 0x048BA730>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04894FA0>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.__main__: Command ran in 4.495 seconds (init: 0.359, invoke: 4.136)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3353 in cache
WARNING: telemetry.check: Negative: The ***\.azure\telemetry.txt was modified at 2022-12-01 08:19:54.000753, which in less than 600.000000 s
{
  "accessedAt": "0001-01-01T00:00:00",
  "autoDeleteOnIdle": "10675199 days, 2:48:05.477581",
  "countDetails": {
    "activeMessageCount": 0,
    "deadLetterMessageCount": 0,
    "scheduledMessageCount": 0,
    "transferDeadLetterMessageCount": 0,
    "transferMessageCount": 0
  },
  "createdAt": "2022-12-01T07:26:25.743000+00:00",
  "deadLetteringOnMessageExpiration": false,
  "defaultMessageTimeToLive": "10675199 days, 2:48:05.477581",
  "duplicateDetectionHistoryTimeWindow": "0:10:00",
  "enableBatchedOperations": true,
  "enableExpress": false,
  "enablePartitioning": false,
  "forwardDeadLetteredMessagesTo": null,
  "forwardTo": null,
  "id": "/subscriptions/***/resourceGroups/rg-***/providers/Microsoft.ServiceBus/namespaces/sb-***/queues/clearance-processing",
  "location": "westeurope",
  "lockDuration": "0:01:00",
  "maxDeliveryCount": 10,
  "maxMessageSizeInKilobytes": 1024,
  "maxSizeInMegabytes": 1024,
  "messageCount": 0,
  "name": "clearance-processing",
  "requiresDuplicateDetection": false,
  "requiresSession": true,
  "resourceGroup": "rg-***",
  "sizeInBytes": 0,
  "status": "Active",
  "systemData": null,
  "type": "Microsoft.ServiceBus/namespaces/queues",
  "updatedAt": "2022-12-01T07:26:25.893000+00:00"
}

The error is actually about the fact that partitioning can not be enabled after a queue is created. From your log, it looks like the queue is just being updated when running the command for an existing queue, which is why this error comes up.
Ideally, I believe creating a queue which already exists should error out saying that it is already present but will check with the team if this behavior is intended.
That being said, we have worked up a PR to remove the arguments which are invalid for the update commands since some properties are not supported when updating an entity like partitioning.

@PramodValavala-MSFT the error also occurs if i delete the queue and then crerate it.
so it is not possible for us to create a queue on that servicebus with partitioning enabled.
this is not just a documentation issue . this is  a bug

Hi @ulluoink , Apologies for the delay here.
I understand your concerns here and want to summarize them below:

Running a create queue on already existing queue with partitioning enabled flag returns an error talking about Partitioning cannot be updated for a queue.
Passing the enable partitioning as true via cmdlet still results in partitioning to be disabled for the queue.

We tried investigating on the issue and could notice that earlier Partitioning wasn't supported in Premium SKU namespaces. looking at your -debug trace it looks like you are trying to enable partitioning with premium namespaces.
Lately we have introduced a new feature to enable partitioning on premium namespaces - https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium, however it is only available in few regions and old premium namespaces don't support partitioning.
Could you please review the information provided above? Please feel free to get back to us in case of any concerns.

authors: PramodValavala-MSFT Saglodha ulluoink yonzhan


text:
az ad app credential reset documentation is out of date

The parameters listed for az ad app credential reset are out of date:
display-name should be replaced with credential-description
Example:
 az ad app credential reset --id 00000000-0000-0000-0000-000000000000 --append --credential-description "Description" --cert "MIICoT..."

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 364ccdfb-268e-08f0-a357-94a19c5213fd
Version Independent ID: d2c1a19f-bfbd-b273-77e2-9fdb596181b5
Content: az ad app credential
Content Source: latest/docs-ref-autogen/ad/app/credential.yml
Service: active-directory
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

@jiasli for awareness

source: gharchive/issue

repo: Azure/azure-cli

license: MIT

license_type: permissive

license_source: github-api


text:
az ml online-deployment create  seems broken

Describe the bug
az ml online-deployment create --name time-to-fill-online-dp --endpoint time-to-fill-online-dev -f online-deployment.yml
The command failed with an unexpected error. Here is the traceback:
local variable 'debug' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 78, in ml_online_deployment_create
ml_client, debug = get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 207, in get_ml_client
ml_client = _get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 154, in _get_ml_client
ml_client = get_mgmt_service_client(cli_ctx, MLClient._ml_client_cli, subscription_id=subscription_id, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client
client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id,
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 254, in _get_mgmt_service_client
client = client_type(credential, subscription_id, **client_kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 770, in _ml_client_cli
ml_client = cls(credential=credentials, subscription_id=subscription_id, **kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 220, in init
ws_ops = WorkspaceOperations(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_workspace_operations.py", line 60, in init
self.dataplane_workspace_operations = kwargs.pop("dataplane_client").workspaces
KeyError: 'dataplane_client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 132, in ml_online_deployment_create
log_and_raise_error(err, debug, yaml_operation=yaml_operation)
UnboundLocalError: local variable 'debug' referenced before assignment
Related command
az ml online-deployment create
Errors
The command failed with an unexpected error. Here is the traceback:
local variable 'debug' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 78, in ml_online_deployment_create
ml_client, debug = get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 207, in get_ml_client
ml_client = _get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 154, in _get_ml_client
ml_client = get_mgmt_service_client(cli_ctx, MLClient._ml_client_cli, subscription_id=subscription_id, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client
client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id,
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 254, in _get_mgmt_service_client
client = client_type(credential, subscription_id, **client_kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 770, in _ml_client_cli
ml_client = cls(credential=credentials, subscription_id=subscription_id, **kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 220, in init
ws_ops = WorkspaceOperations(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_workspace_operations.py", line 60, in init
self.dataplane_workspace_operations = kwargs.pop("dataplane_client").workspaces
KeyError: 'dataplane_client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 132, in ml_online_deployment_create
log_and_raise_error(err, debug, yaml_operation=yaml_operation)
UnboundLocalError: local variable 'debug' referenced before assignment
Issue script & Debug output
az ml online-deployment create --name time-to-fill-online-dp --endpoint time-to-fill-online-dev -f online-deployment.yml
The command failed with an unexpected error. Here is the traceback:
local variable 'debug' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 78, in ml_online_deployment_create
ml_client, debug = get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 207, in get_ml_client
ml_client = _get_ml_client(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/utils.py", line 154, in _get_ml_client
ml_client = get_mgmt_service_client(cli_ctx, MLClient._ml_client_cli, subscription_id=subscription_id, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client
client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id,
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 254, in _get_mgmt_service_client
client = client_type(credential, subscription_id, **client_kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 770, in _ml_client_cli
ml_client = cls(credential=credentials, subscription_id=subscription_id, **kwargs)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/_ml_client.py", line 220, in init
ws_ops = WorkspaceOperations(
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/operations/_workspace_operations.py", line 60, in init
self.dataplane_workspace_operations = kwargs.pop("dataplane_client").workspaces
KeyError: 'dataplane_client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/online_deployment.py", line 132, in ml_online_deployment_create
log_and_raise_error(err, debug, yaml_operation=yaml_operation)
UnboundLocalError: local variable 'debug' referenced before assignment
Expected behavior
The command should run.
Environment Summary
guillermo [ ~ ]$ az --version
azure-cli                         2.58.0
core                              2.58.0
telemetry                          1.1.0
Extensions:
ai-examples                        0.2.5
ml                                2.23.0
ssh                                2.0.2
Dependencies:
msal                              1.26.0
azure-mgmt-resource             23.1.0b2
Python location '/usr/bin/python3.9'
Extensions directory '/home/guillermo/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'
Python (Linux) 3.9.14 (main, Oct 12 2023, 19:48:32)
[GCC 11.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response

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

authors: guillermo-rayo-aya yonzhan


text:
az failed to install ml

Describe the bug
I have an issue installing the ML extension in Azure Pipeline. It seems there is an error with pip inside the extension. I'm trying to install the ML extension, but I haven't set up any specific Python package versions since I don't need them. and it was working correctly before 11/09/2024
Related command
az extension add --name ml
Errors
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
Issue script & Debug output
Skipping link: not a file: https://pypi.org/simple/pyasn1-modules/
Given no hashes to check 21 links for project 'pyasn1-modules': discarding no candidates
Collecting pyasn1-modules>=0.2.1 (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0)
Created temporary directory: C:\Users\v-muanati\AppData\Local\Temp\pip-unpack-439cbr19
https://files.pythonhosted.org:443 "GET /packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz HTTP/1.1" 200 310028
Downloading pyasn1_modules-0.4.1.tar.gz (310 kB)
-------------------------------------- 310.0/310.0 kB 4.8 MB/s eta 0:00:00
Added pyasn1-modules>=0.2.1 from https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0) to build tracker 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
Created temporary directory: C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn
Installing build dependencies: started
Running command pip subprocess to install build dependencies
Using pip 23.2.1 from C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip (python 3.10)
Collecting setuptools
Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/cb/9c/9ad11ac06b97e55ada655f8a6bea9d1d3f06e120b178cd578d80e558191d/setuptools-74.1.2-py3-none-any.whl.metadata
Using cached setuptools-74.1.2-py3-none-any.whl.metadata (6.7 kB)
Using cached setuptools-74.1.2-py3-none-any.whl (1.3 MB)
Installing collected packages: setuptools
Successfully installed setuptools-74.1.2
[notice] A new release of pip is available: 23.2.1 -> 24.2
[notice] To update, run: C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe -m pip install --upgrade pip
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Running command Getting requirements to build wheel
Getting requirements to build wheel: finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\cli\base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\cli\req_command.py", line 248, in wrapper
return func(self, options, args)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 239, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 230, in _get_updated_criteria
self._add_to_criteria(criteria, requirement, parent=candidate)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool
return bool(self._sequence)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool
return any(self)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 293, in init
super().init(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init
self.dist = self._prepare()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 538, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 653, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 69, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 48, in prepare_distribution_metadata
self._install_build_reqs(finder)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 118, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 95, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\utils\misc.py", line 697, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 166, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
File "importlib_init.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_init.py", line 22, in
import distutils_hack.override  # noqa: F401
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/override.py", line 1, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/init.py", line 77, in do_override
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/init.py", line 63, in ensure_local_distutils
File "importlib_init.py", line 126, in import_module
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_distutils\core.py", line 14, in
from .config import PyPIRCCommand
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_distutils\config.py", line 7, in
import email.message
File "email\message.py", line 15, in
File "email\utils.py", line 29, in
File "socket.py", line 51, in
ModuleNotFoundError: No module named '_socket'
Removed pyasn1-modules>=0.2.1 from https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0) from build tracker 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
Removed build tracker: 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
cli.azure.cli.core.extension.operations: Command '['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\v-muanati\.azure\cliextensions\ml', 'C:\Users\V-MUAN~1\AppData\Local\Temp\tmpt833177p\ml-2.29.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 2.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users\v-muanati.azure\cliextensions\ml
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 344, in add_extension
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 173, in _add_whl_ext
knack.util.CLIError: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001EB9BB14550>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 90.840 seconds (init: 0.633, invoke: 90.207)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3371 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\v-muanati.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
It should not show an error
Environment Summary
azure-cli                         2.51.0 *
core                              2.51.0 *
telemetry                          1.1.0
Extensions:
azure-devops                       1.0.1
communication                    1.8.0b1
Dependencies:
msal                            1.24.0b1
azure-mgmt-resource             23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\v-muanati.azure\cliextensions'
Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Additional context
No response

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

Having the same issue. Worked fine until today

I can't repro now, I think it's already been fixed?
pyasn1-modules released new version yesterday but the wheel is not provided.

Ref: https://pypi.org/project/pyasn1-modules/0.4.1/#files

authors: bebound muntherAnati puzzler10 yonzhan


text:
[App Service] BREAKING CHANGE : az webapp up : remove default argument loading for --plan; fix bug when not providing --plan argument

Description

The command az webapp up writes out to and reads from a .azure/config file in the current directory. This can cause confusing behavior where for the first time running az webapp up without a --plan arg, a new App Service Plan is created, but on subsequent runs of the command in the current directory, the plan is reused. There was no documentation of this feature in the help text or any alert via the command line. This can be particularly annoying when the user tries to create an app with a different OS from the default plan's OS (lead to a 'bad request' error).
To reduce confusion, this default loading behavior was removed for --plan in this PR.
If no --plan argument is provided, then the CLI will attempt to create the app in an App Service Plan with matching RG, SKU, location and OS type. I fixed a bug where the OS type was not included in this matching process. A new plan is created if no matching plan is found.
Testing Guide

azdev test --live test_webapp_up_commands
History Notes

[App Service] BREAKING CHANGE : az webapp up : remove default argument loading for --plan
[App Service] az webapp up : Fix bug causing existing ASP with wrong OS type to be selected when not providing a --plan argument

This checklist is used to make sure that common guidelines for a pull request are followed.

[X] The PR title and description has followed the guideline in Submitting Pull Requests.

[X] I adhere to the Command Guidelines.

[X] I adhere to the Error Handling Guidelines.

App Service

I need to make significant changes to this PR (see below). I'll open a new one once these changes are ready

Re-enable default loading for --plan
When using the default plan value (or a plan that already exists), validate that the OS type agrees with the OS type the user passes in
In general, return the detailed error message from the server instead of raising a “Bad Request” error
Include debug text indicating when values (for plan, RG, etc) are being written out as defaults for the current directory
Add information to the help text describing how defaults are written and loaded as well as the command to change the defaults
If possible, prevent default from being set if the command fails

source: gharchive/pull-request

authors: StrawnSC yonzhan


text:
{AKS}Fix issue iin updateloadbalacnerprofile

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

AKS

authors: MartinForReal yonzhan


text:
added application insights telemetry package to send metrics and logs [Do Not Merge]

… to appinsights

What this PR does / why we need it:
added application insights telemetry package to send metrics and logs. Application can use this package to push data and metrics to application insights and then to geneva
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

One thing i noticed to acquire lock before writing metadata to json file..will do that

One thing i noticed to acquire lock before writing metadata to json file..will do that

done

/azp run build_and_test windows_e2e

/azp run

repo: Azure/azure-container-networking


text:
Printer Friendly Articles

I tried printing http://azure.microsoft.com/en-us/documentation/articles/hyper-v-recovery-manager-azure/ directly and it was unreadable.
Had to go into GITHUB edit mode to make a printed copy of the article I could follow.   Is there some  way to ensure that all TechNet articles have a printer friendly version that can be leveraged.
Thanks

@gfeiges @plasmaphonic Thank you very much for the suggestion.  I've passed it on to the powers that be and hopefully very soon this problem will be a thing of the past.  I'm going to close this issue now, but please do request it be reopened if you feel the need.

authors: deneha gfeiges

repo: Azure/azure-content


text:
ChangeFeed: Investigating Compute Gateway AVAD Archival Tree Cache Eviction

Description
Investigating Compute Gateway AVAD Archival Tree Cache Eviction Caching.
Problem statement
Currently, Archival caching is unbounded for CF AVAD on Compute Gateway. Investigation is needed to determine if and when bounded caching is necessary.
Stackholders

Dmitri Melnikov
Gary Fang
Rodimiro Cerrato Espinal
Justine Cocchi

Tasks

[x] Cache must be tied to tenant container (should be evicted when container is deleted)
[x] Trim cached data to minimum required set (consider abbreviations, etc.)
[x] Investigate max size of our cache and implement some limits
[x] Publish counters specific to cache information
[ ] Code complete, signoffs, delivery and release schedules.

Diagram

Cache must be tied to tenant container (should be evicted when container is deleted)

How frequently are tenant containers evicted?

Follow-up: With engineer, Gary Fang, that can give me telemetry for this.

Actionable items

[ ] Observability/KUSTO queries on TenantContainer percentages for eviction times.
[ ] KUSTO queries on when TenantContainer's where last evicted.

_TenantContainer_s are evicted automatically at least 3 weeks when Upgrades occur. So, no TenantContainer life last longer than 3 weeks.

[ ] Observability/KUSTO queries on size of specific caches or activities in memory on TenantContainer.
[ ] Model for adding ArchivalTreeCaching to TenantContainer.

No support for Graphana or Application Insights.

What constitutes or justifies a container deletion and who owns this?

TenantContainer are evicted after not seeing new requests for ~5 hours on the node.

This is configurable account level and federation level.

Gary is point of contact for Compute.

Actionable item:

[x] Locating the configuration.

TenantConfiguration.SocketConnectionIdleTimeoutInSeconds

We may have to include code to evict the archival tree cache ourselves, it is not done automagically.
ArchivalTreeCache needs to be owned by the TenantContainer object, not the FullFidelityChangeFeedHandler object, so some refactoring needs to happen and since TenantContainer owns other caches, we can potentially model this from the others as a point of reference.

Are other global caches deleted, or stored, in the event of a tenant container deletion?

Yes. (Ex. ComputeRecyclableMemoryManager).
Rules for creating caches owned by TenantContainer.

It loads all the necessary service at the initialization.
It can refresh once every 5 minutes allowing to change the state using feature flags.
It must dispose all of the data on dispose being called once tenant went idle for 5+ hours.
Frequently accessed services could be received using a separate interface using direct (bypass dictionary lookup).

Should archival tree caches be evicted based only on the deletion of tenant container?

Reconvene with Kiran again on this.

Since the archival tree cache is primary based on the state of the tenant container's partition key range cache, should archival tree caches be evicted based on changes or refreshes to the partition key range cache?

Reconvene with Kiran again on this.

Should archival tree caches be evicted based on changes or refreshes to the tenant container cache (not necessarily related to partition key range)?

Reconvene with Kiran again on this.

#### Trim cached data to minimum required set (consider abbreviations, etc.)
Note: The impact of change needs to be assessed more closely. There may be a situation where this is changed on a more iterative release as part of a phase 2
1. What cached elements are essential?
2. What cached elements are informational?
3. What cached elements can be abbreviated or removed?
4. Should we revisit and refactor the archival tree structure?
5. What is the baseline size under the most extreme cases and how do we measure and test this?
6. What is the future size under the most extreme cases if a refactoring is done?
Investigate max size of our cache and implement some limits

Check with Rodimiro.

Actionable items:

[x] Get the most extreme case of a partitions in a single container.
let minSplitTreeDepth = 10;
let agoDuration = 30m;
ReportQuota5M
| where TIMESTAMP >= ago(agoDuration)
| where array_length(parse_json(PartitionKeyRangeParentIds)) >= minSplitTreeDepth
| project TIMESTAMP, Tenant, DatabaseName, CollectionName, PartitionId, PartitionKeyRangeParentIds
[ ] Take extreme case, generate a sample ArchivalTree, cache it, measure it, and create a tests that uses this cache to observe the performance.

[x] Samples

1 split (2982 bytes)
2 splits (4538 bytes)
3 splits (6146 bytes)
6 splits (12484 bytes)
10 splits (18964 bytes)

[x] Highest split count for all containers, not exclusive to FFCF accounts was 258 splits using KUSTO

let minSplitTreeDepth = 258;
let agoDuration = 30m;
ReportQuota5M
| where TIMESTAMP >= ago(agoDuration)
| where array_length(parse_json(PartitionKeyRangeParentIds)) >= minSplitTreeDepth
| project TIMESTAMP, Tenant, DatabaseName, CollectionName, PartitionId, PartitionKeyRangeParentIds
| summarize Count=count()

[x] Highest split count for all containers exclusive to FFCF accounts was 12 splits using KUSTO

let minSplitTreeDepth = 12;
let agoDuration = 30m;
let accountsWithFFCFEnabled = MgmtGlobalDatabaseAccountTrace
| where Status !in ("CreationFailed", "DeletionFailed")
| extend EnableFFCFWithPITR=iff(extractjson("$.enableffcfwithpitr", tolower(ConfigurationOverrides)) == "true", "True", "False")
| extend EnableFFCFWithPITRCopy=iff(extractjson("$.enableffcfwithpitrcopy", tolower(ConfigurationOverrides)) == "true", "True", "False")
| summarize arg_max(TIMESTAMP, EnableFFCFWithPITR, EnableFFCFWithPITRCopy) by SubscriptionId, GlobalDatabaseAccount
| where EnableFFCFWithPITR == "True" or EnableFFCFWithPITRCopy == "True"
| project GlobalDatabaseAccountName=GlobalDatabaseAccount;
ReportQuota5M
| where TIMESTAMP >= ago(agoDuration)
| where array_length(parse_json(PartitionKeyRangeParentIds)) >= minSplitTreeDepth
| join kind=inner accountsWithFFCFEnabled on GlobalDatabaseAccountName
| project TIMESTAMP, Tenant, DatabaseName, CollectionName, PartitionId, PartitionKeyRangeParentIds

Publish counters specific to cache information

Observability on metrics. How to measure and get notifications. Supportability.

[x] Log in memory size of all collective caches when a cache entry is

[x] added.
[x] removed.
NOTE: Trickier than it seems.

AsyncCache does not give access to the actual value, ArchivalTree, so even when serialized, it only gives you the key (Ex. {"Keys":[{"Item1":"%d+q,PHgqbz=","Item2":4}]}). The only access you have to the ArchivalTree is by way of AsyncCache.GetAsync, and you need the key for that.

Option 1: We can check memory before and after adding and removing cached item using GC.GetTotalMemory(true); and do the subtraction and that can be the best guess. Verdict: More favorable and easy to implement.
Option 2: Read all keys in AsyncCache. Iterate through all the keys to call Async.GetAsync. Measure each ArchivalTree by converting it to a MemoryStream and using MemoryStream.Length incrementing a long size value and use that. Verdict: Do not like this one. Seems a bit much.
[x] Option 3: new AsyncCache object that has ClearCache, GetAsync, TotalMemorySize capabilities. Object is also responsible for calculating the object size and logic to publish counters. Cache is calculated usingthe already existing UserDefinedTypesExtensions.ConvertToStream{T}(T) in Compute Gateway to get the length of the memory stream. It is only calculating the size once after the archival tree is built and added to the cache. See diagram above.

[ ] Produce KUSTO query to view memory size.
[x] Uses DefaultTrace.TraceInformation logger.
[ ] What logger to use? Friends does not have access to CosmosDBTrace which is widely used by TenantContainer and is based on Microsoft.Azure.Cosmos.Compute.Core.Diagnostics.ITrace. Friends uses Microsoft.Azure.Cosmos.Tracing.ITrace.

[ ] Which KUSTO table does these loggers actually log to?
[ ] Suggestion was made by Rodimiro to log to NodeCounter5MRoleInstanceEvent. Waiting on response on which logger writes to this KUSTO table.

Code complete, testing, signoffs, delivery and release schedules.

Proof of concept

[ ] Also dealing with dependencies while moving internal static ConcurrentDictionary<Uri, AsyncCache<(string, int), ArchivalTree>> ArchivalCacheTree { get; } = new(); to TenantConfiguration from FullFidelityChangeFeedHandler.
[ ] Create and test feature flag.
[x] Code and assembly.info changes to give TenantContainer access to Friends library.

Release and delivery

mid-June?
Schedule: Once a month, or every 3 weeks?

I need more confirmation.

Is this tied to Private Preview, Public Preview, or GA?

Signoffs

Soham can sign off for Compute
Rodimiro can sign off for Backend

Testing

[ ] Create a CTL in test environment.

In Tasks, below two are the high priority and MUST
Cache must be tied to tenant container (should be evicted when container is deleted)
Publish counters specific to cache information
On when to emit cache full size information

Size gets impacted by addition/deletes => On add/delete
Periodic emitter => Gary shared a related code reference

Please share the design of the cache size computation (need to cover the CPU/resurce constraints)

Is the proposal above final solution? Or current stage?
Also there is an open fundamental question about "Is JSON serialized size the right representation of in-memory size"?
Can you please also cover that aspect?

Is the proposal above final solution? Or current stage?
Also there is an open fundamental question about "Is JSON serialized size the right representation of in-memory size"? Can you please also cover that aspect?

@kirankumarkolli  I choose this path because I feel that it is probably the best, which is why, in my documentation, I talked briefly about the other options, and I did strike through them.
After checking many sources, there is no accurate means to determine the actual size of an instanced managed object in .NET. Using Stream.Length is an approximation of the data contained within the object without the overhead. Memory is usually going to be slightly larger.
If we were dealing with structs, there are things like Marshall.SizeOf that we could use, but it is still just an approximation.
GC.GetTotalMemory(true) before and after caches are created or removed can give us a number of what was just add or created, but not the actual size of the caches without subtracting afterSize and beforeSize (afterSize - beforeSize). I don't really have a way of asserting this in a test other that the value is greater every time you add to the cache, and lesser every time you remove from the cache. And 0 if the cache is totally cleared. With this approach you get results like this from one of my tests
One cache item, one service endpoint
Post MemorySizes.TryAdd, the total memory size of AsyncArchivalTreeCache.Caches: (1496) bytes.
The memory size removed for https://localhost/ with key((7P[NqJ9[AUL=, 1)) was (1496) bytes.
Post MemorySizes.TryRemove, the total memory size of AsyncArchivalTreeCache.Caches: (0) bytes.

Two caches, one service endpoint
Post MemorySizes.TryAdd, the total memory size of AsyncArchivalTreeCache.Caches: (1736) bytes.
Post MemorySizes.TryAdd, the total memory size of AsyncArchivalTreeCache.Caches: (1752) bytes.
The memory size removed for https://localhost/ with key((#M1u8uTBIXw=, 2)) was (16) bytes.
The memory size removed for https://localhost/ with key((4Z.(u!yQnb>=, 1)) was (1736) bytes.
Post MemorySizes.TryRemove, the total memory size of AsyncArchivalTreeCache.Caches: (0) bytes.

Two caches, two service endpoints.
Post MemorySizes.TryAdd, the total memory size of AsyncArchivalTreeCache.Caches: (1408) bytes.
Post MemorySizes.TryAdd, the total memory size of AsyncArchivalTreeCache.Caches: (1424) bytes.
The memory size removed for https://localhost/ with key((YHI0O1mybjR=, 1)) was (1408) bytes.
Post MemorySizes.TryRemove, the total memory size of AsyncArchivalTreeCache.Caches: (16) bytes.
The memory size removed for https://localhost2/ with key((x+A]($XTR!j=, 2)) was (16) bytes.
Post MemorySizes.TryRemove, the total memory size of AsyncArchivalTreeCache.Caches: (0) bytes.

There is talk that BenchmarkDotNet and ObjectLayoutInspector has some functions that supposedly does the trick, but not sure this is something we want to introduce.

GC is for the whole process and there might be other concurrent allocations/de-allocations happening right? Our goal is to find just ArchivalTree approximation for the cache, process memory counters are already captured.
ObjectLayoutInspector: ArchivalTree is composed of DrainRoute, SplitGraph types, it's a fixed set of types (even if it evolves it will be a bounded set). If for each type how much space is in-memory, then we can compose the total size right?
Now for each of those types we can pre-compile/model the size and use as a possibility thoughts?

GC is for the whole process and there might be other concurrent allocations/de-allocations happening right? Our goal is to find just ArchivalTree approximation for the cache, process memory counters are already captured.
ObjectLayoutInspector: ArchivalTree is composed of DrainRoute, SplitGraph types, it's a fixed set of types (even if it evolves it will be a bounded set). If for each type how much space is in-memory, then we can compose the total size right?
Now for each of those types we can pre-compile/model the size and use as a possibility thoughts?

@kirankumarkolli
I agree with you sentiments on GC, which is why I did not wish to go that route but included it in the PR just as a point of reference just like I did for Stream.Length.
I do not know much about ObjectLayoutInspector. Maybe I am falsely assuming that this was not a viable option bringing in such a dependency in Compute Gateway so I do not fully understand your question or the direction you are going in when you make references to DrainRoute, SplitGraph types. If you are suggesting that ObjectLayoutInspector is not a deal breaker, then I will look into it more, but my next steps were to start reaching out to others for recommendations, but I think that we are just drawing this out but I am 100% sure you will disagree with whatever stance I take.
The reason why Stream.Length wins for me, at least for this iteration, is that it is a consistent number. It goes up. It goes down. It is something we can use to measure. It is not the accuracy of the number. It is what the number represents. But sure, we can keep going down this rabbit hole.

authors: kirankumarkolli philipthomas-MSFT


text:
Request signing with strong consistency does not work

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug
A read request with strong consistency with request signing enabled does not work - the head request isn't signed with the key
To Reproduce
Enable gateway signing, do a concurrent read/write workload with strong consistency. You'll see 403 in the internal sdk calls.
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
Provide a description of the actual behavior observed.
Environment summary
SDK Version:
OS Version (e.g. Windows, Linux, MacOSX)
Additional context
Add any other context about the problem here (for example, complete stack traces or logs).

Simple test case validation showed that signinghandler is called as expected for both write and reads.

Head/HeadFeed for Collection/Database are the ones having issues.
One suspicion is BarrierReqeustHelper.
@ausfeldt can you please look into it further?

The workaround is the add the header the same way as ComputeTransportHandler.cs in Microsoft.Azure.Cosmos.Friends for Direct Mode. For Gateway the header will have to be added using "internal HttpMessageHandler httpMessageHandler" on DocumentClient

authors: ausfeldt kirankumarkolli visridha