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

Implement file storage plugin #1047

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Implement file storage plugin #1047

wants to merge 2 commits into from

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Jan 31, 2025

Description

Implements file storage plugin as proposed in ADR-004.

Implemented providers include local, memory, and s3.

All providers support integrity verification and will fail when trying to read files that have been tampered with or overwritten since they were created. local and s3 support compression.

Addressed Issue

N/A

Additional Details

The default storage is local for the moment, which aligns with the existing behavior.

Uploaded BOMs were previously stored in the OS' temporary directory (i.e. /tmp). This use-case has been migrated to the new FileStorage API. Files are now stored in ${alpine.data.directory}/storage. The location is configurable.

Once stevespringett/Alpine#696 is available, the provider can be switched to memory for tests.

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@nscuro nscuro added the enhancement New feature or request label Jan 31, 2025
@nscuro nscuro added this to the 5.6.0 milestone Jan 31, 2025
@nscuro nscuro force-pushed the file-storage-plugin branch 3 times, most recently from 1650522 to 5acf4cb Compare January 31, 2025 15:38
Copy link

codacy-production bot commented Jan 31, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.07% (target: -1.00%) 86.87% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (eae1325) 22316 18500 82.90%
Head commit (2b7b3e8) 22631 (+315) 18776 (+276) 82.97% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1047) 335 291 86.87%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@nscuro nscuro force-pushed the file-storage-plugin branch from 5acf4cb to 3588c06 Compare January 31, 2025 17:13
@nscuro nscuro force-pushed the file-storage-plugin branch from 3588c06 to 2b7b3e8 Compare January 31, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant