Skip to content

docs: improve bulk actions docs#4211

Open
carderne wants to merge 1 commit into
mainfrom
docs/bulk-actions-sdk-docs
Open

docs: improve bulk actions docs#4211
carderne wants to merge 1 commit into
mainfrom
docs/bulk-actions-sdk-docs

Conversation

@carderne

@carderne carderne commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator
  • Combine SDK and dashboard bulk actions docs
  • Fix API reference pages for bulk actions
  • Fix weird rendering on bulk actions page

Todo

  • not sure about having the SDK+dashboard combined and under "Using the dashboard"... need to find the right place

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: abd4478

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds a new bulk actions API surface (list, create, retrieve, abort under /api/v1/bulk-actions) to the OpenAPI spec, including new parameters and schemas for filters, requests, and responses. Documentation is restructured: the legacy docs/management/runs/bulk-actions.mdx page is removed, a new docs/bulk-actions.mdx guide covers dashboard and SDK usage (replay, cancel, retrieve, poll, abort, list), new per-endpoint management reference pages are added, navigation and redirects are updated, and a cross-reference is added in the errors-retrying documentation.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description omits required template sections like issue link, checklist, testing, changelog, and screenshots. Add the Closes # issue line and fill in the checklist, Testing, Changelog, and Screenshots sections per the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately reflects the bulk actions documentation update.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/bulk-actions-sdk-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3aa03664-a75c-4056-aaac-f0168ad38dbf

📥 Commits

Reviewing files that changed from the base of the PR and between e57fd9c and abd4478.

📒 Files selected for processing (9)
  • docs/bulk-actions.mdx
  • docs/docs.json
  • docs/errors-retrying.mdx
  • docs/management/bulk-actions/abort.mdx
  • docs/management/bulk-actions/create.mdx
  • docs/management/bulk-actions/list.mdx
  • docs/management/bulk-actions/retrieve.mdx
  • docs/management/runs/bulk-actions.mdx
  • docs/v3-openapi.yaml
💤 Files with no reviewable changes (1)
  • docs/management/runs/bulk-actions.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/management/bulk-actions/abort.mdx
  • docs/management/bulk-actions/retrieve.mdx
  • docs/management/bulk-actions/list.mdx
  • docs/management/bulk-actions/create.mdx
  • docs/errors-retrying.mdx
  • docs/bulk-actions.mdx
docs/**/docs.json

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/docs.json: Main documentation config must be defined in docs.json which includes navigation structure, theme, and metadata
Navigation structure in docs.json should be organized using navigation.dropdowns with groups and pages

Files:

  • docs/docs.json
**/{Dockerfile*,*.{yml,yaml}}

📄 CodeRabbit inference engine (AGENTS.md)

When updating Docker image references, always use multiplatform/index digests rather than architecture-specific digests.

Files:

  • docs/v3-openapi.yaml
🧠 Learnings (3)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/management/bulk-actions/abort.mdx
  • docs/management/bulk-actions/retrieve.mdx
  • docs/management/bulk-actions/list.mdx
  • docs/management/bulk-actions/create.mdx
  • docs/errors-retrying.mdx
  • docs/bulk-actions.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/management/bulk-actions/abort.mdx
  • docs/management/bulk-actions/retrieve.mdx
  • docs/management/bulk-actions/list.mdx
  • docs/management/bulk-actions/create.mdx
  • docs/errors-retrying.mdx
  • docs/bulk-actions.mdx
📚 Learning: 2026-06-14T17:36:56.078Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3942
File: docs/management/sessions/create.mdx:1-4
Timestamp: 2026-06-14T17:36:56.078Z
Learning: In trigger.dev docs, MDX pages under `docs/management/` that include an `openapi:` key in their frontmatter are intentional OpenAPI-driven reference stubs (typically `title` + `openapi` only). The page description is rendered from the referenced OpenAPI operation, so do not flag missing `description` frontmatter on these pages.

Applied to files:

  • docs/management/bulk-actions/abort.mdx
  • docs/management/bulk-actions/retrieve.mdx
  • docs/management/bulk-actions/list.mdx
  • docs/management/bulk-actions/create.mdx
🔇 Additional comments (16)
docs/bulk-actions.mdx (6)

3-12: LGTM!


25-54: LGTM!


55-97: LGTM!


98-127: LGTM!


196-227: 📐 Maintainability & Code Quality

No change needed for the frontmatter title
The frontmatter already includes title: "Bulk actions".

			> Likely an incorrect or invalid review comment.

128-195: 🗄️ Data Integrity & Integration

No issue here BulkActionObject already uses CANCEL/REPLAY, PENDING/COMPLETED/ABORTED, and counts.total/success/failure.

			> Likely an incorrect or invalid review comment.
docs/docs.json (2)

350-358: LGTM!


762-769: LGTM!

docs/errors-retrying.mdx (1)

380-383: LGTM!

docs/v3-openapi.yaml (3)

1702-1728: LGTM!

Also applies to: 1810-1877, 3966-3995, 4708-4815, 4928-4962


1729-1740: 🎯 Functional Correctness

No change needed: runs.bulk.* matches the public SDK surface.

			> Likely an incorrect or invalid review comment.

4834-4837: 🗄️ Data Integrity & Integration

No docs change needed. The request action is lowercase, while bulk-action response type is uppercase by design; the OpenAPI matches the server schema.

			> Likely an incorrect or invalid review comment.
