Repository navigation
Commit 347acbe
authored
fix(controller): move a ModelConfig condition's transition time only on a status change (#3340)
## Problem
The ModelConfig status writer moves a condition's `lastTransitionTime`
whenever its reason, message or observedGeneration changes. Agent
conditions, and SandboxTemplate through `apimeta.SetStatusCondition`,
move it only when the status changes, as the API conventions define it.
A ModelConfig that stays `False` therefore reports a new transition time
every time its error text or generation changes.
## Change
Agent and ModelConfig share one helper that keeps the transition time
while a condition's status holds. A new test covers a changed reason,
message and generation under an unchanged status, and a status change.
This PR previously wrote Harness `Ready`/`Booted` conditions; #3454
removed `Harness.status`, so it is reduced to the transition-time rule
that part shared with Agent and ModelConfig.
Signed-off-by: QuentinBisson <[email protected]>1 parent 2114654 commit 347acbe
2 files changed
Lines changed: 32 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 543 | + | |
553 | 544 | | |
554 | 545 | | |
555 | 546 | | |
556 | 547 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
563 | 561 | | |
564 | 562 | | |
565 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
0 commit comments