Ewc eventhub notifs - #32694
Open
owang-cloud wants to merge 12 commits into
Open
Conversation
Add a Workers source section to the Queues event subscriptions schemas page, covering the seven Worker lifecycle events emitted to the Event Hub: deployment.created, deployment.deleted, version.created, version.deleted, worker.created, worker.updated, and worker.deleted. Include notes for behaviour that is easy to misread: - The payload `name` is the Worker name at the time the event fired and can change. The stable identifier is the script tag in `source.id`. - `changed` on worker.updated lists unversioned config fields using snake_case Workers API field names, not the camelCase JSON keys. - deployment.created `versions` is the default traffic split summing to 100. Deployments using cohorts can route to versions not listed. - Delivery is at-least-once and unordered, so deduplicate on the payload `id` and sort on metadata.eventTimestamp.
`changed` is an object keyed by the field that changed, not an array of field names, and it publishes before and after values. Each value reports `from` and `to` for scalar fields, `added` and `removed` for set-valued fields such as tags and tail_consumers, and an empty object for preview_defaults, which changes opaquely. The example now matches the emitting service's test fixture exactly. This replaces the earlier claim that values are sorted and de-duplicated and that no before or after values are included, both of which no longer hold.
Contributor
|
/bonk review |
Contributor
|
LGTM! |
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
reviewed
Aug 12, 2026
GregBrimble
approved these changes
Aug 12, 2026
GregBrimble
left a comment
Contributor
There was a problem hiding this comment.
Considering reordering so each resource is in order of typical use/workflow (a Worker is created, a version is created, and a deployment is created):
worker.created, worker.updated, worker.deleted, version.created, version.deleted, deployment.created, deployment.deleted.
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
….mdx Co-authored-by: Greg Brimble <developer@gregbrimble.com>
owang-cloud
marked this pull request as ready for review
August 12, 2026 21:56
owang-cloud
requested review from
a team,
elithrar,
harshil1712,
irvinebroque,
jonesphillip,
mia303,
rita3ko and
vy-ton
as code owners
August 12, 2026 21:56
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32694 (https://github.com/cloudflare/cloudflare-docs/pull/32694).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (1)
#### CR-41539359c74c · Inconsistent payload field name for worker name
- **File:** `src/content/partials/queues/event-subscriptions/workers-events.mdx` line 162
- **Issue:** Most Worker events use `payload.name` for the worker name (e.g., `worker.created` line 15, `worker.updated` line 40, `worker.deleted` line 85, `version.created` line 110, `version.deleted` line 136, and `deployment.deleted` line 205), but `deployment.created` uses `payload.workerName` (line 162).
- **Fix:** Verify the actual event schema and use a consistent field name for the worker name across all events. If `deployment.created` really emits `workerName`, consider updating `deployment.deleted` to match, or vice versa.
---
## Conventions
### Warnings (1)
#### CV-f20d5a36239d · Product or area identified
- **File:** PR-level finding
- **Issue:** The title "Ewc eventhub notifs" does not clearly identify the product, feature, or content area the change affects.
- **Fix:** Rename the title to identify the affected area, e.g. "[Queues] Add Workers lifecycle events to event subscriptions schema reference".
---
## Style Guide Review
### Suggestions (2)
#### SG-fbc3ef46e24f · Serial comma
- **File:** `src/content/partials/queues/event-subscriptions/workers-events.mdx` line 64
- **Issue:** List of seven items is missing the comma before the final conjunction: "`name`, `tags`, `subdomain`, `observability`, `logpush`, `tail_consumers`, and `usage_model`"
- **Fix:** Add a serial comma before `and`: `` `tail_consumers`, and `usage_model` ``
#### SG-8aa0b8c5823e · Short bulleted list
- **File:** `src/content/partials/queues/event-subscriptions/workers-events.mdx` line 68
- **Issue:** Bulleted list has only two items
- **Fix:** Consider rewriting the pair of items as prose instead of a bullet list
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
ConventionsWarnings (1)
Style Guide ReviewSuggestions (2)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Workers source to the event subscriptions schema reference, documenting the seven Worker lifecycle events that can be delivered to a queue:
deployment.created,deployment.deleted,version.created,version.deleted,worker.created,worker.updated, andworker.deleted.Each event gets a description and a full example payload. The reference also covers behavior that is easy to misread from the payloads alone:
source.id.deployment.createdreports the name inworkerName, while every other event usesname.version.createdfires whenever a version is created, not only on upload. Rollbacks and secret changes copy an existing version and emit the event with no upload.deployment.createdannotations use two keys,workers/messageandworkers/triggered_by. Deployments made through the deployments API always report"workers/triggered_by": "deployment".versionsarray ondeployment.createdis the default traffic split and always sums to 100. Deployments that use cohorts can route traffic to versions that do not appear inversions.changedonworker.updatedis keyed by the public Workers API field names rather than the camelCase JSON keys, andpreviews_base_configreports an empty object so preview secrets stay out of the event.idand sort onmetadata.eventTimestamp.