You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/rclone-batch-upload.md
+24-16Lines changed: 24 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,41 @@
2
2
"@opennextjs/cloudflare": minor
3
3
---
4
4
5
-
feature: add --rcloneBatch flag for faster R2 cache uploads
5
+
feature: optional batch upload for faster R2 cache population
6
6
7
-
This adds a new optional `--rcloneBatch` flag that enables batch uploading to R2 using rclone instead of individual wrangler uploads. This significantly improves upload performance for large caches.
7
+
This update adds optional batch upload support for R2 cache population, significantly improving upload performance for large caches when enabled via environment variables.
8
8
9
-
**Supported commands:**
9
+
**Key Changes:**
10
+
11
+
1.**Optional Batch Upload**: Configure R2 credentials via environment variables to enable faster batch uploads:
12
+
13
+
-`R2_ACCESS_KEY_ID`
14
+
-`R2_SECRET_ACCESS_KEY`
15
+
-`R2_ACCOUNT_ID`
16
+
17
+
2.**Automatic Detection**: When credentials are detected, batch upload is automatically used for better performance
18
+
19
+
3.**Smart Fallback**: If credentials are not configured, the CLI falls back to standard Wrangler uploads with a helpful message about enabling batch upload for better performance
20
+
21
+
**All deployment commands support batch upload:**
10
22
11
23
-`populateCache` - Explicit cache population
12
24
-`deploy` - Deploy with cache population
13
25
-`upload` - Upload version with cache population
14
26
-`preview` - Preview with cache population
15
27
16
-
**Performance improvements:**
28
+
**Performance Benefits (when batch upload is enabled):**
17
29
18
-
-Creates staging directory with all cache files organized by R2 keys
19
-
-Uses rclone's parallel transfer capabilities (32 transfers, 16 checkers)
20
-
-Reduces API calls to Cloudflare
30
+
-Parallel transfer capabilities (32 concurrent transfers)
See [Cloudflare's rclone documentation](https://developers.cloudflare.com/r2/examples/rclone/) for more details.
71
+
- Significantly faster uploads for large caches using parallel transfers
72
+
- Reduced API calls to Cloudflare
73
+
- Automatically enabled when credentials are provided
108
74
109
-
**Default:**`false` (uses standard wrangler-based uploads)
75
+
**Fallback:**
76
+
If these environment variables are not set, the CLI will use standard Wrangler uploads. Both methods work correctly - batch upload is simply faster for large caches.
logger.info("Falling back to standard uploads...");
276
+
}
277
+
}else{
278
+
logger.info(
279
+
"Using standard cache uploads. For faster performance with large caches, set R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, and R2_ACCOUNT_ID environment variables to enable batch upload."
0 commit comments