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

Builder should warn if newer buildpacks write a bom in *.toml #728

Closed
wants to merge 2 commits into from

Conversation

natalieparellano
Copy link
Member

Signed-off-by: Natalie Arellano [email protected]

Rename concrete implementation per review feedback

Signed-off-by: Natalie Arellano <[email protected]>
@natalieparellano
Copy link
Member Author

Fixes #732

@natalieparellano natalieparellano marked this pull request as ready for review October 4, 2021 16:48
@natalieparellano natalieparellano requested a review from a team as a code owner October 4, 2021 16:48
Copy link
Contributor

@aemengo aemengo left a comment

Choose a reason for hiding this comment

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

Really like it! Reads like idiomatic golang.

@@ -249,6 +249,9 @@ func (b *Descriptor) readOutputFiles(bpLayersDir, bpPlanPath string, bpPlanIn Pl
var launchTOML LaunchTOML
launchPath := filepath.Join(bpLayersDir, "launch.toml")

bomValidator := NewBOMValidator(b.API, logger)

var err error
Copy link
Contributor

@aemengo aemengo Oct 12, 2021

Choose a reason for hiding this comment

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

Not sure if necessary. (var err error)

}

func (h *v05To06BOMValidator) processBOM(buildpack GroupBuildpack, bom []BOMEntry) []BOMEntry {
return WithBuildpack(buildpack, bom)
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this method wasn't created in this PR. But I'm surprised that it actually does anything

https://play.golang.org/p/DyhbKkAp2eW

Copy link
Contributor

Choose a reason for hiding this comment

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

This one's totally my bad. I just tested it out and it works fine.

"github.com/buildpacks/lifecycle/api"
)

type BOMValidator interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look like it's used outside the package, so the public scope is slightly confusing.

@natalieparellano
Copy link
Member Author

Closing as this is covered in #749

@natalieparellano natalieparellano deleted the warn-sbom branch March 30, 2022 21:03
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