{Container Apps} az containerapp function list/show: Raise clear error when ingress is disabled#10070
Open
Pulkit-Jain1 wants to merge 2 commits into
Open
{Container Apps} az containerapp function list/show: Raise clear error when ingress is disabled#10070Pulkit-Jain1 wants to merge 2 commits into
az containerapp function list/show: Raise clear error when ingress is disabled#10070Pulkit-Jain1 wants to merge 2 commits into
Conversation
…n ingress is disabled `az containerapp function list` and `az containerapp function show` returned a generic InternalServerError when the Container App's ingress was disabled, because the function metadata is only populated by the platform while ingress is enabled. This adds a pre-check that detects the disabled-ingress case (from the container app already fetched during validation) and raises an actionable ValidationError instead of the opaque server error. - New validator `validate_functionapp_ingress_enabled` in _validators.py. - Wired into the list and show function decorators. - Added a scenario test covering the ingress-disabled case for list and show. - Bumped extension version to 1.3.0b5 and added a HISTORY.rst entry.
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
Contributor
|
Thank you for your contribution @Pulkit-Jain1! We will review the pull request and get back to you soon. |
Collaborator
|
containerapp |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves az containerapp function list / az containerapp function show by detecting the “ingress disabled” case up front and returning an actionable ValidationError instead of letting the underlying API fail with a generic server error. It also adds a scenario test and bumps the extension version.
Changes:
- Add
validate_functionapp_ingress_enabledand wire it into function list/show flows. - Add a scenario test covering ingress-disabled behavior.
- Bump extension version and add release notes entry.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/containerapp/setup.py |
Bumps extension version to 1.3.0b5. |
src/containerapp/HISTORY.rst |
Adds release note for the ingress-disabled error improvement. |
src/containerapp/azext_containerapp/tests/latest/test_containerapp_function.py |
Adds scenario test validating the new ingress-disabled error behavior. |
src/containerapp/azext_containerapp/containerapp_functions_decorator.py |
Calls the new ingress-enabled validator for list/show. |
src/containerapp/azext_containerapp/_validators.py |
Introduces the new ingress-enabled validator. |
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
…on bump - Reuse the Container App already retrieved during kind validation instead of an extra ARM GET in the ingress pre-check (validate_functionapp_kind now returns the definition; validate_functionapp_ingress_enabled accepts it). - Revert the setup.py version bump; the changelog entry stays under 'upcoming' and the version is bumped at release time.
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
az containerapp function listandaz containerapp function showreturned a genericInternalServerErrorwhen the target Container App (Function) had ingress disabled. The function metadata these commands read is only populated by the platform while ingress is enabled, so the underlying API fails opaquely when it is off, giving users no indication of the cause or the fix.This change adds a pre-check that detects the disabled-ingress case (using the Container App already fetched during validation, so no extra ARM call) and raises an actionable
ValidationErrorinstead of the opaque server error.Behavior
Ingress must be enabled to view functions for the containerapp '<name>'. Enable ingress on the container app and try again.az containerapp function listandaz containerapp function show.Changes
validate_functionapp_ingress_enabledin_validators.py.listandshowfunction decorators.test_containerapp_function_list_show_ingress_disabled) with its recording.1.3.0b5and added aHISTORY.rstentry.Testing
AZURE_TEST_RUN_LIVE=true) and verified it passes in playback mode (offline, cassette-only).listandshownow return the actionable error; an ingress-enabled app lists/show functions normally.History Notes
az containerapp function list/show: Raise a clear error when ingress is disabled instead of a generic server error