Skip to content

Conversation

@travier
Copy link
Member

@travier travier commented Jan 15, 2026

Get the stream from the com.coreos.stream annotation from the container image.

Copy link

@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 updates the get_fcos_stream function to correctly parse the stream from the container image's annotations. The implementation has been changed to handle a nested JSON structure within the rpm-ostree status output. My review includes a suggestion to optimize the jq command by combining the two separate calls into a single, more efficient one.

@travier travier force-pushed the fix-get_fcos_stream branch from 59020b5 to 9404ff7 Compare January 15, 2026 20:35
Get the stream from the `com.coreos.stream` annotation from the
container image.
@travier travier force-pushed the fix-get_fcos_stream branch from 9404ff7 to 070d3cf Compare January 15, 2026 20:36
@travier
Copy link
Member Author

travier commented Jan 15, 2026

Thanks, updated.

@travier travier requested a review from jbtrystram January 19, 2026 14:21
get_fcos_stream() {
rpm-ostree status -b --json | jq -r '.deployments[0]["base-commit-meta"]["fedora-coreos.stream"]'
rpm-ostree status -b --json \
| jq -r '.deployments[0]."base-commit-meta"."ostree.manifest" | fromjson | .annotations."com.coreos.stream"'
Copy link
Member

Choose a reason for hiding this comment

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

I think what JB was saying is that we are moving towards the label being the source of truth (not the annotation) so:

[core@cosa-devsh ~]$ rpm-ostree status -b --json | jq --raw-output '.deployments[0]."base-commit-meta"."ostree.container.image-config" | fromjson | .config.Labels."com.coreos.stream"'
testing-devel

Copy link
Member Author

Choose a reason for hiding this comment

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

Hum indeed. I don't know why it worked for me before.

Copy link
Member

Choose a reason for hiding this comment

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

we still have the annotation for now, so that's why it works either way

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