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

feat: add summary objects #28

Merged
merged 6 commits into from
Jun 26, 2023
Merged

feat: add summary objects #28

merged 6 commits into from
Jun 26, 2023

Conversation

vladklokun
Copy link
Collaborator

What this PR changes?

This commit:

  • Introduces a new API type: SBOM Summary. The new type acts as a lightweight beacon that will be created whenever an SBOM is created, so the Storage APIServer can avoid loading entire large SBOMs into memory when listing and serving Watch requests.
  • Ditto for new type Vulnerability Manifest Summary.
  • Fixes a conflict with Makefile that was introduced when creating a build directory in the source tree.

@vladklokun vladklokun self-assigned this Jun 26, 2023
@vladklokun vladklokun force-pushed the feat-add-summary-objects branch 2 times, most recently from 99200b7 to 7118cf4 Compare June 26, 2023 11:41
This commit introduces manual type definitions for SBOM summaries.

Signed-off-by: Vlad Klokun <[email protected]>
This commit finishes the changes needed to introduce a new API type:
SBOM Summary. The new type acts as a lightweight beacon that will be
created whenever an SBOM is created, so the Storage APIServer can avoid
loading entire large SBOMs into memory when listing and serving Watch
requests.

Signed-off-by: Vlad Klokun <[email protected]>
Prior to this commit, introducing a "build" directory broke building a
standalone binary using a Makefile. Because the "build" directory exists
in the source tree, it made `make` think that the target already exists
and is up-to-date, so it would not even try to build new binaries.

This commit changes the target name and fixes the problem.

Signed-off-by: Vlad Klokun <[email protected]>
This commit introduces manual type definition for vulnerability manifest
summaries.

Signed-off-by: Vlad Klokun <[email protected]>
… summaries

This commit finishes the changes needed to introduce a new API type:
Vulnerability Manifest Summary. The idea is the same as for the SBOM
Summaries: lightweight indicators that make the Storage AA avoid loading
large full objects into memory.

Signed-off-by: Vlad Klokun <[email protected]>
@vladklokun vladklokun marked this pull request as ready for review June 26, 2023 11:49
@@ -52,5 +52,5 @@ func NewREST(scheme *runtime.Scheme, storageImpl storage.Interface, optsGetter g
if err := store.CompleteWithOptions(options); err != nil {
return nil, err
}
return &registry.REST{store}, nil
return &registry.REST{Store: store}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

yay golint!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kinda funny I found this with my LSP (go vet), since the linter did not even run on PR changes for me :)

Copy link
Contributor

@matthyx matthyx left a comment

Choose a reason for hiding this comment

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

much easier when looking at separate commits, thx!

@github-actions
Copy link

Summary:

  • License scan: success
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

@vladklokun vladklokun merged commit 5b56e94 into main Jun 26, 2023
@matthyx matthyx deleted the feat-add-summary-objects branch October 1, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants