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: use canonical names inside TUF fetcher #144

Merged
merged 4 commits into from
Aug 30, 2024
Merged

fix: use canonical names inside TUF fetcher #144

merged 4 commits into from
Aug 30, 2024

Conversation

kipz
Copy link
Contributor

@kipz kipz commented Aug 30, 2024

Previous PR (#142) was only a partial fix because targets URL parsing was still broken.

This PR moves parsing logic into the Fetcher constructor so that we are always using canonical name matching regardless of how TUF OCI Fetch is parameterized.

Also add some more tests

@kipz kipz requested a review from a team as a code owner August 30, 2024 12:35
@github-actions github-actions bot added the bug Something isn't working label Aug 30, 2024
@kipz kipz enabled auto-merge (squash) August 30, 2024 12:36
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 66.89%. Comparing base (bada1df) to head (3b7536c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/tuf/tuf.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   66.73%   66.89%   +0.15%     
==========================================
  Files          40       40              
  Lines        2324     2332       +8     
==========================================
+ Hits         1551     1560       +9     
+ Misses        505      504       -1     
  Partials      268      268              
Flag Coverage Δ
unittests 66.89% <94.73%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@kipz kipz disabled auto-merge August 30, 2024 14:18
Copy link
Contributor

@jonnystoten jonnystoten left a comment

Choose a reason for hiding this comment

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

LGTM!

pkg/tuf/registry.go Outdated Show resolved Hide resolved
pkg/tuf/tuf_test.go Show resolved Hide resolved
@kipz kipz merged commit 23849c1 into main Aug 30, 2024
7 checks passed
@kipz kipz deleted the kipz/fix-targets branch August 30, 2024 16:03
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants