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 the correct header collection for Docker-Content-Digest #135

Closed
wants to merge 1 commit into from

Conversation

daniel-pebble
Copy link
Contributor

What this PR does / why we need it

While testing against https://hub.docker.com/_/registry, "Docker-Content-Digest" headers were found on response.Headers collection rather than response.Content.Headers. Aligned internal/private variables to use _camelCase as there was some inconsistencies.

Which issue(s) this PR resolves / fixes

Resolves / Fixes #133 .

Please check the following list

  • Does the affected code have corresponding tests, e.g. unit test, E2E test? Yes
  • Does this change require a documentation update? No
  • Does this introduce breaking changes that would require an announcement or bumping the major version? No
  • Do all new files have an appropriate license header? Yes

While testing against https://hub.docker.com/_/registry, "Docker-Content-Digest" headers were found on response.Headers collection rather than response.Content.Headers.
Aligned internal/private variables to use _camelCase as there was some inconsistencies.

Signed-off-by: Daniel Robinson <[email protected]>
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

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

Project coverage is 80.15%. Comparing base (c58adc9) to head (309c896).

Files Patch % Lines
src/OrasProject.Oras/Content/Digest.cs 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #135   +/-   ##
=======================================
  Coverage   80.15%   80.15%           
=======================================
  Files          30       30           
  Lines         897      897           
  Branches      108      108           
=======================================
  Hits          719      719           
  Misses        124      124           
  Partials       54       54           

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

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM. Thank @daniel-pebble for your contribution.

We are not able to merge this PR since it does not have sufficient unit test code coverage due to the change of "Aligned internal/private variables to use _camelCase as there was some inconsistencies".

Could you add the related unit tests, or split this PR into two PRs (one to fix the header, and another to fix the _camelCase with unit tests)?

@shizhMSFT shizhMSFT changed the title Use the correct header collection for Docker-Content-Digest fix: use the correct header collection for Docker-Content-Digest Aug 9, 2024
@daniel-pebble
Copy link
Contributor Author

Closing, will resolve under #136

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.

GenerateDescriptorAsync doesn't use the correct header property
2 participants