Skip to content

Conversation

@Johan-Liebert1
Copy link
Collaborator

No description provided.

@bootc-bot bootc-bot bot requested a review from ckyrouac August 19, 2025 09:46
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 updates the publish_facts function to align with a new Storage API. The changes are functionally correct, but I've identified an opportunity to simplify the implementation by removing a redundant function call. This will make the code more efficient and easier to read. My suggestion is to directly use the complete return value from get_status_require_booted instead of calling get_status a second time.

Comment on lines 96 to 97
let (booted_deployment, ..) = crate::status::get_status_require_booted(ostree)?;
let (_deployments, host) = crate::status::get_status(ostree, Some(&booted_deployment))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The get_status_require_booted function already computes and returns the host object. The subsequent call to get_status is redundant and can be removed for better performance and code clarity. You can directly destructure the tuple returned by get_status_require_booted to get the host.

Suggested change
let (booted_deployment, ..) = crate::status::get_status_require_booted(ostree)?;
let (_deployments, host) = crate::status::get_status(ostree, Some(&booted_deployment))?;
let (_, _, host) = crate::status::get_status_require_booted(ostree)?;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@cgwalters
Copy link
Collaborator

Ah right the main CI doesn't enable the rhsm feature since we only turn it on via the spec file, and the packit builds aren't gating.

Update according to API changes introduced in
bootc-dev#1525

Signed-off-by: Johan-Liebert1 <[email protected]>
@cgwalters cgwalters enabled auto-merge August 19, 2025 10:09
@cgwalters
Copy link
Collaborator

Ah right the main CI doesn't enable the rhsm feature since we only turn it on via the spec file, and the packit builds aren't gating.

➡️ #1531 should help that from one angle, but I guess we may also need to make packit gating

@cgwalters cgwalters merged commit f7c4bd1 into bootc-dev:main Aug 19, 2025
24 of 27 checks passed
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.

2 participants