-
Notifications
You must be signed in to change notification settings - Fork 1.5k
capture az error output and auto-fix the script #6750
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
Conversation
…gpt for it to suggest corrections, etc
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @sulixu, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
| if IS_MS_WINDOWS: | ||
| cmd = ["powershell", "-Command", script_content] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this is never reached. Or according to description, should just return/raise exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense, just add raise exception if this func is called from windows
| if not pattern in output: | ||
| raise CliTestError(f"Output from aks copilot did not contain '{pattern}'. Output:\n{output}") | ||
|
|
||
| def test_detect_az_error(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put these test cases to some other file? The test cases in test_aks_commands.py are live test cases.
FumingZhang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit 7ebb030.
This PR enhance run script to capture error output, which we can feed to chatgpt to suggest corrections, etc
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks copilot
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.