Switch download only - #2342
Conversation
Similar to what we have for the update operation Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Handle `download_only` and `from_downloaded` to only download and stage the image but not finalize, and finalize from an already staged only downloded deployment respectively Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Similar to ostree update, handle download only for bootc switch Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
If we have `--from-downloaded` then make `target` optional Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Mostly AI generated Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
DownloadOnlyOpts is flattened into both UpgradeOpts and SwitchOpts, but its conflicts_with_all referenced "check", which only exists in UpgradeOpts. clap_complete panics when generating zsh completions if a conflict references an arg unknown to the command. Move the "check" conflicts to UpgradeOpts -> check and keep only the valid conflicts in DownloadOnlyOpts. Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
bff97ba to
31b5a13
Compare
| }; | ||
|
|
||
| if opts.download_opts.from_downloaded { | ||
| return apply_upgrade_from_downloaded(storage, booted_cfs, &host, &do_upgrade_opts).await; |
There was a problem hiding this comment.
Do we care that staged deployments don't have any provenance whether they came from upgrade or switch? As-is one could do bootc upgrade --download-only && bootc switch --from-downloaded to apply an upgrade. There's no way to distinguish between an "upgrade-staged" vs "switch-staged" deployment.
I worry that a typical user that doesn't understand or care about all of the implementation details is not going to realize that upgrades and switches can be used interchangeably in this way and might be surprised if they think that upgrades and switches use distinct staged deployments.
Then again I guess the ostree backend already does it this way too, so it's at least consistent.
Maybe something we address in a followup.
switch: Add
download_onlyandfrom_downloadoptionsSimilar to what we have for the update operation
cfs/switch: Handle download only
Handle
download_onlyandfrom_downloadedto only download and stagethe image but not finalize, and finalize from an already staged only
downloded deployment respectively
ostree/switch: Handle download only
Similar to ostree update, handle download only for bootc switch
cli/switch: Make
targetoptionalIf we have
--from-downloadedthen maketargetoptionalCloses: #2137