-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(protobuf-core): re-introduce the load-by-file-path/url protobuf descriptors #18770
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(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! One small comment around resource handling, otherwise lgtm.
| } | ||
|
|
||
| @Test | ||
| public void tesDescriptorUrl() |
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.
| public void tesDescriptorUrl() | |
| public void testDescriptorUrl() |
| try { | ||
| fin = url.openConnection().getInputStream(); | ||
| } |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for the fix. 🐻
gianm
left a comment
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 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: