fix(protobuf-core): re-introduce the load-by-file-path/url protobuf descriptors#18770
Conversation
amaechler
left a comment
There was a problem hiding this comment.
Thanks for the fix! One small comment around resource handling, otherwise lgtm.
| } | ||
|
|
||
| @Test | ||
| public void tesDescriptorUrl() |
There was a problem hiding this comment.
| public void tesDescriptorUrl() | |
| public void testDescriptorUrl() |
| try { | ||
| fin = url.openConnection().getInputStream(); | ||
| } |
There was a problem hiding this comment.
Do we need some resource handling for this inputstream in case DescriptorProtos.FileDescriptorSet.parseFrom fails below and properly close the stream again? Maybe just by refactoring a bit and then doing try (fin = url.openConnection().getInputStream()) { ...
|
@amaechler can you re-look? the unit test failures are not my own changes. |
amaechler
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for the fix. 🐻
gianm
left a comment
There was a problem hiding this comment.
I just restarted the test that was failing. Maybe it was flaky.
|
can we backport this change to 35.0.0? |
…escriptors (#18770) * fix(protobuf-core): re-introduce the load-by-file-path/url protobuf descriptors * fix: typo and refactor with context
Description
Druid 35.0.0 broke URL path loading for protobufs. Reintroduce this feature.
Release note
Reintroduce URI protobuf descriptor files loading.
This PR has: