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

Refactor meta analyzer to always fetch integrity data #1446

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Aug 11, 2024

Description

Refactors meta analyzer to always fetch integrity data.

The API server no longer specified whether only the latest version, only integrity metadata, or both should be fetched.

Instead, we now always try to fetch both, relying on caching to prevent unnecessary repetitive calls to remote repositories.

To further reduce remote calls being made, we now also use caching for when a given repository does not contain the analyzed component. Previously, only successful retrievals would be cached.

Additionally, populates the MDC to include:

  • The PURL of the component being analyzed
  • The identifier of the repository being used

Addressed Issue

Relates to #1306

Additional Details

API server PR: DependencyTrack/hyades-apiserver#846

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

Copy link

codacy-production bot commented Aug 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+18.42% (target: -1.00%) 90.91% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (f26e179) 201 132 65.67%
Head commit (72e09d9) 6896 (+6695) 5799 (+5667) 84.09% (+18.42%)

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 (#1446) 121 110 90.91%

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 issue-1306-fix branch 3 times, most recently from 6cb091c to f9fd919 Compare August 14, 2024 15:26
@nscuro nscuro modified the milestones: 0.6.0, 0.7.0 Aug 22, 2024
The API server no longer specified whether only the latest version, only integrity metadata, or both should be fetched.

Instead, we now always try to fetch both, relying on caching to prevent unnecessary repetitive calls to remote repositories.

To further reduce remote calls being made, we now also use caching for when a given repository does not contain the analyzed component. Previously, only successful retrievals would be cached.

Additionally, populates the MDC to include:

* The PURL of the component being analyzed
* The identifier of the repository being used

Signed-off-by: nscuro <[email protected]>
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