Skip to content

Unified release workflow for shaded and thin JARs#1

Closed
gopalldb wants to merge 5 commits into
mainfrom
single-module-thin-jar
Closed

Unified release workflow for shaded and thin JARs#1
gopalldb wants to merge 5 commits into
mainfrom
single-module-thin-jar

Conversation

@gopalldb

Copy link
Copy Markdown
Owner

Summary

This PR simplifies the release process by publishing both shaded and thin JARs in a single unified workflow, replacing the multi-module approach with a cleaner single-module solution.

Changes

pom.xml

  • Added build-helper-maven-plugin to attach unshaded JAR with -thin classifier before shading
  • This creates databricks-jdbc-{version}-thin.jar automatically during build

.github/workflows/release.yml

  • Merged release and release-thin workflows into one
  • Publishes both artifacts to Maven Central in sequence:
    1. Shaded JAR: com.databricks:databricks-jdbc (main artifact)
    2. Thin JAR: com.databricks:databricks-jdbc-thin (with thin_public_pom.xml)

.github/workflows/release-thin.yml

  • Deleted (no longer needed - functionality merged into release.yml)

Benefits

Single workflow - Both JARs published in one GitHub Actions run
Minimal changes - Only 3 files modified, no code refactoring
Backward compatible - Existing users unaffected (shaded JAR remains main artifact)
Simple maintenance - Single module, no parent/child POM complexity
Clean build - mvn package creates both JARs automatically

Build Output

target/databricks-jdbc-3.0.1.jar       (37MB shaded uber JAR)
target/databricks-jdbc-3.0.1-thin.jar  (2.4MB thin JAR, driver classes only)

Testing

  • ✅ Local build successful
  • ✅ Both JARs created with correct content
  • ✅ Thin JAR verified: contains driver classes, no shaded dependencies

Replaces

This is a simpler alternative to PR databricks#1042 (multi-module approach), providing the same functionality with less complexity.

NO_CHANGELOG=true - Infrastructure change, no user-facing functionality changes

- Add build-helper-maven-plugin to attach unshaded JAR with -thin classifier
- Merge release.yml and release-thin.yml into single workflow
- Publish both artifacts to Maven Central in one workflow
- Shaded JAR: com.databricks:databricks-jdbc (main artifact)
- Thin JAR: com.databricks:databricks-jdbc-thin (separate artifact with thin_public_pom.xml)

Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
The thin JAR is now published in the main release.yml workflow
along with the shaded JAR, eliminating the need for a separate
workflow.

Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
The jacoco:report goal is bound to the prepare-package phase in pom.xml.
Running 'mvn clean test jacoco:report' stops after test phase and never
reaches prepare-package, causing the coverage file to not be generated.

Changed to 'mvn clean package' which runs through prepare-package phase
and generates the coverage report at target/site/jacoco/jacoco.xml.

Tested locally:
- Coverage file generated successfully
- Coverage: 85.23% (passes 85% requirement)
@github-actions

Copy link
Copy Markdown

This PR has been marked as Stale because it has been open for 30 days with no activity. If you would like the PR to remain open, please remove the stale label or comment on the PR.

@github-actions github-actions Bot added the Stale label Mar 28, 2026
@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions Bot closed this Apr 4, 2026
gopalldb pushed a commit that referenced this pull request May 5, 2026
…icks#1428)

## Summary

Three CI workflows on `main` have been failing. This PR fixes the root
causes.

### 1. `Integration Tests Workflow - Main Branch` (failing 30+ runs in a
row since Apr 8)

- The cache step uses `path: ~/.m2` with a long-lived restore-key `${{
runner.os }}-m2`. It restores a stale cache from before the JFrog OIDC
migration, whose `~/.m2/settings.xml` (the github-server one written by
`actions/setup-java`) **overwrites** the JFrog mirror config that the
preceding "Configure maven" step just wrote.
- Maven then tries to resolve from `repo.maven.apache.org` directly,
which the protected runner cannot reach: `Could not transfer artifact
... from/to central (https://repo.maven.apache.org/maven2): Remote host
terminated the handshake`.
- **Fix**: narrow `path` to `~/.m2/repository` so `settings.xml` is left
alone (matches the pattern used by `warmMavenCache.yml`).

### 2. `Weekly bug catcher` — same root cause as #1

Same fix in `bugCatcher.yml`.

### 3. `Test JDBC Logging` (Windows jobs failing since Apr 27)

- The "Get JFrog OIDC token" step uses bash syntax (`if [ -z "$X" ]`,
`set -euo pipefail`) but has no `shell:` directive. On Windows runners
the default shell is `pwsh`, which fails parsing the bash `if` with
`Missing '(' after 'if'`. The "Configure maven" step has the same
problem (bash heredoc).
- **Fix**: pin both steps to `shell: bash`. Linux jobs were unaffected
because their default shell is already bash.

## Test plan

- [ ] After merge, confirm `Integration Tests Workflow - Main Branch`
passes on the next push to `main`
- [ ] After merge, confirm `Test JDBC Logging` Windows jobs pass on the
next push to `main`
- [ ] Next scheduled `Weekly bug catcher` run (Mondays 00:00 UTC) is
green

NO_CHANGELOG=true
OVERRIDE_FREEZE=true

This pull request and its description were written by Isaac.

---------

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
gopalldb added a commit that referenced this pull request May 11, 2026
Major fixes:
- #1: Use 2-thread pool instead of single-thread to prevent one blocked
  heartbeat RPC from starving others on the same connection
- databricks#3: Fix getStoppedFlag() leak — use get() + ALREADY_STOPPED sentinel
  instead of computeIfAbsent() which re-created a false flag after
  stopHeartbeat() removed it, causing RPCs after stop

Minor fixes:
- #2: Increase awaitTermination from 5s to 10s with explanatory comment
- databricks#4: Add comment about client capture retaining session reference
- #5: Document reactive vs proactive heartbeat stop limitation
- databricks#6, databricks#7, #9, databricks#10, databricks#11: Acknowledged as correct/acceptable per reviewer

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant