Commit a88bcdd
committed
fix(cli): address review findings on the update config surface
The unrecognized-mode warning was printed inside resolve(), before the
precedence rules it sits behind had been applied, so it escaped onto stderr
during --format json, in CI, with a piped stderr and under --quiet. It is now
held on the policy and emitted at the one point where the run is known to be
speaking at all.
The notify interval is keyed to the announced version rather than to time
alone. Time alone swallowed the NEXT release whenever it landed inside the
window, so a week-long interval set to stop nagging about one version also hid
the version that fixed it -- the opposite of what the setting says it does.
The interval comparison is unsigned. Duration::as_secs() as i64 can go
negative for a large enough configured value, and a negative interval compares
as already-elapsed, which would notify every run.
Cache writes survive a second perry process. Each write now uses its own
temporary file instead of one shared name that two writers rename over each
other, leaving a file the winner is still writing. The read-modify-write pairs
are serialized by a lock file, and a refresh re-reads the notice state inside
that lock rather than using a value read before its request went out -- which
would otherwise drop a notice recorded while the request was in flight and
tell the user twice.1 parent 690063a commit a88bcdd
4 files changed
Lines changed: 178 additions & 27 deletions
File tree
- changelog.d
- crates/perry/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
545 | 550 | | |
546 | 551 | | |
547 | 552 | | |
| |||
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
561 | | - | |
| 566 | + | |
562 | 567 | | |
563 | 568 | | |
564 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
565 | 574 | | |
566 | 575 | | |
567 | 576 | | |
| |||
570 | 579 | | |
571 | 580 | | |
572 | 581 | | |
573 | | - | |
| 582 | + | |
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
93 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
94 | 109 | | |
95 | 110 | | |
96 | 111 | | |
| |||
100 | 115 | | |
101 | 116 | | |
102 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
103 | 139 | | |
104 | 140 | | |
105 | 141 | | |
106 | 142 | | |
107 | | - | |
| 143 | + | |
| 144 | + | |
108 | 145 | | |
109 | 146 | | |
110 | 147 | | |
111 | 148 | | |
| 149 | + | |
112 | 150 | | |
113 | 151 | | |
114 | 152 | | |
| |||
347 | 385 | | |
348 | 386 | | |
349 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
350 | 396 | | |
351 | 397 | | |
352 | 398 | | |
353 | 399 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
360 | 404 | | |
361 | 405 | | |
362 | 406 | | |
| |||
1553 | 1597 | | |
1554 | 1598 | | |
1555 | 1599 | | |
| 1600 | + | |
1556 | 1601 | | |
1557 | 1602 | | |
1558 | 1603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
| |||
219 | 228 | | |
220 | 229 | | |
221 | 230 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
230 | 239 | | |
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
| 245 | + | |
236 | 246 | | |
237 | 247 | | |
238 | 248 | | |
| |||
269 | 279 | | |
270 | 280 | | |
271 | 281 | | |
| 282 | + | |
| 283 | + | |
272 | 284 | | |
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
277 | 297 | | |
278 | 298 | | |
279 | 299 | | |
| |||
283 | 303 | | |
284 | 304 | | |
285 | 305 | | |
286 | | - | |
| 306 | + | |
287 | 307 | | |
288 | 308 | | |
289 | 309 | | |
| |||
454 | 474 | | |
455 | 475 | | |
456 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
457 | 483 | | |
458 | 484 | | |
459 | | - | |
460 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
461 | 491 | | |
462 | 492 | | |
463 | 493 | | |
| |||
468 | 498 | | |
469 | 499 | | |
470 | 500 | | |
471 | | - | |
| 501 | + | |
472 | 502 | | |
473 | 503 | | |
474 | 504 | | |
475 | | - | |
| 505 | + | |
476 | 506 | | |
477 | 507 | | |
478 | 508 | | |
479 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
480 | 562 | | |
481 | 563 | | |
482 | 564 | | |
483 | 565 | | |
484 | 566 | | |
485 | | - | |
486 | | - | |
| 567 | + | |
| 568 | + | |
487 | 569 | | |
488 | 570 | | |
489 | 571 | | |
490 | 572 | | |
491 | | - | |
| 573 | + | |
492 | 574 | | |
493 | 575 | | |
494 | 576 | | |
| |||
0 commit comments