Skip to content
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

control-plane-agent: finish ComponentUpdater #1727

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Apr 4, 2024

This change causes SpUpdate to impl ComponentUpdater, instead of sporting functions that look a lot like ComponentUpdater but aren't actually. This fixes a warning in the newest toolchain, which was concerned that operations in the non-public trait were going unused (which they were!).

In order to adapt ComponentUpdater to be able to describe all three cases, I have added two associated types to it. UpdatePrepare parameterizes the difference between RoT/HostFlash updates (which want ComponentUpdatePrepare) and SP updates (which want a different SpUpdatePrepare type). SubComponent models the fact that only the SP seems to want a specifier for sub-components inside itself; the others set this to ().

@cbiffle cbiffle requested a review from jgallagher April 4, 2024 22:25
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

This change causes SpUpdate to impl ComponentUpdater, instead of
sporting functions that look a lot _like_ ComponentUpdater but aren't
actually. This fixes a warning in the newest toolchain, which was
concerned that operations in the non-public trait were going unused
(which they were!).

In order to adapt ComponentUpdater to be able to describe all three
cases, I have added two associated types to it. UpdatePrepare
parameterizes the difference between RoT/HostFlash updates (which want
ComponentUpdatePrepare) and SP updates (which want a different
SpUpdatePrepare type). SubComponent models the fact that only the SP
seems to want a specifier for sub-components inside itself; the others
set this to ().
@cbiffle cbiffle force-pushed the cbiffle/cpa-component-updater branch from 71bd996 to 197d168 Compare April 4, 2024 23:06
@cbiffle cbiffle enabled auto-merge (rebase) April 4, 2024 23:06
@cbiffle cbiffle merged commit 2eb309e into master Apr 4, 2024
103 checks passed
@cbiffle cbiffle deleted the cbiffle/cpa-component-updater branch April 17, 2024 19:10
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.

None yet

2 participants