docs/management/bulk-actions/create.mdx (1)

1-4: LGTM! Matches the create_bulk_action_v1 operation added in docs/v3-openapi.yaml.
Based on learnings, MDX pages under docs/management/ with an openapi: key are intentional OpenAPI-driven reference stubs and don't require a description field.

docs/management/bulk-actions/list.mdx (1)

1-4: LGTM! Matches the list_bulk_actions_v1 operation added in docs/v3-openapi.yaml.
Based on learnings, MDX pages under docs/management/ with an openapi: key are intentional OpenAPI-driven reference stubs and don't require a description field.

docs/management/bulk-actions/retrieve.mdx (1)

1-4: LGTM! Matches the retrieve_bulk_action_v1 operation added in docs/v3-openapi.yaml.
Based on learnings, MDX pages under docs/management/ with an openapi: key are intentional OpenAPI-driven reference stubs and don't require a description field.

docs/management/bulk-actions/abort.mdx (1)

1-4: LGTM! Matches the abort_bulk_action_v1 operation added in docs/v3-openapi.yaml.
Based on learnings, MDX pages under docs/management/ with an openapi: key are intentional OpenAPI-driven reference stubs and don't require a description field.

Comment thread docs/v3-openapi.yaml
Comment on lines +4840 to +4844
runIds:
type: array
minItems: 1
items:
type: string

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.

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Bound runIds array size.

runIds has minItems: 1 but no upper bound, unlike other array fields in this spec (e.g. batch trigger items has maxItems: 1000, RunTags has maxItems: 10). An unbounded list of run IDs in a single bulk action request could allow oversized payloads/requests that strain backend processing.

🛡️ Proposed fix to bound runIds
             runIds:
               type: array
               minItems: 1
+              maxItems: 1000
               items:
                 type: string

Also applies to: 4863-4867

@matt-aitken matt-aitken marked this pull request as ready for review July 9, 2026 17:39

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread docs/v3-openapi.yaml
Comment on lines +4708 to +4814
BulkActionFilter:
type: object
description: Selects runs using the same filter shape as `runs.list()`, excluding pagination fields. Provide at least one property.
minProperties: 1
properties:
status:
oneOf:
- type: string
enum:
- PENDING_VERSION
- QUEUED
- EXECUTING
- REATTEMPTING
- FROZEN
- COMPLETED
- CANCELED
- FAILED
- CRASHED
- INTERRUPTED
- SYSTEM_FAILURE
- type: array
items:
type: string
enum:
- PENDING_VERSION
- QUEUED
- EXECUTING
- REATTEMPTING
- FROZEN
- COMPLETED
- CANCELED
- FAILED
- CRASHED
- INTERRUPTED
- SYSTEM_FAILURE
taskIdentifier:
oneOf:
- type: string
- type: array
items:
type: string
description: The identifier of the task that was run.
version:
oneOf:
- type: string
- type: array
items:
type: string
description: The worker version that executed the run.
from:
oneOf:
- type: string
format: date-time
- type: number
description: Start of the time range as an ISO date string or Unix timestamp in milliseconds.
to:
oneOf:
- type: string
format: date-time
- type: number
description: End of the time range as an ISO date string or Unix timestamp in milliseconds.
period:
type: string
description: Relative time period to select, such as `24h` or `30d`.
example: 24h
bulkAction:
type: string
description: Select runs that were processed by another bulk action.
example: bulk_1234
tag:
oneOf:
- type: string
- type: array
items:
type: string
description: Select runs with one or more tags.
schedule:
type: string
description: Select runs created by a schedule.
example: sched_1234
isTest:
type: boolean
description: Select test or non-test runs.
batch:
type: string
description: Select runs in a batch.
example: batch_1234
queue:
oneOf:
- $ref: "#/components/schemas/QueueTypeName"
- type: array
items:
$ref: "#/components/schemas/QueueTypeName"
machine:
oneOf:
- type: string
- type: array
items:
type: string
description: Select runs by machine preset.
region:
oneOf:
- type: string
- type: array
items:
type: string
description: Select runs by region.

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.

🔍 BulkActionFilter schema differs structurally from CommonRunsFilter despite docs claiming same shape

The docs at docs/bulk-actions.mdx:76 and docs/bulk-actions.mdx:83 state that filter accepts "the same filter shape as runs.list()". However, the OpenAPI BulkActionFilter schema (docs/v3-openapi.yaml:4708-4814) differs from CommonRunsFilter (docs/v3-openapi.yaml:4453-4540) in several ways:

  1. Time fields (from, to, period) are flat top-level properties in BulkActionFilter, whereas in CommonRunsFilter they are nested under a createdAt object.
  2. BulkActionFilter allows single string OR array via oneOf for status, taskIdentifier, version, and tag, while CommonRunsFilter only accepts arrays.
  3. BulkActionFilter includes additional fields not in CommonRunsFilter: batch, queue, machine, region.

This is likely intentional — the SDK probably normalizes between these shapes — but the documentation's claim of "same filter shape" could mislead users who try to pass the raw HTTP API filter from runs.list() directly to the bulk action endpoint. If the SDK handles the mapping, this is fine, but it's worth confirming that the SDK documentation matches the actual API contract.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@kathiekiwi kathiekiwi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! 💟

@carderne carderne enabled auto-merge (squash) July 9, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants