[connectedk8s] Escaping newlines in python strings produces weird spaces in cli error messages
logangeorge01 opened this issue · comments
Describe the bug
Escaping new lines in python strings in connectedk8s cli extension is producing large spaces in error messages. One of our test cases relies on matching the error messages and the space is breaking us.
One of likely many occurences is in the following file at line 398.
https://github.com/Azure/azure-cli-extensions/blob/83a18a57c034f2e350e2c53bc46afc1909d3cfc2/src/connectedk8s/azext_connectedk8s/custom.py
Related command
Running az connectedk8s create
pointing to a k8s cluster that's already been connected. This issue likely appears many times in connectedk8s output, and maybe other extensions if they are following a similar pattern trying to shorten code line length.
Errors
The kubernetes cluster you are trying to onboard is already onboarded to the resource group 'rg' with resource name 'cluster'.
Issue script & Debug output
Not necessary
Expected behavior
Don't want to see the extra space in output
Environment Summary
az --version
azure-cli 2.55.0 *
core 2.55.0 *
telemetry 1.1.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\logangeorge.azure\cliextensions'
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
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @akashkeshari.