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

Enable the fetching of only the OCI descriptor #2220

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

Conversation

arewm
Copy link

@arewm arewm commented Dec 13, 2024

Some OCI artifacts need to have a specific media type (i.e. they should only be an OCI image index or an OCI image manifest). In order to determine that with a single remote call, we can just get the descriptor and then check the mediaType of that object.

@arewm arewm force-pushed the enable-fetching-of-oci-descriptor branch from dbc2510 to ee8df44 Compare December 13, 2024 20:58
Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

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

LGTM

@arewm arewm force-pushed the enable-fetching-of-oci-descriptor branch from ee8df44 to 5583a73 Compare December 16, 2024 14:05
@arewm arewm marked this pull request as ready for review December 16, 2024 15:17
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.69%. Comparing base (ba08d5e) to head (88ce5a8).
Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2220      +/-   ##
==========================================
+ Coverage   72.42%   72.69%   +0.27%     
==========================================
  Files          88       88              
  Lines        7539     7615      +76     
==========================================
+ Hits         5460     5536      +76     
  Misses       2079     2079              
Flag Coverage Δ
generative 72.69% <100.00%> (+0.27%) ⬆️
integration 72.69% <100.00%> (+0.27%) ⬆️
unit 72.69% <100.00%> (+0.27%) ⬆️

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

Files with missing lines Coverage Δ
internal/rego/oci/oci.go 96.75% <100.00%> (+0.83%) ⬆️

@zregvart
Copy link
Member

/ok-to-test

Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

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

How do you feel about adding other properties to the returned object?

internal/rego/oci/oci.go Show resolved Hide resolved
@zregvart
Copy link
Member

/ok-to-test

@zregvart
Copy link
Member

Do a make generate and squash commits so they're nicer a bit?

@arewm arewm force-pushed the enable-fetching-of-oci-descriptor branch from 938e1f8 to f2e2d19 Compare December 20, 2024 13:13
Some OCI artifacts need to have a specific media type (i.e. they should
only be an OCI image index or an OCI image manifest). In order to
determine that with a single remote call, we can just get the descriptor
and then check the mediaType of that object.

Signed-off-by: arewm <arewm@users.noreply.github.com>
@arewm arewm force-pushed the enable-fetching-of-oci-descriptor branch from f2e2d19 to 88ce5a8 Compare December 20, 2024 13:13
@arewm
Copy link
Author

arewm commented Dec 20, 2024

Thanks. Squashed and regenerated the docs.

@zregvart
Copy link
Member

/ok-to-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants