feat: add upgrade window check for environmentd image ref #34327
+205
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_refuntil the next successful rollout. So hypothetically, users onv26.0.0can jump straight tov28.0.0if they didn't upgrade between then.We solve this by relaxing the check as much as possible, also in case of other false positives.
Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.