-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: Make stateroot configurable #622
base: main
Are you sure you want to change the base?
Conversation
For tests, try adding a new case to bootc/tests-integration/src/install.rs Line 68 in b5f47ff
|
8e9e129
to
c093213
Compare
This commit makes it so that the `bootc install` stateroot will be configurable (it defaults to `default`). For now this is a hidden CLI option until we decide whether we want to commit to this API. In the future we also want to make the stateroot of `bootc switch` be configurable (containers#617) so that users can install an image to a new stateroot while they already have an existing stateroot Also removed the constant `STATEROOT_DEFAULT`, we're now simply taking it from the `ostree_ext` crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me, could just use a test in tests-integration/src/install.rs
or so.
@@ -158,6 +156,10 @@ pub(crate) struct InstallConfigOpts { | |||
#[clap(long)] | |||
#[serde(default)] | |||
pub(crate) generic_image: bool, | |||
|
|||
/// The stateroot name to use. Defaults to `default`. | |||
#[clap(long, hide = true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should at least debate: any reason not to stabilize (i.e. not hide = true
) this? This really I guess is just the question of whether we want to tie bootc to the ostree concept of "stateroot" as is basically forever.
I think it's unlikely to be valuable for us to try to do anything really different here, so I'd say stabilize.
(draft because untested yet, also want to add integration tests)
This commit makes it so that the
bootc install
stateroot will be configurable (it defaults todefault
). For now this is a hidden CLI option until we decide whether we want to commit to this API.In the future we also want to make the stateroot of
bootc switch
be configurable (#617) so that users can install an image to a new stateroot while they already have an existing staterootAlso removed the constant
STATEROOT_DEFAULT
, we're now simply taking it from theostree_ext
crate