Skip to content

Comments

Doc workflows+queues wrangler config#28498

Open
ask-bonk[bot] wants to merge 2 commits intoproductionfrom
opencode/issue28474-20260221030518
Open

Doc workflows+queues wrangler config#28498
ask-bonk[bot] wants to merge 2 commits intoproductionfrom
opencode/issue28474-20260221030518

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Feb 21, 2026

All changes are complete and validated. Here's a summary of what was done:

Changes made to src/content/docs/workers/wrangler/configuration.mdx

1. Added workflows to the non-inheritable keys list (line 277-278)

The workflows key was added to the "Non-inheritable keys" section, confirming it cannot be inherited by environments and must be specified explicitly. This was verified against the EnvironmentNonInheritable interface in the workers-sdk repo (packages/workers-utils/src/config/environment.ts), where workflows is annotated with @nonInheritable.

2. Added queues to the non-inheritable keys list (line 274-275)

As noted in the issue's sidenote, queues was missing from this list despite being a non-inheritable binding (also confirmed in the EnvironmentNonInheritable interface).

3. Added the ### Workflows binding section (lines 1108-1142)

A new binding section was added between "Workers AI" and "Assets", documenting all properties from the WorkflowBinding type in the workers-sdk schema:

Property Type Required Description
binding string required Binding name for the Worker
name string required Name of the Workflow
class_name string required Exported Workflow class name
script_name string optional Worker script name (for external Workflows)

The remote property was intentionally omitted as it is a local development detail not typically documented in the binding sections (consistent with how other bindings handle this).

The section follows the same documentation pattern as other bindings (D1, KV, Queues, etc.) with intro text, property list using <Type> and <MetaInfo> components, and a <WranglerConfig> example block.

Closes #28474

github run

Co-authored-by: elithrar <elithrar@users.noreply.github.com>
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/pcx-technical-writing

@elithrar elithrar enabled auto-merge (squash) February 21, 2026 03:28
Copy link
Contributor Author

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Comprehensive review of the Workflows + Queues wrangler config changes.

Overall: The PR is well-structured. The workflows binding section accurately reflects the WorkflowBinding type from workers-sdk, the non-inheritable additions are correct per EnvironmentNonInheritable, and the config example is structurally valid. Two consistency issues found below.

Summary

Severity Finding
MEDIUM workflows type annotation uses object[] — inconsistent with all other bindings in the non-inheritable list which use object
LOW Workflows example uses concrete values (MY_WORKFLOW, my-workflow, MyWorkflow) instead of the <PLACEHOLDER> convention used by all other array-type binding examples

Validated

  • queues correctly added to non-inheritable keys (confirmed @nonInheritable in EnvironmentNonInheritable)
  • workflows correctly added to non-inheritable keys (confirmed @nonInheritable in EnvironmentNonInheritable)
  • WorkflowBinding fields match: binding (required), name (required), class_name (required), script_name (optional)
  • remote field correctly omitted (local dev detail, consistent with other bindings)
  • ✅ WranglerConfig block uses correct JSONC structure
  • ✅ Section placement (after Workers AI, before Assets) is logical
  • ✅ Trailing comma formatting is consistent across all touched blocks

- `queues` <Type text="object" /> <MetaInfo text="optional" />
- A list of Queue producers and consumers that your Worker should be bound to. Refer to [Queues](#queues).

- `workflows` <Type text="object[]" /> <MetaInfo text="optional" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every other binding in the non-inheritable list uses object — including queues (which is also not a flat array). Using object[] here breaks the convention. Per the pattern, this should be object.

Suggested change
- `workflows` <Type text="object[]" /> <MetaInfo text="optional" />
- `workflows` <Type text="object" /> <MetaInfo text="optional" />

@ask-bonk
Copy link
Contributor Author

ask-bonk bot commented Feb 23, 2026

Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@ask-bonk
Copy link
Contributor Author

ask-bonk bot commented Feb 23, 2026

Review complete. Here's what I found and fixed:

Review summary for PR #28498

Verified correct:

  • queues and workflows are both correctly added to the non-inheritable keys list — confirmed against EnvironmentNonInheritable in workers-sdk where both are annotated @nonInheritable
  • WorkflowBinding fields are accurate: binding (required), name (required), class_name (required), script_name (optional) all match the type definition
  • remote field correctly omitted (local dev detail, consistent with other bindings)
  • WranglerConfig example uses correct JSONC structure with the workflows top-level key containing an array of objects
  • Section placement (after Workers AI, before Assets) is logical
  • All trailing comma formatting changes are consistent

Two issues found and fixed:

  1. MEDIUM — Type annotation inconsistency (configuration.mdx:277): workflows used <Type text="object[]" /> while every other binding in the non-inheritable keys list uses <Type text="object" />. Fixed to object for consistency.

  2. LOW — Placeholder inconsistency (configuration.mdx:1134-1136): The Workflows example used concrete values ("MY_WORKFLOW", "my-workflow", "MyWorkflow") instead of <PLACEHOLDER> style (<BINDING_NAME>, <WORKFLOW_NAME>, <CLASS_NAME>). Every other array-type binding section (D1, KV, R2, Queues, Service Bindings, Vectorize, etc.) uses <PLACEHOLDER> convention. Fixed to match.

Both fixes committed and review suggestions posted on the PR.

github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing "workflows" keys to wrangler configuration docs

2 participants