-
Notifications
You must be signed in to change notification settings - Fork 583
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
Add support for binary/octet-stream. #5892
base: main
Are you sure you want to change the base?
Add support for binary/octet-stream. #5892
Conversation
Quay.io responds with binary/octet-stream when reading imageBlob. application/octet-stream is identical to binary/octet-stream. Fixes spring-cloud#5885
c0462f2
to
f0fb797
Compare
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.
Thanks @corneil. A couple of minor comments/suggestions, but other than that LGTM.
...org/springframework/cloud/dataflow/container/registry/ContainerImageRestTemplateFactory.java
Show resolved
Hide resolved
...org/springframework/cloud/dataflow/container/registry/ContainerImageRestTemplateFactory.java
Show resolved
Hide resolved
@@ -210,6 +210,7 @@ private RestTemplate initRestTemplate(HttpClientBuilder clientBuilder, boolean w | |||
ArrayList<MediaType> mediaTypeList = new ArrayList(octetSupportJsonConverter.getSupportedMediaTypes()); | |||
mediaTypeList.add(MediaType.APPLICATION_OCTET_STREAM); | |||
mediaTypeList.add(MediaType.TEXT_PLAIN); | |||
mediaTypeList.add(MediaType.parseMediaType("binary/octet-stream")); // quay.io responds with binary/octet-stream instead of application/octet-stream |
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.
I think it would be a good idea to ensure we have test coverage for this 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.
That can only be added with integration test using a quay.io container. We don't have existing integration tests for any of the registries.
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.
In that case a manual test will suffice. But let's be sure we do the manual test.
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.
@corneil if you can confirm this I will approve and merge this. Thanks.
Quay.io responds with binary/octet-stream when reading imageBlob.
application/octet-stream is identical to binary/octet-stream.
Fixes #5885