Doc workflows+queues wrangler config#28498
Conversation
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
There was a problem hiding this comment.
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
- ✅
queuescorrectly added to non-inheritable keys (confirmed@nonInheritableinEnvironmentNonInheritable) - ✅
workflowscorrectly added to non-inheritable keys (confirmed@nonInheritableinEnvironmentNonInheritable) - ✅
WorkflowBindingfields match:binding(required),name(required),class_name(required),script_name(optional) - ✅
remotefield 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" /> |
There was a problem hiding this comment.
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.
| - `workflows` <Type text="object[]" /> <MetaInfo text="optional" /> | |
| - `workflows` <Type text="object" /> <MetaInfo text="optional" /> |
…n wrangler config
|
Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
Review complete. Here's what I found and fixed: Review summary for PR #28498Verified correct:
Two issues found and fixed:
Both fixes committed and review suggestions posted on the PR. |
|
Preview URL: https://3b18e2ee.preview.developers.cloudflare.com Files with changes (up to 15) |
All changes are complete and validated. Here's a summary of what was done:
Changes made to
src/content/docs/workers/wrangler/configuration.mdx1. Added
workflowsto the non-inheritable keys list (line 277-278)The
workflowskey was added to the "Non-inheritable keys" section, confirming it cannot be inherited by environments and must be specified explicitly. This was verified against theEnvironmentNonInheritableinterface in the workers-sdk repo (packages/workers-utils/src/config/environment.ts), whereworkflowsis annotated with@nonInheritable.2. Added
queuesto the non-inheritable keys list (line 274-275)As noted in the issue's sidenote,
queueswas missing from this list despite being a non-inheritable binding (also confirmed in theEnvironmentNonInheritableinterface).3. Added the
### Workflowsbinding section (lines 1108-1142)A new binding section was added between "Workers AI" and "Assets", documenting all properties from the
WorkflowBindingtype in the workers-sdk schema:bindingnameclass_namescript_nameThe
remoteproperty 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