Skip to content

Conversation

@penalosa
Copy link
Contributor

@penalosa penalosa commented Sep 16, 2025

Remove dummy auth from KV (https://jira.cfdata.org/browse/DEVX-2170) and add support for injecting trace headers


  • Tests
    • Tests included
    • Tests not necessary because: covered by existing tests
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal details + internal testing env var
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: change to TS SDK, which was only added in v4

@penalosa penalosa requested a review from a team as a code owner September 16, 2025 16:14
@changeset-bot
Copy link

changeset-bot bot commented Sep 16, 2025

🦋 Changeset detected

Latest commit: 2b6ac52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 16, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10678

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10678

miniflare

npm i https://pkg.pr.new/miniflare@10678

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10678

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10678

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10678

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10678

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10678

wrangler

npm i https://pkg.pr.new/wrangler@10678

commit: 2b6ac52

@github-actions
Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main penalosa/ts-sdk-dummy-auth might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-10678
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

headers.set("User-Agent", `wrangler/${wranglerVersion}`);
}

export function addTraceHeader(headers: Headers): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe update the name to indicate that it might not add anything?
i.e. addTraceHeaderWhenNeeded or maybeAddTraceHeader

Comment on lines 247 to 249
if (getTraceHeader()) {
headers.set("Cf-Trace-Id", getTraceHeader() as string);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: avoid the cast and calling the fn twice:

Suggested change
if (getTraceHeader()) {
headers.set("Cf-Trace-Id", getTraceHeader() as string);
}
const traceHeader = getTraceHeader();
if (traceHeader) {
headers.set("Cf-Trace-Id", traceHeader);
}

/** Docker host configuration (handled separately from environment variable factory). */
| "DOCKER_HOST";
| "DOCKER_HOST"
| "WRANGLER_TRACE_ID";
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make it clearer that this is not in the // ## Docker Configuration section and add a comment.

Is this wrangler specific or should rather be CLOUDFLARE_...

Copy link
Contributor

Choose a reason for hiding this comment

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

Would // ## Development & Local Testing be a better section to add that to?

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments/suggestions

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Sep 17, 2025
@penalosa penalosa added the skip-v3-pr Skip validation of presence of a v3 backport PR label Sep 17, 2025
@penalosa penalosa merged commit b30263e into main Sep 17, 2025
50 of 56 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Sep 17, 2025
@penalosa penalosa deleted the penalosa/ts-sdk-dummy-auth branch September 17, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-v3-pr Skip validation of presence of a v3 backport PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants