Skip to content

Reimplement containers list using Dash API endpoints#12893

Merged
gpanders merged 13 commits intomainfrom
ganders/CC-7238
Mar 19, 2026
Merged

Reimplement containers list using Dash API endpoints#12893
gpanders merged 13 commits intomainfrom
ganders/CC-7238

Conversation

@gpanders
Copy link
Copy Markdown
Member

@gpanders gpanders commented Mar 13, 2026

Fixes CC-7238.

As a follow up to #12873, re-implement wrangler containers list to use the paginated Dash API endpoint and use a table format that matches wrangler containers instances.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: not a new feature or breaking change

Open with Devin

@gpanders gpanders requested review from a team as code owners March 13, 2026 20:51
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 4c39b77

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 13, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

✅ All changesets look good

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 13, 2026

I've now thoroughly reviewed the entire PR. Let me analyze what I've found:

  1. New list.ts - Clean implementation of the containers list command using the Dash API
  2. DashApplication model - New type for the summary representation
  3. ApplicationsService.listDashApplications - New service method
  4. Test coverage - Comprehensive tests for state derivation, error handling, pagination, JSON output
  5. instances.ts refactoring - Split non-interactive and --json paths for clarity, renamed ContainerState to InstanceState

The code is well-structured, matches the pattern from the existing instances.ts command, and has good test coverage. The state derivation logic correctly prioritizes: degraded (failed > 0) > provisioning (starting/scheduling > 0) > active (active > 0) > ready (all zero).

Let me check one potential edge case - the err.body.error access in the 400 handler is accessing the error field on the body, which is typed as any on ApiError. The test mock includes error: "bad request" so it matches. This is consistent with the existing instances.ts pattern.

The containers.ts cleanup correctly removes the old listYargs, listCommand, listCommandHandle, listContainersAndChoose, and containersListCommand - all moved to or replaced by list.ts.

The changeset is appropriate - minor for wrangler (new behavior), patch for containers-shared (new type/method).

I don't see any logic bugs, security issues, backward compatibility problems, or incorrect API behavior.

LGTM

github run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 13, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12893

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12893

miniflare

npm i https://pkg.pr.new/miniflare@12893

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12893

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12893

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12893

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12893

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12893

wrangler

npm i https://pkg.pr.new/wrangler@12893

commit: 4c39b77

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 18, 2026
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@gpanders gpanders merged commit 782df44 into main Mar 19, 2026
36 checks passed
@gpanders gpanders deleted the ganders/CC-7238 branch March 19, 2026 20:12
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants