Skip to content

Conversation

@sulixu
Copy link
Contributor

@sulixu sulixu commented Sep 12, 2023


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

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

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.json automatically.
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.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Sep 12, 2023

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link

Hi @sulixu,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 12, 2023

Thank you for your contribution! We will review the pull request and get back to you soon.

Comment on lines 132 to 133
if IS_MS_WINDOWS:
cmd = ["powershell", "-Command", script_content]
Copy link
Member

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?

Copy link
Contributor Author

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):
Copy link
Member

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.

Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhoxing-ms zhoxing-ms merged commit 7ebb030 into Azure:main Sep 15, 2023
sulixu added a commit to sulixu/azure-cli-extensions that referenced this pull request Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants