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

[connectedk8s] Escaping newlines in python strings produces weird spaces in cli error messages #7577

Open
logangeorge01 opened this issue May 6, 2024 · 2 comments
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Connected Kubernetes Service Attention This issue is responsible by Azure service team.

Comments

@logangeorge01
Copy link

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

@logangeorge01 logangeorge01 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 6, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Connected Kubernetes Service Attention This issue is responsible by Azure service team. labels May 6, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented May 6, 2024

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

Copy link
Contributor

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

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 bug This issue requires a change to an existing behavior in the product in order to be resolved. Connected Kubernetes Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants