Skip to content

Make the SQL JDBC JAR Multi-Release, and start beam-sql.sh without an uber JAR - #41872

Open
ahmedabu98 wants to merge 2 commits into
apache:masterfrom
ahmedabu98:sql-shell-classpath
Open

ahmedabu98 wants to merge 2 commits into
apache:masterfrom
ahmedabu98:sql-shell-classpath

Conversation

@ahmedabu98

@ahmedabu98 ahmedabu98 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR makes the Beam SQL JDBC JAR Multi-Release, so host lookups work on Java 18+ when you use the JAR directly, for example as a JDBC driver.

beam-sql.sh now starts the shell from the classpath Maven resolves instead of building an uber JAR first, so the first start is much faster. --uber-jar keeps the old behavior.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📋 Review Summary

This PR makes beam-sdks-java-extensions-sql-jdbc a Multi-Release JAR (fixing Java 18+ InetAddressResolverProvider loading issues on plain classpaths while excluding conflicting versioned module-info.class descriptors) and updates scripts/beam-sql.sh to run directly from the local Maven repository classpath rather than building an uber JAR on first start. The implementation is well-reasoned, handles backwards compatibility with older non-Multi-Release JDBC JARs cleanly, and includes thorough verification.

🔍 General Feedback

  • The approach to handling dnsjava's versioned InetAddressResolverProvider for previously released Beam versions via a tiny supplemental Multi-Release JAR at the tail of the classpath is clever and minimally invasive.
  • Using Java @argfile syntax and atomic cache file writes (mv "${CLASSPATH_FILE}.$$" "${CLASSPATH_FILE}") are solid practices for shell script reliability.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@codecov

codecov Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.14%. Comparing base (374c33f) to head (ccc7d48).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41872      +/-   ##
============================================
- Coverage     58.88%   58.14%   -0.74%     
- Complexity     2334     2847     +513     
============================================
  Files          1136     1211      +75     
  Lines        171035   173609    +2574     
  Branches       1552     2330     +778     
============================================
+ Hits         100714   100950     +236     
- Misses        67769    69949    +2180     
- Partials       2552     2710     +158     
Flag Coverage Δ
java 66.47% <ø> (-10.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @damccorm for label java.
Backup reviewer: kennknowles (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant