-
Notifications
You must be signed in to change notification settings - Fork 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
{Container} az container attach
: Fix the exception handling for streaming logs
#26807
base: dev
Are you sure you want to change the base?
Conversation
…modules/container/custom.py. This updating is due to the fact that an exception was not properly handled. This exception takes place when a log is received by the function _stream_logs but is None for some reason. Indeed, this function is properly working in most scenarios but problems have been experienced for some particular deployments where some libraries have their own log system
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Thank you for your contribution LuisJesusMunozMolina! We will review the pull request and get back to you soon. |
custom.py |
@LuisJesusMunozMolina Please resolve these CI issues |
@fnuarnav Could you please help review this container related PR? |
I will review it, thank you :) |
az container attach
: Fix the exception handling for streaming logs
@LuisJesusMunozMolina Any update? |
Hi @zhoxing-ms , I took a look but I did not see any detail about the CI issues, so I could not fix them yet. Could someone please give some hints? |
Sorry, I am super busy recently, @yanzhudd will help check the CI issue and give you some tips |
Related command
stream_logs function in src/azure-cli/azure/cli/command_modules/container/custom.py.
Description
This issue is due to the fact that an exception was not properly handled. This exception takes place when a log is received by the function _stream_logs but is of type Nonetype for some reason. Indeed, this function is properly working in most scenarios, however problems have been experienced for some particular deployments where some libraries have their own log system, and therefor these logs cannot be properly treated by the _stream_logs function.
This issues does not take place when the docker container is run in local, it only appears when it is deployed in the Azure Container Instance
In this pull request, a try and except policy have been included in order handle the exception
History Notes
{Azure Container Instance} cli-custom.py. MINOR ISSUE: bad exception handling in _stream_logs function in custom.py file
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.