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 — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️containerapp
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd containerapp job execution list cmd containerapp job execution list added parameter page_size

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

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