Skip to content

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Sep 12, 2025

We've fully cut over to OCI now for updates so we can stop having ostree commit info in there. It'll make even less sense with the buildah path where the commit hash is synthetic.

In cosa generate-release-metadata, stop propagating the commit. In plume, stop propagating the commit to the release index.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the handling of ostree commit information from the release metadata generation and processing, reflecting the project's move to OCI-based updates. The changes correctly remove the logic for propagating and comparing ostree commits in mantle/cmd/plume/release.go and stop adding the commit information to release.json in src/cmd-generate-release-meta. The modifications are clean and align with the stated goal. I have identified a critical pre-existing issue in a modified code block that could lead to a panic due to a nil pointer dereference and have provided a fix.

Comment on lines 300 to 312
for arch, vals := range rel.Architectures {
commits = append(commits, release.IndexReleaseCommit{
Architecture: arch,
Checksum: vals.Commit,
})
pullspecs = append(pullspecs, release.IndexReleaseOciImage{
Architecture: arch,
ContainerImage: *vals.OciImage,
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

There is a potential nil pointer dereference here. vals.OciImage can be nil if the release.json for a given architecture doesn't contain an oci-image field. The python script that generates release.json (src/cmd-generate-release-meta) only includes oci-image if base-oscontainer is present in its input, with a comment noting this may not always be the case (e.g. for OKD).

Dereferencing vals.OciImage without a nil check could cause a panic. You should add a check to ensure vals.OciImage is not nil before using it.

for arch, vals := range rel.Architectures {
		if vals.OciImage == nil {
			continue
		}
		pullspecs = append(pullspecs, release.IndexReleaseOciImage{
			Architecture:   arch,
			ContainerImage: *vals.OciImage,
		})
	}

@dustymabe
Copy link
Member

There is part of me that would like to continue to serve up entries in the graph until all the F42 builds have been done. This removes that ability, correct?

Our change request is really for F43: coreos/fedora-coreos-tracker#1895 (comment)

@jlebon
Copy link
Member Author

jlebon commented Sep 12, 2025

There is part of me that would like to continue to serve up entries in the graph until all the F42 builds have been done. This removes that ability, correct?

Yes, and yeah agree. Don't know. I guess we can add a knob for it. Or maybe simplest is to tie it to the buildah path work, which is also tied to f43. So then we could just check here if it has oci-imported: true.

@dustymabe
Copy link
Member

Or maybe simplest is to tie it to the buildah path work, which is also tied to f43. So then we could just check here if it has oci-imported: true.

sounds fair to me

Starting in f43, we won't be publishing content to the OSTree repo
anymore, so there's no point in having any commit hash in the release
metadata.

On builds that have `oci-imported: true`, let's stop adding the `commit`
key in the release metadata in `cosa generate-release-metadata`. That'll
naturally bind it to f43.

In plume, handle the case where there is no commit string.
We want to make sure that all of developers, CI and pipelines default to
the same buildah vs legacy path. Let's make the config repo itself drive
this.

Support a new `.metadata.build_with_buildah` key in `manifest.yaml`
which, if set to true, will make `cosa build` automatically use the
buildah path.

Note the `COSA_BUILD_WITH_BUILDAH` env var is still supported and can be
used to override the default either way (i.e., set to `0`, it will force
the legacy path).
Adapt to coreos/fedora-coreos-config#3724 which
changed the path of the source content slightly.
@jlebon jlebon merged commit cb3ea70 into coreos:main Sep 14, 2025
5 of 6 checks passed
@jlebon jlebon deleted the pr/drop-ostree branch September 14, 2025 20:48
@jbtrystram
Copy link
Member

Cincinnati change to handle this : coreos/fedora-coreos-cincinnati#107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants