fix(server): allow R2 SQL metadata queries#294
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
onequery-landing | e6a7f3b | Commit Preview URL Branch Preview URL |
Jun 26 2026, 12:58 AM |
7a3b930 to
e6a7f3b
Compare
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.
One-Line Summary
Cloudflare R2 SQL sources can now run SHOW and DESCRIBE metadata queries through the normal query path.
User-Facing Changes
SHOW TABLES,SHOW COLUMNS FROM ...,DESCRIBE ..., andDESC ....Why This Changed
The shared SQL validator only accepted SELECT-shaped ASTs. Cloudflare R2 SQL uses Athena-style metadata commands for catalog exploration, so valid read-only discovery queries were rejected even though the provider connection test already used
SHOW DATABASES.How It Changed
showanddescribeexpressions.EXPLAIN SELECTas adescribeexpression.Bug Fixes
SHOW TABLESwere rejected as non-SELECT queries; this change allows those read-only metadata commands.Extra Context / Decisions (Optional)
The expanded allowlist is scoped to
cloudflare_r2_sql; other providers still accept SELECT-only queries through the shared validator.Verification
MISE_TRUSTED_CONFIG_PATHS=$PWD/mise.toml mise exec -- bun run formatMISE_TRUSTED_CONFIG_PATHS=$PWD/mise.toml mise exec -- bunx turbo test --json --filter=@onequery/serverMISE_TRUSTED_CONFIG_PATHS=$PWD/mise.toml mise exec -- bunx turbo typecheck --json --filter=@onequery/serverVideo / Screenshot (Optional)