-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Serial-Console]: az serial-console connect: Change to use different region for url calls when custom storage account firewalls are enabled #5398
Conversation
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). |
…l-console-fix into main
According to the error log, it shows that we need use virtual machines == 2022-08-01, Latest profile in Azure CLI: Your recording file's virtual machines version: Line 16 in bb45618
Here are the suggestions:
|
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. |
error_message, recommendation=recommendation) | ||
else: | ||
if result.boot_diagnostics is not None: | ||
print(result.boot_diagnostics) |
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.
Is this print
for debug? Do you want to keep it in release version?
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.
That print was for debug purposes and I would like to keep it in the release version if possible. Is there a different way to implement that for debug purposes?
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.
Please use logger.debug()
then. This would be print only when --debug
parameter specified
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.
I updated the code to use the logger.debug() option instead of print
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.
Please import logger from knack:
from knack.log import get_logger
logger = get_logger(__name__)
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.
I added the missing import and kicked off the build again
Changed the print statement to use the logger.debug() option to only output the boot_diagnostics section for debugging
Added the logger import to correct the build failure
[Release] Update index.json for extension [ serial-console ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=10355&view=results |
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
azdev style <YOUR_EXT>
locally? (pip install azdev
required)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.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
.