Blueprint PlanningInput: Fewer Options#8470
Merged
Merged
Conversation
smklein
approved these changes
Jun 27, 2025
Comment on lines
+2004
to
+2006
| // TODO-john this should be an error - this is a repo that's missing | ||
| // an artifact of a known zone kind | ||
| .unwrap_or(BlueprintZoneImageSource::InstallDataset) |
Collaborator
There was a problem hiding this comment.
Should we do this before merging? Or panic, or something?
This seems quite bad, especially if we perform an upgrade that unintentionally causes a downgrade
Contributor
Author
There was a problem hiding this comment.
This turns into an error on #8472. I could pull that into this PR?
OTOH I'm not sure this is super urgent; this matches the existing behavior on main, and we'd only run into it if we uploaded a TUF repo to a rack (only done in testing, for now) that was also missing some artifacts (hasn't happened to date, as far as we know).
Contributor
Author
plotnick
approved these changes
Jun 27, 2025
plotnick
left a comment
Contributor
There was a problem hiding this comment.
Thanks, looks great. Always nice to have better names than None!
sunshowers
approved these changes
Jun 30, 2025
sunshowers
left a comment
Contributor
There was a problem hiding this comment.
makes a lot of sense -- thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 gets rid of two
Option<_>s in the planning input:TufRepoPolicy::descriptionchanges fromOption<TufRepoDescription>to non-optionalTargetReleaseDescription. The latter is isomorphic toOption, but spells theNonecase asTargetReleaseDescription::Initial.PlanningInput::old_repois now a non-optionalTufRepoPolicy. In the case wheretuf_repois "the initial policy" (i.e.,TargetReleaseDescription::Initial,old_repois also set to the initial policy. In all other cases, it's "the previous policy".