Skip to content

[Containerapp] az containerapp job execution list: Fix incomplete paginated results - #34209

Open
Korede (kokelowo) wants to merge 3 commits into
Azure:devfrom
kokelowo:kokelowo-microsoft-containerapp-execution-pagination
Open

Korede (kokelowo) wants to merge 3 commits into
Azure:devfrom
kokelowo:kokelowo-microsoft-containerapp-execution-pagination

Conversation

@kokelowo

@kokelowo Korede (kokelowo) commented Oct 9, 2026 •

Copy link
Copy Markdown

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
❌ 1 ️✔️ 130/130
❌AzureCLI-BreakingChangeTest
❌network
rule cmd_name rule_message suggest_message
❌ 1012 - SubgroupRemove network application-gateway advanced-routing-map sub group network application-gateway advanced-routing-map removed please confirm sub group network application-gateway advanced-routing-map removed
❌ 1012 - SubgroupRemove network application-gateway advanced-routing-set sub group network application-gateway advanced-routing-set removed please confirm sub group network application-gateway advanced-routing-set removed
❌ 1007 - ParaRemove network application-gateway rule create cmd network application-gateway rule create removed parameter advanced_routing_map please add back parameter advanced_routing_map for cmd network application-gateway rule create
❌ 1007 - ParaRemove network application-gateway rule create cmd network application-gateway rule create removed parameter auth_configs please add back parameter auth_configs for cmd network application-gateway rule create
❌ 1007 - ParaRemove network application-gateway rule update cmd network application-gateway rule update removed parameter advanced_routing_map please add back parameter advanced_routing_map for cmd network application-gateway rule update
❌ 1007 - ParaRemove network application-gateway rule update cmd network application-gateway rule update removed parameter auth_configs please add back parameter auth_configs for cmd network application-gateway rule update
❌ 1007 - ParaRemove network application-gateway update cmd network application-gateway update removed parameter reserved_capacity please add back parameter reserved_capacity for cmd network application-gateway update
⚠️ 1010 - ParaPropUpdate network application-gateway routing-rule create cmd network application-gateway routing-rule create update parameter rule_type: updated property choices from ['AdvancedRouting', 'Basic', 'PathBasedRouting'] to ['Basic', 'PathBasedRouting']
⚠️ 1010 - ParaPropUpdate network application-gateway routing-rule update cmd network application-gateway routing-rule update update parameter rule_type: updated property choices from ['AdvancedRouting', 'Basic', 'PathBasedRouting'] to ['Basic', 'PathBasedRouting']
⚠️ 1010 - ParaPropUpdate network application-gateway rule create cmd network application-gateway rule create update parameter rule_type: updated property choices from ['AdvancedRouting', 'Basic', 'PathBasedRouting'] to ['Basic', 'PathBasedRouting']
⚠️ 1010 - ParaPropUpdate network application-gateway rule update cmd network application-gateway rule update update parameter rule_type: updated property choices from ['AdvancedRouting', 'Basic', 'PathBasedRouting'] to ['Basic', 'PathBasedRouting']
⚠️ 1010 - ParaPropUpdate network application-gateway update cmd network application-gateway update update parameter sku: updated property choices from ['Basic', 'Basic_WAF_v2', 'Basic_v2', 'Standard_Large', 'Standard_Medium', 'Standard_Small', 'Standard_v2', 'WAF_Large', 'WAF_Medium', 'WAF_v2'] to ['Basic', 'Standard_Large', 'Standard_Medium', 'Standard_Small', 'Standard_v2', 'WAF_Large', 'WAF_Medium', 'WAF_v2']

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

Related command

az containerapp job execution list

Description

The command currently returns only the first page of execution history when ARM supplies a nextLink.

This change:

  • Follows every non-empty nextLink and aggregates executions in server-provided order, including when an intermediate page is empty.
  • Validates continuation URLs against the active cloud's ARM endpoint and preserves their query parameters.
  • Preserves the command's flat-array output and the client's dictionary response shape.
  • Propagates later-page failures rather than returning incomplete results.

No new flags or API-version changes are included.

Testing Guide

With repository source packages on PYTHONPATH, the following command passed all 12 tests, covering pagination, error propagation, existing unit tests, and two recorded execution scenarios:

.\.venv\Scripts\python.exe -m unittest `
  azure.cli.command_modules.containerapp.tests.latest.test_containerappjob_execution_pagination `
  azure.cli.command_modules.containerapp.tests.latest.test_containerapp_utils `
  azure.cli.command_modules.containerapp.tests.latest.test_containerapp_validators `
  azure.cli.command_modules.containerapp.tests.latest.test_containerappjob_executions.ContainerAppJobsExecutionsTest.test_containerapp_job_executionstest_e2e `
  azure.cli.command_modules.containerapp.tests.latest.test_containerappjob_executions.ContainerAppJobsExecutionsTest.test_containerapp_job_custom_executionstest_e2e -v

Additional checks passed:

.\.venv\Scripts\python.exe -m azure.cli containerapp job execution list -h
.\.venv\Scripts\python.exe -m azure.cli containerapp job execution show -h
.\.venv\Scripts\python.exe -m flake8 --append-config=.flake8 --statistics src\azure-cli\azure\cli\command_modules\containerapp
git diff --check

Both help commands omit the removed flag, and an argument-parsing check confirmed that the removed flag is rejected before an ARM request is made.

Reviewer usage example with placeholder resource names:

az containerapp job execution list \
  --resource-group MyResourceGroup \
  --name my-containerapp-job

On a job with multiple execution pages, the command should return all executions, not just one.

History Notes

[Containerapp] az containerapp job execution list: Follow ARM pagination to return all executions


This checklist is used to make sure that common guidelines for a pull request are followed.

Follow ARM continuation URLs and return complete execution history. Add an optional page-size argument with regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 445d57df-fd66-4c9d-b6a0-ee9c14ca213d
Copilot AI balanced review requested due to automatic review settings October 9, 2026 20:38
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Oct 9, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Korede (@kokelowo)! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The introduced pageSize query parameter is absent from the selected ARM API contract.

1 open finding
What changed in this PR

Fixes Container App Job execution pagination while preserving output shape and continuation behavior.

Changes:

  • Aggregates all ARM execution pages securely.
  • Adds pagination tests and --page-size.
  • Updates command help.
File Description
_clients.py Implements pagination and continuation validation.
custom.py Forwards and validates page size.
_params.py Defines --page-size.
_help.py Documents pagination usage.
test_containerappjob_execution_pagination.py Tests pagination and failures.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/azure-cli/azure/cli/command_modules/containerapp/_clients.py Outdated
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 445d57df-fd66-4c9d-b6a0-ee9c14ca213d
@kokelowo Korede (kokelowo) changed the title [Containerapp] az containerapp job execution list: Fix incomplete paginated results [Containerapp] az containerapp job execution list: Fix incomplete paginated results Oct 14, 2026
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Keep automatic ARM continuation handling without exposing an undocumented query parameter.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 445d57df-fd66-4c9d-b6a0-ee9c14ca213d
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@Greedygre

Greedygre (Greedygre) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Hi @Azure/x-engineering-agent
The PR description seems not correct, AzureCLI-BreakingChangeTest that mention network is not relate to this PR
.
Maybe you can update the description.

@teresaritorto Teresa Ritorto (teresaritorto) added the Request X Engineering Agent Ask the agent to triage this issue or review this PR label Oct 20, 2026
@x-engineering-agent

x-engineering-agent Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

X Engineering Agent Report

Review — Comments

Korede (@kokelowo)

No confirmed semantic defects at head 724d6c4242d6409f24230385396357b1f591f9b2. Upstream CI passed 53/53 checks, but regression coverage for the issue scenario is not verified.

Copilot comment 4234382161 is addressed: _clients.py:1046-1055 sends only api-version on the initial request, while custom.py:1654-1657 and _params.py:481-483 expose no page-size option. Help now documents automatic pagination. The author's updated description also reports removal and argument rejection; service support for the removed parameter is no longer required.

The client follows continuations through empty intermediate pages, preserves execution order, and returns the flat execution array through custom.py:1658. Continuation origins are checked against the active cloud's ARM endpoint; later-page HTTP failures propagate instead of returning partial success.

Test validation
  • Agent live test: Not run; this is a review-only PR. Check author-provided test evidence and upstream CI separately.
  • Regression coverage: For containerapp: 1 focused test file(s) changed. Scenario coverage is unverified; review the issue's required conditions, test setup, and assertions before approval. No linked issue was found in the PR timeline; inspect the source issue and its required scenario manually.
Focused validation

src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_execution_pagination.py asserts 45 ordered results across three mocked pages, dictionary/flat-array output, missing/null/empty continuations, empty initial/intermediate pages, encoded URLs, later-page failures, sovereign endpoints and rejected foreign origins. These tests can detect first-page-only output, but mocked transport does not establish actual service continuation behavior.

The author reports 12 passing unit/recorded tests, help checks and removed-option rejection; these were not independently run here. The existing execution-list scenario asserts one or three results rather than multiple service pages. No recordings changed; existing recordings are src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/recordings/test_containerapp_job_executionstest_e2e.yaml and src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/recordings/test_containerapp_job_custom_executionstest_e2e.yaml.

Before merge, rerun python -m unittest azure.cli.command_modules.containerapp.tests.latest.test_containerappjob_execution_pagination -v and provide sanitized recording/output evidence for az containerapp job execution list -g MyResourceGroup -n my-containerapp-job against a job that actually returns ARM continuations. Compare the complete execution array and its order with every service page; the existing recordings do not prove these conditions and output.

Risk assessment — 16/100 · Low

The Low rating is driven by public CLI behavior.

  • Change scope: 4 changed files, 212 changed lines (+209 / -3), including 3 production files.
  • Affected components: containerapp
  • Risk drivers: public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is recommended for containerapp before merge.

Posted by x-engineering-agent (Reviewer)

@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Agent reviewed this PR label Oct 20, 2026

This branch has not been deployed

No deployments
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 customer-reported Issues that are reported by GitHub users external to the Azure organization. Request X Engineering Agent Ask the agent to triage this issue or review this PR X Engineering Agent Reviewed Agent reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants