Skip to content

fix: update R2 SQL response format and env variable#10654

Merged
dario-piotrowicz merged 3 commits intomainfrom
nlapkov/r2-sql-new-response-format
Sep 16, 2025
Merged

fix: update R2 SQL response format and env variable#10654
dario-piotrowicz merged 3 commits intomainfrom
nlapkov/r2-sql-new-response-format

Conversation

@laplab
Copy link
Copy Markdown
Contributor

@laplab laplab commented Sep 15, 2025

This PR changes env variable used for R2 SQL token from CLOUDFLARE_API_TOKEN to WRANGLER_R2_SQL_AUTH_TOKEN. It also updates the query command to use the latest version of response from R2 SQL service.

Approval: CR-1298405


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: It's a new service

@laplab laplab requested a review from a team as a code owner September 15, 2025 11:49
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 15, 2025

🦋 Changeset detected

Latest commit: 68287d3

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

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@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
Copy Markdown

pkg-pr-new bot commented Sep 15, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 68287d3

Comment on lines 84 to 86
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about const token = getWranglerR2SqlAuthToken() ?? getCloudflareAPITokenFromEnv()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We could do that! The only thing is I want to keep the warning log about the fallback. I don't think that behaviour is super clear to the user and it would be great to have some way to notify them

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Sep 15, 2025
@laplab laplab force-pushed the nlapkov/r2-sql-new-response-format branch from 846c97f to 68287d3 Compare September 16, 2025 14:00
@dario-piotrowicz dario-piotrowicz merged commit a4e2439 into main Sep 16, 2025
45 of 50 checks passed
@dario-piotrowicz dario-piotrowicz deleted the nlapkov/r2-sql-new-response-format branch September 16, 2025 15:57
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants