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).

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants