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

Location order on packages should consider evidence annotations when sorting #3720

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

wagoodman
Copy link
Contributor

Description

Today when sorting locations on packages we sort based on the real and access path on these objects. This is almost correct: we should additionally consider first any package annotations that exist (i.e. is this primary evidence or supporting evidence).

This PR adjusts the behavior such that all primary evidence is listed before supporting evidence.

While working on tests for this PR and a soon-to-follow on PR, it made sense to improve some of the cmptest options we use around location sets and license sets (which have locations on them and affect comparisons). No functional change was made here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

@wagoodman wagoodman added the bug Something isn't working label Mar 11, 2025
@wagoodman wagoodman requested a review from a team March 11, 2025 14:01
@wagoodman wagoodman self-assigned this Mar 11, 2025
@wagoodman wagoodman changed the title Location order on packages should consider evidence annotations (primary vs supporting) Location order on packages should consider evidence annotations when sorting Mar 11, 2025
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman merged commit 34e5ff7 into main Mar 11, 2025
12 checks passed
@wagoodman wagoodman deleted the sort-locations branch March 11, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants