Commit cb0f075
authored
feat: add upgrade window check for environmentd image ref (#34327)
This commit introduces a new method to check if the current environmentd
image reference is within the upgrade window of the last successful
rollout. We default the image ref to the current version if status is
not set.
Not sure if this is the best way to solve this! One nice thing is we'll
see the last version everytime we upgrade which can be useful.
An edge case is if the user's materialize CR status is already set, then
it won't have `last_completed_rollout_environmentd_image_ref` until the
next successful rollout. So hypothetically, users on `v26.0.0` can jump
straight to `v28.0.0` if they didn't upgrade between then.
We solve this by relaxing the check as much as possible, also in case of
other false positives.
<img width="1023" height="294" alt="Screenshot 2025-12-02 at 2 01 09 PM"
src="https://github.com/user-attachments/assets/b128a351-3aba-42db-9b39-ececa701ac68"
/>
<!--
Describe the contents of the PR briefly but completely.
If you write detailed commit messages, it is acceptable to copy/paste
them
here, or write "see commit messages for details." If there is only one
commit
in the PR, GitHub will have already added its commit message above.
-->
### Motivation
* This PR adds a known-desirable feature.
* MaterializeInc/database-issues#9860
<!--
Which of the following best describes the motivation behind this PR?
* This PR fixes a recognized bug.
[Ensure issue is linked somewhere.]
[Ensure issue is linked somewhere.]
* This PR fixes a previously unreported bug.
[Describe the bug in detail, as if you were filing a bug report.]
* This PR adds a feature that has not yet been specified.
[Write a brief specification for the feature, including justification
for its inclusion in Materialize, as if you were writing the original
feature specification.]
* This PR refactors existing code.
[Describe what was wrong with the existing code, if it is not obvious.]
-->
### Tips for reviewer
<!--
Leave some tips for your reviewer, like:
* The diff is much smaller if viewed with whitespace hidden.
* [Some function/module/file] deserves extra attention.
* [Some function/module/file] is pure code movement and only needs a
skim.
Delete this section if no tips.
-->
### Checklist
- [ ] This PR has adequate test coverage / QA involvement has been duly
considered. ([trigger-ci for additional test/nightly
runs](https://trigger-ci.dev.materialize.com/))
- [ ] This PR has an associated up-to-date [design
doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md),
is a design doc
([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)),
or is sufficiently small to not require a design.
<!-- Reference the design in the description. -->
- [ ] If this PR evolves [an existing `$T ⇔ Proto$T`
mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md)
(possibly in a backwards-incompatible way), then it is tagged with a
`T-proto` label.
- [ ] If this PR will require changes to cloud orchestration or tests,
there is a companion cloud PR to account for those changes that is
tagged with the release-blocker label
([example](MaterializeInc/cloud#5021)).
<!-- Ask in #team-cloud on Slack if you need help preparing the cloud
PR. -->
- [ ] If this PR includes major [user-facing behavior
changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note),
I have pinged the relevant PM to schedule a changelog post.1 parent cea2162 commit cb0f075
File tree
2 files changed
+205
-1
lines changed- src
- cloud-resources/src/crd
- orchestratord/src/controller
2 files changed
+205
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 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 | + | |
482 | 547 | | |
483 | 548 | | |
484 | 549 | | |
| |||
516 | 581 | | |
517 | 582 | | |
518 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
519 | 589 | | |
520 | 590 | | |
521 | 591 | | |
| |||
530 | 600 | | |
531 | 601 | | |
532 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
533 | 607 | | |
534 | 608 | | |
535 | 609 | | |
| |||
630 | 704 | | |
631 | 705 | | |
632 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
633 | 792 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
| |||
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
594 | | - | |
| 597 | + | |
595 | 598 | | |
596 | 599 | | |
597 | 600 | | |
| |||
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| 621 | + | |
| 622 | + | |
618 | 623 | | |
619 | 624 | | |
620 | 625 | | |
| |||
634 | 639 | | |
635 | 640 | | |
636 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
637 | 674 | | |
638 | 675 | | |
639 | 676 | | |
| |||
673 | 710 | | |
674 | 711 | | |
675 | 712 | | |
| 713 | + | |
| 714 | + | |
676 | 715 | | |
677 | 716 | | |
678 | 717 | | |
| |||
710 | 749 | | |
711 | 750 | | |
712 | 751 | | |
| 752 | + | |
| 753 | + | |
713 | 754 | | |
714 | 755 | | |
715 | 756 | | |
| |||
746 | 787 | | |
747 | 788 | | |
748 | 789 | | |
| 790 | + | |
| 791 | + | |
749 | 792 | | |
750 | 793 | | |
751 | 794 | | |
| |||
786 | 829 | | |
787 | 830 | | |
788 | 831 | | |
| 832 | + | |
| 833 | + | |
789 | 834 | | |
790 | 835 | | |
791 | 836 | | |
| |||
0 commit comments