This repository was archived by the owner on Dec 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(docker): resolve the issue of double encoding while making the next call to ECR's tags list #6357
Merged
mergify
merged 2 commits into
spinnaker:master
from
kirangodishala:fix-double-encoding-issue
Mar 12, 2025
Merged
fix(docker): resolve the issue of double encoding while making the next call to ECR's tags list #6357
mergify
merged 2 commits into
spinnaker:master
from
kirangodishala:fix-double-encoding-issue
Mar 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbyron-sf
reviewed
Mar 12, 2025
...om/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryClientTest.java
Show resolved
Hide resolved
dbyron-sf
reviewed
Mar 12, 2025
...om/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryClientTest.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Mar 12, 2025
...om/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryClientTest.java
Outdated
Show resolved
Hide resolved
a914781 to
f787ce1
Compare
… query parameter when the next link from a docker registry like ECR responds with an encoded url.
…R's next `link` header causing the Retrofit2 client to fail due to error code `405` and `Message: Method Not Allowed`.
f787ce1 to
3de40a9
Compare
dbyron-sf
approved these changes
Mar 12, 2025
Contributor
|
@Mergifyio backport release-1.37.x |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Mar 12, 2025
…xt call to ECR's tags list (#6357) * test(docker): add test to demonstrate the issue of double encoding of query parameter when the next link from a docker registry like ECR responds with an encoded url. * fix(docker): resolve the issue of double encoding contained in the ECR's next `link` header causing the Retrofit2 client to fail due to error code `405` and `Message: Method Not Allowed`. (cherry picked from commit 06c98c0)
mergify bot
added a commit
that referenced
this pull request
Mar 12, 2025
…xt call to ECR's tags list (#6357) (#6358) * test(docker): add test to demonstrate the issue of double encoding of query parameter when the next link from a docker registry like ECR responds with an encoded url. * fix(docker): resolve the issue of double encoding contained in the ECR's next `link` header causing the Retrofit2 client to fail due to error code `405` and `Message: Method Not Allowed`. (cherry picked from commit 06c98c0) Co-authored-by: Kiran Godishala <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses the issue - spinnaker/spinnaker#7015 (comment)
AWS ECR's response header
linkcontains encrypted and encoded url which often has special characters like%2F(/before encoding),%3D(=before encoding) etc. But retrofit2 doesn't allow%in the url without encoding it. As a result%2Fbecomes%252Fand%3Dbecomes%253Das%25is the encoded representation of%and causing server side error -This PR addresses the issue by preventing double encoding by retrofit2 client.
Since the QueryMap was introduced earlier, the very first call to tags list api needs to be passed the original paginate size in the query param. This is addressed in this PR as well.