Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Conversation

@cgwalters
Copy link
Member

tests: Propagate metadata from prior commit

We want in particular things like ostree.bootable.


tests: Use #[track_caller]

This way panics are properly attributed to the real source.


tests/fixture: Inject ostree.bootable by default

Since that's our intended use case for now.


container: Hard require ostree.bootable key

We want to give a clear and useful error when someone tries
to pull a non-ostree-based container image.


We want in particular things like `ostree.bootable`.
This way panics are properly attributed to the real source.
Since that's our intended use case for now.
let bootable_key = *ostree::METADATA_KEY_BOOTABLE;
let bootable = config_labels.map_or(false, |l| l.contains_key(bootable_key));
if !bootable {
anyhow::bail!("Target container does not have {bootable_key} label");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor/optional: s/container/image/

We want to give a clear and useful error when someone tries
to pull a non-ostree-based container image.
@cgwalters cgwalters force-pushed the refuse-non-bootable branch from c3e68fb to 9c4a75b Compare August 25, 2022 01:37
@cgwalters cgwalters merged commit 70a27c6 into ostreedev:main Aug 25, 2022
@cgwalters
Copy link
Member Author

I was worried this would break more things, but I did double check we had this key in FCOS and the Fedora Silverblue builds, etc. And that's the case since rpm-ostree does it by default.

But the test suite needed coreos/rpm-ostree#3971

And clearly we should have --copy-all-meta or --inherit or something for ostree commit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants