Skip to content

feat: add opt-in rclone cache population#1290

Merged
james-elicx merged 19 commits into
mainfrom
codex/rclone-cache-population
Jun 25, 2026
Merged

feat: add opt-in rclone cache population#1290
james-elicx merged 19 commits into
mainfrom
codex/rclone-cache-population

Conversation

@james-elicx

@james-elicx james-elicx commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

refs #1284

  • replay the commits from Add an rclone based option to populate the R2 cache #1116 on top of current main, preserving their original authorship
  • add --rclone as an explicit opt-in for remote R2 incremental-cache population
  • retain the existing worker-based population path as the default
  • dynamically import rclone.js only when the option is used
  • expose rclone.js as an optional peer dependency and report a clear error when it is not installed

Usage

pnpm add rclone.js
opennextjs-cloudflare deploy --rclone

The existing R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, and CF_ACCOUNT_ID environment variables are required.

Validation

  • pnpm code:checks
  • pnpm test (332 tests passed)

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 74e7838

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

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Minor

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

pkg-pr-new Bot commented Jun 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@1290

commit: 74e7838

Comment thread packages/cloudflare/src/api/cloudflare-context.ts Outdated
Comment thread packages/cloudflare/src/cli/commands/populate-cache.ts Outdated
Comment thread packages/cloudflare/src/cli/commands/populate-cache.ts Outdated
Comment thread packages/cloudflare/src/cli/commands/populate-cache.ts Outdated
Comment thread .changeset/recovered-rclone-batch-upload.md Outdated
Comment thread .changeset/recovered-rclone-batch-upload.md Outdated
Comment thread .changeset/recovered-rclone-batch-upload.md Outdated
@james-elicx

james-elicx commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

needs manual testing still

Working :)

image

@james-elicx james-elicx marked this pull request as ready for review June 24, 2026 18:37

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread packages/cloudflare/src/cli/commands/populate-cache.ts

@petebacondarwin petebacondarwin left a comment

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.

I read through the code, but I have not tried running it.

Comment thread .changeset/recovered-rclone-batch-upload.md Outdated
```bash
pnpm install rclone.js
pnpm approve-builds # select rclone.js
pnpm rebuild rclone.js

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.

Is this also a valid pnpm command?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Interesting! The docs don't mention a positional param.

Co-authored-by: Pete Bacon Darwin <pbacondarwin@cloudflare.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants