Commit af9037f
committed
Polish rolling deploy review follow-ups (round 3)
Address four optional review findings from claude[bot] on PR #3173:
- Tighten TEMPORARY_DIRECTORY_PATTERN to require >=4-digit PID and
>=8-char hex suffix so a real bundle hash like
`bundle.staging-1-abc123` cannot accidentally match the temp-dir
sweep pattern and be removed after STALE_TEMP_DIR_TTL_SECONDS.
- Log a per-hash success message after replace_bundle_directory so
successful rolling-deploy seeding is visible in production logs
(previously every failure path warned but success was silent).
- Document why restore_previous_bundle_directory's File.exist? guard
intentionally skips the mv on a TOCTOU race (defer to runtime
410-retry rather than overwrite a competing writer; backup_dir
gets swept on a later run).
- Filter `.staging-...`/`.previous-...` temp dirs out of the
doctor's renderer-cache bundle-hash count via a new
rolling_deploy_temp_dir_pattern helper, with a fallback constant
for when the Pro gem isn't loaded.
Adds regression specs for each change.1 parent d1aab55 commit af9037f
4 files changed
Lines changed: 92 additions & 4 deletions
File tree
- react_on_rails_pro
- lib/react_on_rails_pro
- spec/dummy/spec
- react_on_rails
- lib/react_on_rails
- spec/lib/react_on_rails
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2908 | 2908 | | |
2909 | 2909 | | |
2910 | 2910 | | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
2911 | 2916 | | |
2912 | 2917 | | |
2913 | 2918 | | |
2914 | | - | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
2915 | 2923 | | |
2916 | 2924 | | |
2917 | 2925 | | |
2918 | 2926 | | |
2919 | 2927 | | |
2920 | 2928 | | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
2921 | 2937 | | |
2922 | 2938 | | |
2923 | 2939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2589 | 2589 | | |
2590 | 2590 | | |
2591 | 2591 | | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
2592 | 2634 | | |
2593 | 2635 | | |
2594 | 2636 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
374 | 386 | | |
375 | 387 | | |
376 | 388 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
403 | | - | |
404 | | - | |
| 408 | + | |
| 409 | + | |
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
| |||
420 | 425 | | |
421 | 426 | | |
422 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
423 | 441 | | |
424 | 442 | | |
425 | 443 | | |
| |||
0 commit comments