Allow user-set workers/triggered_by annotation (or dashboard fallback rendering) for CI-based deploys #13823
batchprocess128
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
wrangler deployandwrangler versions uploadsetannotations.workers/triggered_byto"version_upload"automatically. This causes Cloudflare's dashboard Version History to display "Author: Unknown" for all CI-based deploys.The Workers Builds Git integration (Cloudflare's dashboard-managed Git build path) sets
workers/triggered_byto a value like"github:<username>", which the dashboard renders as proper attribution. But teams that prefer GitHub Actions (usingcloudflare/wrangler-action) over Workers Builds for explicitness / repeatability lose this attribution as a side effect.This creates an unnecessary trade-off. Letting CI deploys produce proper attribution would close the gap.
Use case
We run
cloudflare/wrangler-action@v3from GitHub Actions on push to main. Our deploy chain is:wrangler deploy --message "<commit subject>"This gives us full visibility into the deploy step (vs the Workers Builds Git integration, which is a less inspectable build path). Trade-off is the Author column on Cloudflare dashboard now reads "Unknown".
We'd like to keep wrangler-CLI deploys as the canonical path AND have proper deploy attribution.
Current behavior
After running
wrangler deploy:The dashboard renders the row as
by Unknown.Attempted workarounds
PATCH the version annotations after upload:
In our test, this returned
10405: Method not allowed for this authentication scheme. We could not find a documented update endpoint for Worker versions in the public API; versions appear to be immutable post-upload.Set
workers/triggered_byin the multipart upload metadata:Per the multipart-upload-metadata docs, the
annotationsfield acceptsworkers/message,workers/tag,workers/alias.workers/triggered_byis not listed and appears to be reserved.Cosmetic workaround: bake author into
--messageso it renders as"<subject> (by <author>)"in the Description column. Author column stays as Unknown.Proposed solutions
(A) Allow user-set
workers/triggered_byin the multipart uploadannotationsobject. wrangler would expose a new flag:(B) Auto-detect GitHub Actions context in wrangler when running under GHA (env vars
GITHUB_ACTIONS=true,GITHUB_ACTOR). Auto-setworkers/triggered_bytogithub-actions:${GITHUB_ACTOR}unless explicitly overridden.(C) Dashboard fallback rendering. If
workers/triggered_byis"version_upload", the dashboard could fall back tometadata.author_email, API token name, or a wrangler source field instead of "Unknown". This may be more palatable than letting users set a reserved annotation directly, since the substantive data (token-owner identity) is already on the version object.(B) is the most substantive for end-users: every wrangler-action user gets correct attribution without code changes on their side. (A) is the lower-level building block. (C) avoids the reserved-annotation question entirely and may be the cleanest fix from Cloudflare's side.
Why this matters
The Workers Builds vs wrangler-action choice should not require losing attribution. Today users have to pick:
That's an unnecessary trade-off that doesn't reflect the underlying capability — the version data already includes a token-owner identity that could be surfaced.
Repos / surfaces involved
cloudflare/workers-sdk(wrangler) → flag and/or auto-detectioncloudflare/wrangler-action→ potentially benefits without changes if (B) is shippedHappy to provide a draft PR if helpful.
Beta Was this translation helpful? Give feedback.
All reactions