Commit 7537fc2
Polish rolling deploy review follow-ups (round 4)
Address claude[bot] re-review on PR #3173 (six inline + summary items).
Comments and clarifying notes (no behavior change):
- replace_bundle_directory: document the brief between-mv unavailability
window, the kernel-atomic fast path, and the cross-FS slow path so the
trade-off is explicit at the call site.
- sweep_stale_temporary_directories: explain the no-op-on-missing-cache_dir
behavior is desired for Docker rebuilds but skips one cycle on
persistent-volume deploys where the cache_dir was wiped in between.
- valid_required_rsc_payload?: note that this only checks basename
presence; existence is validated downstream by valid_asset_payload?.
- handle_missing_adapter: explicit `return nil` after warn so the caller's
`return handle_missing_adapter` semantics don't depend on warn's value.
- docs/pro/rolling-deploy-adapters.md: new "When upload runs" section
documenting that staging/qa/preview/etc. all publish to the adapter and
pointing operators at a per-env-initializer escape hatch.
Behavior changes (defensive):
- seed_previous_hash: explicit FileUtils.mkdir_p(staging_dir) before the
first stage_previous_file call so a permission error surfaces with
"Failed to seed previous bundle hash" attribution instead of being
side-effect-created downstream by copy_file_atomically.
New tests:
- TEMPORARY_DIRECTORY_PATTERN consistency: assert it matches both
temporary_bundle_directory output AND the .previous-<pid>-<hex> backup
suffix produced by replace_bundle_directory, guarding against a future
rename of either suffix drifting the sweep regex.
- configuration: regression spec for kwarg-only upload signature
`def upload(bundle:, assets:)` (no positional bundle_hash) — should be
rejected.
- assets_precompile: assert publish_current_bundle_if_configured *does*
publish in non-dev/non-test envs (staging, production, qa, preview,
custom), guarding the skip list from being widened by accident.
All 33 rolling_deploy_cache_stager_spec, 92 configuration+assets_precompile
spec examples pass. RuboCop clean on touched files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a0835a1 commit 7537fc2
5 files changed
Lines changed: 83 additions & 1 deletion
File tree
- docs/pro
- react_on_rails_pro
- lib/react_on_rails_pro
- spec
- dummy/spec
- react_on_rails_pro
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
230 | 235 | | |
231 | 236 | | |
232 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
286 | 296 | | |
287 | 297 | | |
288 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
| |||
348 | 365 | | |
349 | 366 | | |
350 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
351 | 377 | | |
352 | 378 | | |
353 | 379 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
566 | 582 | | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
386 | 401 | | |
387 | 402 | | |
388 | 403 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
242 | 261 | | |
243 | 262 | | |
244 | 263 | | |
| |||
0 commit comments