-
Notifications
You must be signed in to change notification settings - Fork 11
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 existing query params from blobstore response #136
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 80.15% 80.48% +0.33%
==========================================
Files 30 30
Lines 897 902 +5
Branches 108 109 +1
==========================================
+ Hits 719 726 +7
+ Misses 124 122 -2
Partials 54 54 ☔ View full report in Codecov by Sentry. |
@daniel-pebble Thank you for your contribution. This PR contains the change of #135. Could you keep cc915c6 in this PR? |
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 <daniel.robinson@pebble.tv>
Use existing query parameter string from blobstore response and then append digest. Test updated to ensure existing query parameters are maintained Signed-off-by: Daniel Robinson <daniel.robinson@pebble.tv>
…56 and sha512 digest are registered the library can validate these although the library is limited to compute sha256 digest. Signed-off-by: Daniel Robinson <daniel.robinson@pebble.tv>
9d03f26
to
8317530
Compare
Hi @shizhMSFT, i've closed PR #135 and will commit under this PR to keep things simple. I've added some unit tests for the validate digest function. I'm not sure how I would go about adding unit tests for _camelCase naming convention, I've used sonarqube in the past to enforcing code styling, perhaps this is something Codecov can do? Happy to revert these changes if this requires a wider discussion? |
The other option of course is to use .editorconfig which would enforce _camalCase for private fields and PascalCase for public members. I would suggest the following, Whats your thoughts on this? Naming Stylesdotnet_naming_rule.private_fields_should_start_with_underscore.severity = error dotnet_naming_symbols.private_fields.applicable_kinds = field dotnet_naming_style.private_underscore_style.capitalization = camel_case dotnet_naming_rule.public_members_should_start_with_uppercase.severity = error dotnet_naming_symbols.public_members.applicable_kinds = property, field, method dotnet_naming_style.public_uppercase_style.capitalization = pascal_case |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it
This resolves an issue when pushing to a docker registry, it responses with a _state query param, this must be part of the put request. This PR, takes the query params from the response and appends the digest to the put request.
Which issue(s) this PR resolves / fixes
Resolves / Fixes #132
Please check the following list