Skip to content

[containerapp] Fix failing ACA apps when run together#9561

Merged
yanzhudd merged 1 commit intoAzure:mainfrom
jepetty:acaTestFix
Feb 2, 2026
Merged

[containerapp] Fix failing ACA apps when run together#9561
yanzhudd merged 1 commit intoAzure:mainfrom
jepetty:acaTestFix

Conversation

@jepetty
Copy link
Copy Markdown
Contributor

@jepetty jepetty commented Jan 29, 2026


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_containerapp fails 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 once

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? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

Copilot AI review requested due to automatic review settings January 29, 2026 19:55
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Jan 29, 2026

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

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

Hi @jepetty,
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
Copy Markdown
Collaborator

yonzhan commented Jan 29, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 setUpClass classmethod on ContainerappFunctionTests to probe for the application-insights extension via az extension show and install it with azdev extension add only 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.

Comment on lines +42 to +43
except Exception:
pass
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@Greedygre
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd merged commit 55eaba6 into Azure:main Feb 2, 2026
42 of 44 checks passed
jepetty added a commit to jepetty/azure-cli-extensions that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot ContainerApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants