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

fix: allow bom build and verification for build_only layers #609

Merged
merged 2 commits into from Apr 4, 2024

Conversation

rchincha
Copy link
Contributor

@rchincha rchincha commented Apr 3, 2024

From our experience, package information may be removed in such layers making it much harder to discover and auto-construct BOMs.

So allow this for build_only layers also.

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

From our experience, package information may be removed in such layers
making it much harder to discover and auto-construct BOMs.

So allow this for `build_only` layers also.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 57.45%. Comparing base (86ba851) to head (8f9e200).

Files Patch % Lines
pkg/stacker/build.go 22.22% 11 Missing and 3 partials ⚠️
pkg/stacker/bom.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #609      +/-   ##
==========================================
+ Coverage   57.40%   57.45%   +0.04%     
==========================================
  Files          65       65              
  Lines        7709     7711       +2     
==========================================
+ Hits         4425     4430       +5     
+ Misses       2527     2525       -2     
+ Partials      757      756       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

It is possible that a build_only layer doesn't generate a BOM, so it
cannot be imported in a derived layer.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
@rchincha rchincha merged commit 6d069c7 into project-stacker:main Apr 4, 2024
10 of 11 checks passed
rchincha added a commit to rchincha/stacker that referenced this pull request Apr 25, 2024
…t-stacker#609)

* fix: allow bom build and verification for `build_only` layers

From our experience, package information may be removed in such layers
making it much harder to discover and auto-construct BOMs.

So allow this for `build_only` layers also.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* fix: import a bom only if available from built layers

It is possible that a build_only layer doesn't generate a BOM, so it
cannot be imported in a derived layer.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
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

1 participant