Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.67.0 - SyntaxWarning: invalid escape sequence '\ ' #30440

Open
upasnagandhi0 opened this issue Nov 28, 2024 · 2 comments
Open

2.67.0 - SyntaxWarning: invalid escape sequence '\ ' #30440

upasnagandhi0 opened this issue Nov 28, 2024 · 2 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault az keyvault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@upasnagandhi0
Copy link

Describe the bug

After recent upgrade to version 2.67.0, I started receiving a SyntaxWarning on the first run of Python scripts. I ran command to access the password from KeyVault, which triggers the CI/CD pipeline for iOS Certificate.

Related command

az keyvault secret show --name <secret-name> --vault-name <keyvault-name>

Errors

/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/keyvault/v2023_02_01/models/_models_py3.py:4230: SyntaxWarning: invalid escape sequence '\ '
  """Properties of the vault.
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/keyvault/v2023_02_01/models/_models_py3.py:4349: SyntaxWarning: invalid escape sequence '\ '

Issue script & Debug output

cli.knack.cli: Command arguments: ['keyvault', 'secret', 'show', '--name', 'xyz', '--vault-name', 'xyz', '--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 0x1033f8040>, <function OutputProducer.on_global_arguments at 0x1035d0a40>, <function CLIQuery.on_global_arguments at 0x1035de2a0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'keyvault': ['azure.cli.command_modules.keyvault']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: keyvault 0.018 20 113
cli.azure.cli.core: Total (1) 0.018 20 113
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 20 groups, 113 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : keyvault secret show
cli.azure.cli.core: Command table: keyvault secret show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10550cfe0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/root/.azure/commands/2024-11-28.12-15-22.keyvault_secret_show.31958.log'.
az_command_data_logger: command args: keyvault secret show --name {} --vault-name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x1057927a0>]
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/keyvault/v2023_02_01/models/_models_py3.py:4230: SyntaxWarning: invalid escape sequence '\ '
"""Properties of the vault.
/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/mgmt/keyvault/v2023_02_01/models/_models_py3.py:4349: SyntaxWarning: invalid escape sequence '\ '
"""
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []

Expected behavior

To retrieve the password from KeyVault without warnings, allowing the pipeline to extract it on the first run.

Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/bin/python'
Extensions directory '/Users/upasna.gandhi/.azure/cliextensions'

Python (Darwin) 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@upasnagandhi0 upasnagandhi0 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 28, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 28, 2024

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

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot KeyVault az keyvault labels Nov 28, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 28, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 28, 2024
@yonzhan yonzhan added this to the Backlog milestone Nov 28, 2024
@bebound
Copy link
Contributor

bebound commented Dec 2, 2024

Please report this to Azure/azure-sdk-for-python#38618

Ref: #28829 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault az keyvault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants