-
Notifications
You must be signed in to change notification settings - Fork 19
Fix registry digest query param using & #320
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 registry digest query param using & #320
Conversation
Thanks! This look valid. But for some reason it cause some regression on one test
Tests are using testcontainer. There run with docker on GH action and I run them using podman on Linux. It don't know about other environment |
I see the issue. If fact we need better parsing of the URI The ZOT container return a location with a query param (the digest is ignored since it's added)
So this will fix some registry but broke some other |
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.
We need better parsing of the Location to ensure to append the query param correctly
325ea75
to
bfb03ee
Compare
The spec says the follow-up PUT should be <location>?digest=<digest>, not <location>&digest=<digest>. The former is also incorrect query param syntax. This causes Google Artifact Registry to return a 404. I tested by changing this to a ? and got a 201 instead of a 404. Signed-off-by: Zack Warnimont <[email protected]>
bfb03ee
to
9c29b8b
Compare
The commit I just pushed should be passing CI now, I was able to get it running locally. I wasn't sure the best place to write a unit test for this. If you have a suggestion let me know and I'll be happy to write it up. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
============================================
- Coverage 87.96% 87.91% -0.06%
- Complexity 615 617 +2
============================================
Files 39 39
Lines 1878 1886 +8
Branches 207 208 +1
============================================
+ Hits 1652 1658 +6
- Misses 133 135 +2
Partials 93 93 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks, looks both branches are already covered. Method could be private but not blocking. Do you need a release I guess? If yes I can perform one tomorrow |
@jonesbusy a release tomorrow would be extremely helpful, thank you!! 😄 |
The spec says the follow-up PUT should be ?digest=, not &digest=. The former is also incorrect query param syntax.
This causes Google Artifact Registry to return a 404. I tested by changing this to a ? and got a 201 instead of a 404.
Description
This is a fix for #319.
Note: I get
IllegalState Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
for some tests inOCILayoutTest
andRegistryTest
. I have colima running on macOS. I didn't see any instructions for getting this set up.Testing done
I tested running this against GCP Artifact Registry and received a 201 where I was previously receiving a 404.
Submitter checklist
mvn license:update-file-header
,mvn spotless:apply
,pre-commit run -a
,mvn clean install
before opening the PR