[containerapp] Fix failing ACA apps when run together#9561
[containerapp] Fix failing ACA apps when run together#9561yanzhudd merged 1 commit intoAzure:mainfrom
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @jepetty, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts the containerapp function tests so that the application-insights extension is installed once per test class (and only if needed), rather than on every test instance, to avoid failures when running the full azext_containerapp test suite together.
Changes:
- Introduced a
setUpClassclassmethod onContainerappFunctionTeststo probe for theapplication-insightsextension viaaz extension showand install it withazdev extension addonly when missing. - Removed the per-instance extension installation and sleep from the
__init__constructor so tests no longer redundantly install the extension for every case.
| except Exception: | ||
| pass |
There was a problem hiding this comment.
Catching a broad Exception here and silently doing nothing can hide legitimate setup problems (e.g. az/azdev not being available or the extension add failing) and make later test failures harder to diagnose. Consider narrowing the exception to the specific failure modes you expect (such as subprocess.CalledProcessError / FileNotFoundError) and at least logging a message when extension installation is skipped or fails.
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
azdev test azext_containerapp
This isn't customer-facing at all. Running all containerapp tests with
azdev test azext_containerappfails for me (on multiple machines) because of application-insights extension installation. This (admittedly copilot generated) change fixes this (again, on multiple machines) so the test-suite can be run at onceGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)