Skip to content

Add D1 export prompt message for unavailability#13575

Merged
jamesopstad merged 3 commits intomainfrom
lambros/cfsql-1608
Apr 17, 2026
Merged

Add D1 export prompt message for unavailability#13575
jamesopstad merged 3 commits intomainfrom
lambros/cfsql-1608

Conversation

@lambrospetrou
Copy link
Copy Markdown
Contributor

@lambrospetrou lambrospetrou commented Apr 16, 2026

Fixes #[CFSQL-1608].

Add a confirmation prompt that the database will be unavailable to queries during the export.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: no feature change

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: 5125cef

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

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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 16, 2026
@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team April 16, 2026 18:31
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 16, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/d1
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 16, 2026

Good. The pattern is consistent with d1/delete.ts. The implementation looks solid. Let me review the overall quality:

  1. Implementation (export.ts): Adds skip-confirmation flag (consistent with delete.ts), gates the confirm() prompt behind !skipConfirmation, and cleanly exits with a log message on rejection. The confirm function's default fallbackValue: true means non-interactive/CI contexts auto-approve, so existing non-TTY tests (like the "should handle remote" test at line 117) continue to work without changes.

  2. Tests (export.test.ts): Three new tests covering:

    • Confirmation accepted (interactive, prompt approved)
    • Confirmation rejected (interactive, prompt denied)
    • --skip-confirmation flag bypass
  3. Missing changeset: The changeset bot flagged this. Per repo rules, this is a user-facing change (new prompt + new flag) and needs a changeset.

The code looks correct and follows established patterns. The only concern is the missing changeset, but that's a process item, not a code issue.

LGTM

github run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 16, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 5125cef

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

✅ All changesets look good

devin-ai-integration[bot]

This comment was marked as resolved.

lambrospetrou and others added 3 commits April 16, 2026 19:55
Include option to skip confirmation for D1 export prompt.
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Apr 17, 2026
@jamesopstad jamesopstad merged commit 6d887db into main Apr 17, 2026
71 of 75 checks passed
@jamesopstad jamesopstad deleted the lambros/cfsql-1608 branch April 17, 2026 11:02
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants