Repository navigation
Commit 58353f2
Declare nothing for a scope that composes nothing, and keep what exists
Porting Modelplane to reference.composing turned up two gaps.
A scope that read a reference but didn't compose its resource, because
the value it needed wasn't there yet, still declared the dependency.
Crossplane ignores a dependency whose resource it doesn't know about, and
says so in an event on every reconcile. A scope now declares
dependencies only for a resource that's composed or already exists.
And a resource that exists, but that the block didn't compose because
the value was missing, was left out of desired state, which deletes it.
The fallback only covered a resource the block had written. It now keeps
an existing resource either way: its current spec under whatever the
block wrote, or its spec alone if the block wrote nothing, with a warning
saying why. That's the natural way to write it -
secrets = c.ref(cluster.status.secrets)
if secrets:
compose_backend(secrets)
- and it shouldn't delete the backend when the cluster's secrets
briefly disappear.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent b8ca8e0 commit 58353f2
2 files changed
Lines changed: 90 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | 674 | | |
680 | | - | |
681 | 675 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
687 | 683 | | |
688 | | - | |
689 | 684 | | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
694 | 703 | | |
695 | 704 | | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | 705 | | |
700 | 706 | | |
701 | 707 | | |
702 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
703 | 719 | | |
704 | 720 | | |
705 | 721 | | |
| |||
761 | 777 | | |
762 | 778 | | |
763 | 779 | | |
764 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
765 | 786 | | |
766 | 787 | | |
767 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
584 | 630 | | |
585 | 631 | | |
586 | 632 | | |
| |||
628 | 674 | | |
629 | 675 | | |
630 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
631 | 680 | | |
632 | 681 | | |
633 | 682 | | |
| |||
0 commit comments