Describe the bug
az appservice plan create prints a warning after upgrading to 2.56.0. This is similar to a recent issue #26155
Related command
az appservice plan create
Errors
Readonly attribute name will be ignored in class <class 'azure.mgmt.web.v2023_01_01.models._models_py3.AppServicePlan'>
Issue script & Debug output
az appservice plan create
--location northeurope
--resource-group rg
--name name
--is-linux
--number-of-workers 1
--sku P0V3
--tags workload=infra SLA=full
--debug
cli.knack.cli: Command arguments: ['appservice', 'plan', 'create', '--location', 'northeurope', '--resource-group', 'rg', '--name', 'name', '--is-linux', '--number-of-workers', '1', '--sku', 'P0V3', '--tags', 'workload=infra', 'SLA=full', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001E18DBEB600>, <function OutputProducer.on_global_arguments at 0x000001E18DD75D00>, <function CLIQuery.on_global_arguments at 0x000001E18DDA3880>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'appservice': ['azure.cli.command_modules.appservice']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: appservice 0.412 73 260
cli.azure.cli.core: Total (1) 0.412 73 260
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 73 groups, 260 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : appservice plan create
cli.azure.cli.core: Command table: appservice plan create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001E190C0A200>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users...'.
az_command_data_logger: command args: appservice plan create --location {} --resource-group {} --name {} --is-linux --number-of-workers {} --sku {} --tags {} {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001E190C685E0>]
cli.knack.commands: Configured default 'northeurope' for arg location
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001E190C68680>, <function register_cache_arguments..add_cache_arguments at 0x000001E190C687C0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001E18DD75DA0>, <function CLIQuery.handle_query_parameter at 0x000001E18DDA3920>, <function register_ids_argument..parse_ids_arguments at 0x000001E190C68720>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\...', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users...\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/...', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/...', '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/...', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/...', 'device_authorization_endpoint': 'https://login.microsoftonline.com/...', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/...', '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/...', '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'}
msal.application: Broker enabled? False
azure.mgmt.web._serialization: Readonly attribute name will be ignored in class <class 'azure.mgmt.web.v2023_01_01.models._models_py3.AppServicePlan'>
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 4789c218-e89f-4e67-ad92-ddcac7c71a63
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/...
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: 'Content-Length': '236'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'cb213e6a-b134-11ee-a705-c49ded99a404'
cli.azure.cli.core.sdk.policies: 'CommandName': 'appservice plan create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--location --resource-group --name --is-linux --number-of-workers --sku --tags --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.56.0 (MSI) azsdk-python-azure-mgmt-web/7.2.0 Python/3.11.5 (Windows-10-10.0.19045-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "northeurope", "tags": {"workload": "infra", "SLA": "full"}, "sku": {"name": "P0V3", "tier": "PREMIUM0V3", "capacity": 1}, "properties": {"perSiteScaling": false, "reserved": true, "isXenon": false, "zoneRedundant": false}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/... HTTP/1.1" 200 None
cli.azure.cli.core.sdk.policies: Response status: 200
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: 'Transfer-Encoding': 'chunked'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '9881aa6b-9dad-4b55-a2c7-956e08a7461a'
cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-IIS/10.0'
cli.azure.cli.core.sdk.policies: 'X-AspNet-Version': '4.0.30319'
cli.azure.cli.core.sdk.policies: 'X-Powered-By': 'ASP.NET'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1198'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'c9a353a1-81ed-4518-a6d0-a4c9e2946c45'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SWEDENCENTRAL:20240112T102444Z:c9a353a1-81ed-4518-a6d0-a4c9e2946c45'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Fri, 12 Jan 2024 10:24:43 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/...}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x000001E190C41760>, <function x509_from_base64_to_hex_transform at 0x000001E190C41800>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
{
...
}
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001E190C0A480>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 4.707 seconds (init: 0.500, invoke: 4.208)
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 3440 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..."
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
No warning should be printed.
Environment Summary
azure-cli 2.56.0
core 2.56.0
telemetry 1.1.0
Extensions:
application-insights 1.0.0
authV2 0.1.3
azure-devops 0.26.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Additional context
No response
Hi @tuukkapuranen
Find similar issue https://github.com/Azure/azure-cli/issues/26155.
|
|
| Issue title |
az lock create: "Readonly attribute name will be ignored in class ..." |
| Create time |
2023-04-14 |
| Comment number |
7 |
Please confirm if this resolves your issue.
I think it's still not resolved.
{
"azure-cli": "2.59.0",
"azure-cli-core": "2.59.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
I see this when running az webapp up:
@pamelafox ➜ /workspaces/msdocs-python-flask-webapp-quickstart (devcontainer) $ az webapp up
The webapp 'gentle-wave-1e2c3865e00044e0b3f5bc834f5f40a6' doesn't exist
Creating Resource group 'pamelafox_rg_2014' ...
Resource group creation complete
Creating AppServicePlan 'pamelafox_asp_9661' or Updating if already exists
Readonly attribute name will be ignored in class <class 'azure.mgmt.web.v2023_01_01.models._models_py3.AppServicePlan'>
Creating webapp 'gentle-wave-1e2c3865e00044e0b3f5bc834f5f40a6' ...
Configuring default logging for the app, if not already enabled
Creating zip with contents of dir /workspaces/msdocs-python-flask-webapp-quickstart ...
Getting scm site credentials for zip deployment
Starting zip deployment. This operation can take a while to complete ...