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

Initialize default LayerMetadataRestorer and SBOMRestorer if none provided #1333

Merged

Conversation

pbusko
Copy link
Contributor

@pbusko pbusko commented Apr 9, 2024

Summary

Initialize default layer.LayerMetadataRestorer and layer.SBOMRestorer structs if none provided.

Release notes


Related

Resolves #___


Context

At the moment, it is impossible to reuse phase.Restorer structure due to the usage of two internal structs: layer.LayerMetadataRestorer and layer.SBOMRestorer. Defaulting them with the default constructors would allow re-use of the phase.Restorer without opening up the internal package.

This change would greatly improve future work on cloudfoundry/community#796

@pbusko pbusko requested a review from a team as a code owner April 9, 2024 13:02
@natalieparellano natalieparellano self-requested a review April 9, 2024 16:32
Copy link
Member

@natalieparellano natalieparellano left a comment

Choose a reason for hiding this comment

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

I would love to see us move the logic for constructing a new restorer into a "factory" method similar to ConnectedFactory.NewAnalyzer, as part of our ongoing quest to move stuff out of the main package. But, that doesn't need to block improving this code now.

@natalieparellano
Copy link
Member

Rebasing against main should fix the Codecov failure

…vided

Co-authored-by: Ralf Pannemans <[email protected]>
Signed-off-by: Pavel Busko <[email protected]>
@natalieparellano natalieparellano merged commit 27ee435 into buildpacks:main Apr 11, 2024
8 checks passed
@pbusko pbusko deleted the default-layer-restorer branch April 11, 2024 16:21
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