azure-cli-extensions
azure-cli-extensions copied to clipboard
[Serial-Console]: az serial-console connect: Change to use different region for url calls when custom storage account firewalls are enabled
This changed introduces the ability when using custom storage accounts with the firewall enabled to use the region (i.e. westcentralUS) when connecting to serial-console. If the VIirtual Machine and custom storage account live in the same region then the user gets a Forbidden message when trying to connect to serial-console. These changes allow the code to find the pairing region and connect to serial-console through that region url.
.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az serial-console connect
General Guidelines
- [x] Have you run
azdev style <YOUR_EXT>locally? (pip install azdevrequired) - [x] Have you run
python scripts/ci/test_index.py -qlocally?
For new extensions:
- [ ] My extension description/summary conforms to the Extension Summary Guidelines.
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.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.
Thank you for your contribution rhkodiak! We will review the pull request and get back to you soon.
Serial-Console
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@yonzhan: @rhkodiak has run the tests successfully locally, is there some environmental disparity that causes the CI checks to fail?
@rhkodiak @brendank310
https://dev.azure.com/azclitools/public/_build/results?buildId=8724&view=logs&j=59e8686e-5e74-514d-6cad-f7d66c66b425&t=59602323-6717-504d-f2cc-5c81369f935f&l=1003
According to the error log, it shows that we need use virtual machines == 2022-08-01, But in your recording files virtual Machines version is 2022-03-01,
Latest profile in Azure CLI: https://github.com/Azure/azure-cli/blob/c1c805f5680f27b17412acf6fd53228b50edb8b2/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L153
Your recording file's virtual machines version: https://github.com/Azure/azure-cli-extensions/blob/bb45618e76a71ff8eef0dd06ec01fbde33ce0e32/src/serial-console/azext_serialconsole/tests/latest/recordings/test_check_resource_VM.yaml#L16
Here are the suggestions:
- git pull the latest code from Azure/azure-cli
- azdev setup -c
- merge the latest code into your branch
- rerun all the tests and make sure API version is 2022-08-01
@wangzelin007 @brendank310
Thank you for the help! I applied what you suggested and the tests are passing now. I couldn’t tell from the error logs what the problem was so much appreciated.
The PR is ready for your review and approval.
[Release] Update index.json for extension [ serial-console ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=10355&view=results