Skip to content

Conversation

@hfukada
Copy link
Contributor

@hfukada hfukada commented Nov 21, 2025

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:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Contributor

@amaechler amaechler left a 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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void tesDescriptorUrl()
public void testDescriptorUrl()

Comment on lines 76 to 78
try {
fin = url.openConnection().getInputStream();
}
Copy link
Contributor

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()) { ...

@hfukada hfukada requested a review from amaechler November 21, 2025 19:13
@hfukada
Copy link
Contributor Author

hfukada commented Nov 24, 2025

@amaechler can you re-look? the unit test failures are not my own changes.

Copy link
Contributor

@amaechler amaechler left a 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. 🐻

Copy link
Contributor

@gianm gianm left a 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.

@gianm gianm merged commit 60ad692 into apache:master Nov 25, 2025
71 of 72 checks passed
@hfukada
Copy link
Contributor Author

hfukada commented Nov 28, 2025

can we backport this change to 35.0.0?

@clintropolis clintropolis added this to the 35.0.1 milestone Dec 1, 2025
clintropolis pushed a commit that referenced this pull request Dec 1, 2025
…escriptors (#18770)

* fix(protobuf-core): re-introduce the load-by-file-path/url protobuf descriptors

* fix: typo and refactor with context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants