Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ec8a6e8
[PECOBLR-1168] query tags telemetry (#1166)
sreekanth-db Jan 9, 2026
21e07bd
Add UserAgent for connector service calls (#1175)
gopalldb Jan 12, 2026
6f15fd1
Flip IgnoreTransactions default from 0 to 1 for multi-statement trans…
vikrantpuppala Jan 12, 2026
0e8b1ad
Bump version to 3.1.1 (#1172)
jprakash-db Jan 13, 2026
3e4f21c
Fix Arrow field metadata not available for queries with 0 rows (#1177)
gopalldb Jan 16, 2026
4310e77
Implement lazy loading for inline Arrow results (#1029)
jayantsing-db Jan 19, 2026
87b5527
Normalize TIMESTAMP_NTZ to TIMESTAMP in Thrift path for metadata cons…
gopalldb Jan 19, 2026
9c9ffe2
feat: Add support for disabling CloudFetch via EnableQueryResultDownl…
vikrantpuppala Jan 19, 2026
8a2f333
[PECOBLR-1408] [PECOBLR-1407] [PECOBLR-1409][PECOBLR-1411] Address te…
samikshya-db Jan 20, 2026
809c0b3
[PECOBLR-1377] SRID in geospatial column type name (#1157)
sreekanth-db Jan 21, 2026
1a68271
feat: Implement streaming prefetch for Thrift inline results (#1184)
vikrantpuppala Jan 22, 2026
1893a40
Fix IndexOutOfBoundsException in Arrow Metadata Access for DDL Statem…
sreekanth-db Jan 23, 2026
db0e4b9
Fix enable multiple catalog support to match existing driver behaviou…
msrathore-db Jan 24, 2026
0b7f644
allow metric view table type in sea mode (#1188)
shivam2680 Jan 27, 2026
8aed472
Add NonRowcountQueryPrefixes configuration parameter (#1189)
gopalldb Jan 30, 2026
b5c5067
Added support for getClientInfoProperties and getTypeInfo to return a…
msrathore-db Feb 3, 2026
bcb2792
Improved telemetry + error logging for token federation errors (#1179)
samikshya-db Feb 3, 2026
f6691ce
branch freeze for upcoming version release (#1196)
samikshya-db Feb 3, 2026
a8e339e
Add more error logs in http response validation (#1197)
samikshya-db Feb 3, 2026
b9f4dc1
[ES-1717770] Fix timeout exception during fetch results (#1199)
samikshya-db Feb 5, 2026
47235a1
[ES-1735222] Make statement execution JDBC compliant for query and DM…
gopalldb Feb 12, 2026
1af2dec
Fix ~5x fetch regression by caching TelemetryCollector in DatabricksR…
gopalldb Feb 21, 2026
082b431
Add and extend auth tests (PECOBLR-1842) (#1215)
nikhilsuri-db Feb 23, 2026
8e23bc4
Use separate HTTP Client configuration for TelemetryClient (#1225)
samikshya-db Feb 23, 2026
1638998
Cut new release 3.2.1 (#1194)
samikshya-db Feb 25, 2026
936d666
Add CLAUDE.md and remove release freeze (#1211)
vikrantpuppala Feb 25, 2026
39d815e
Fix rollback in auto-commit mode and handle numeric autocommit respon…
vikrantpuppala Feb 25, 2026
3710687
Remove dead recordResultSetIteration overloads (#1232)
vikrantpuppala Feb 25, 2026
50ba0aa
Add debug-level logging for cloud fetch performance diagnostics (#1218)
vikrantpuppala Feb 25, 2026
40efd22
Fix NPE in getObject(int, Class<T>) when column value is NULL (#1222)…
gopalldb Feb 25, 2026
dd52cc5
Add configurable OAuthWebServerTimeout connection property (#1226)
gopalldb Feb 25, 2026
d89ad56
Add JDBC spec integration tests with fake service record-replay (#1212)
gopalldb Feb 25, 2026
7588640
Add metadata, connection, statement and PreparedStatement integration…
gopalldb Feb 25, 2026
3cd7e33
Add 56 JDBC spec integration tests with comprehensive DatabaseMetaDat…
gopalldb Feb 25, 2026
8f56b67
Add 11 JDBC spec final coverage gap tests (#1217)
gopalldb Feb 26, 2026
843d675
Fix 8 MetadataIntegrationTests failing in Thrift replay mode (#1234)
gopalldb Feb 26, 2026
48534f8
[PECOBLR-1969]: Fix socket leak in SDK HTTP client preventing CRaC ch…
vikrantpuppala Feb 26, 2026
3aec164
Fix metadata thrift recordings (#1236)
gopalldb Feb 27, 2026
c04e909
Downgrade FetchSize log messages from WARN to DEBUG (#1237)
gopalldb Feb 27, 2026
10c59d5
[PECOBLR-1709] Add SEA metadata operation logging header (#1191)
msrathore-db Feb 27, 2026
00ceea5
Enable JUL logging for fat jar and update logging documentation (#1168)
jayantsing-db Mar 2, 2026
5dc1e5a
[PECOBLR-1121] Arrow patch to circumvent Arrow issues with JDk 16+ (#…
tejassp-db Mar 2, 2026
b08b8bc
Bump jackson-core from 2.18.3 to 2.18.6 (#1245)
sreekanth-db Mar 3, 2026
909fcfb
Add implementation spec for statement-level query tags (#1239)
gopalldb Mar 5, 2026
a673c23
Add /fix-github-issue Claude Code command (#1249)
vikrantpuppala Mar 5, 2026
a4eb66d
PECOBLR-2023 Skip assembly jar packaging tests on fork PRs due to mis…
tejassp-db Mar 5, 2026
61574e5
Add UseQueryForMetadata connection property for Thrift metadata opera…
gopalldb Mar 6, 2026
0531451
fix url param name (#1257)
shivam2680 Mar 8, 2026
717cc27
Force runAsync=false for metadata SHOW commands in Thrift client (#1258)
gopalldb Mar 9, 2026
c7291f5
Fix Date fields in complex types returning epoch day integers (#1248)
vikrantpuppala Mar 9, 2026
4d89c61
Add comment parsing for shouldReturnResultSet and countParameters (#1…
rileythomp Mar 10, 2026
f369a4d
Escape underscore wildcard in catalog names for Thrift metadata RPCs …
gopalldb Mar 10, 2026
93cf304
Fix the JDK8 github action + make local build developer friendly + fi…
samikshya-db Mar 10, 2026
3ef8603
Fix DatabaseMetaData.getColumns() returning type name in COLUMN_DEF f…
samikshya-db Mar 11, 2026
7741c3c
Add /sync-jdk8-branch slash command + update the jdk8 action workflow…
samikshya-db Mar 12, 2026
c724642
[ES-1774740] Fix Thrift polling infinite loop on invalid operation ha…
gopalldb Mar 13, 2026
b069b4e
[ES-1765150] Coalesce concurrent expired-link refreshes into single b…
gopalldb Mar 16, 2026
03ca3c1
[ES-1717770] Fix TIMEDOUT_STATE not recognized as error on interactiv…
samikshya-db Mar 16, 2026
dd0c7b9
Fix IdleConnectionEvictor thread leak in long-running services (#1271)
samikshya-db Mar 16, 2026
28d6a13
[PECOBLR-1746] Implementing support for listing procedures (#1238)
msrathore-db Mar 16, 2026
aa29042
Cut new release 3.3.1 (#1281)
msrathore-db Mar 18, 2026
c6ab4de
Skip OWASP dependency check in release build step (#1286)
msrathore-db Mar 19, 2026
d8c326d
Fix primitive type parsing in complex types for Arrow-serialized form…
vikrantpuppala Mar 20, 2026
04439ee
Fix backtick quoting for column names in batched INSERT reconstructio…
o-shevchenko Mar 20, 2026
561d89d
Move dependencyManagement to parent pom to fix CVE-2025-48924 in uber…
o-shevchenko Mar 21, 2026
9d834a5
Add Claude GitHub Actions workflows (#1288)
vikrantpuppala Mar 22, 2026
fb5c13f
Add OWASP suppression for CVE-2026-25087 and re-enable dependency che…
msrathore-db Mar 22, 2026
93f01a2
Use version property for jts-core dependency (#1297)
vikrantpuppala Mar 22, 2026
806ee61
Improve instructions for jdk8 branch update (#1298)
samikshya-db Mar 23, 2026
49124d0
Prevent script injection in coverageReport workflow (#1295)
madhav-db Mar 23, 2026
6ce4606
Add comprehensive MST transaction metadata and edge case tests
vikrantpuppala Mar 26, 2026
2929c4d
Rename test table to avoid collisions with Python driver tests
vikrantpuppala Mar 26, 2026
a075958
Add ignoreTransactions=0 to JDBC URL and fix 2 test issues
vikrantpuppala Mar 26, 2026
18bfbc5
Fix 8 test failures based on E2E run results
vikrantpuppala Mar 27, 2026
dc758c7
Add CI workflow for transaction tests and use env vars for credentials
vikrantpuppala Mar 27, 2026
18a9fb2
Revert "Add CI workflow for transaction tests and use env vars for cr…
vikrantpuppala Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
89 changes: 89 additions & 0 deletions .claude/commands/fix-github-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
description: Debug and fix a GitHub issue end-to-end — reproduce, fix, test, create PR, and research related issues.
---

### User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding. The input should be a GitHub issue number (e.g., `1247`) or a full GitHub issue URL. If empty, ask the user for an issue number.

## Goal

Fix a GitHub issue with a minimal, well-tested change and create a PR linked to the issue. After the fix, research the codebase for related patterns that may have the same bug.

## Steps

### Step 1: Fetch and Understand the Issue

1. Determine the target repo from the current git remote (default to `databricks/databricks-jdbc`) and use it as the resolved repo for all subsequent `gh` commands.
2. Use `gh issue view <number> --repo <resolved-repo>` to fetch the issue title, description, reproduction steps, expected vs actual behavior, and environment details.
3. Summarize your understanding of the bug to the user and ask for confirmation before proceeding.

### Step 2: Reproduce the Issue

Write a **minimal failing test** that demonstrates the bug:

1. Identify the relevant module and test directory.
2. Write a unit test that reproduces the exact scenario described in the issue. Prefer unit tests over integration tests when possible.
3. Run the test and **confirm it fails** with the expected error. Show the failure output to the user.
4. If the bug requires E2E/integration testing against a live workspace:
- Verify the required environment variables are set: `DATABRICKS_HOST`, `DATABRICKS_TOKEN`, and `DATABRICKS_HTTP_PATH`.
- If any are missing, ask the user to set them before proceeding.
- Ask if they want to proceed with integration tests or stick with unit tests.

### Step 3: Identify Root Cause

1. Use the Explore agent or search tools to trace the code path involved in the bug.
2. Identify the **minimal set of files and methods** that need to change.
3. Explain the root cause to the user with file paths and line numbers.
4. Confirm the fix approach before making changes — keep the blast radius minimal.

### Step 4: Implement the Fix

1. Make the **smallest code change** that fixes the bug. No unrelated refactors, no over-engineering.
2. Follow existing code patterns and conventions.
3. Run the failing test from Step 2 and confirm it now **passes**.
4. Run the full test class to check for regressions.

### Step 5: Add Tests

Ensure adequate test coverage for the fix. **Add tests to existing test suites whenever possible — only create a new test file if absolutely necessary.**

1. The reproduction test from Step 2 should already cover the primary case.
2. Add edge case tests as needed (e.g., null values, boundary conditions, alternate input formats). Prefer parameterised tests (e.g., JUnit `@ParameterizedTest`) wherever possible to cover multiple inputs concisely.
3. Add tests for related code paths if the same bug pattern applies (e.g., if a bug in STRUCT also affects ARRAY and MAP, test all three).
4. Run the full test suite for affected test classes and confirm all pass.

### Step 6: Create PR

1. Ensure the correct GitHub account is active for this repository, following `CLAUDE.md` guidance. Check with `gh auth status` and switch if needed with `gh auth switch --user <account>`.
2. Create a descriptive branch: `fix/<issue-number>-<short-description>`
3. Commit with DCO sign-off (`-s` flag) and a clear message referencing the issue.
4. Push and create a PR with:
- Title referencing the issue
- Summary section explaining the bug and fix
- Test plan section listing all tests added
- `Closes #<issue-number>` in the body
- A `NEXT_CHANGELOG.md` entry for user-facing changes, or `NO_CHANGELOG=true` for internal-only changes (see `CLAUDE.md` for guidance; ask the user if unclear)
5. Share the PR URL with the user.

### Step 7: Research Related Issues

**After the fix is complete**, proactively research the codebase for similar patterns:

1. Search for code that follows the same pattern as the bug (e.g., if a type conversion was wrong for DATE, check if TIMESTAMP, TIME, etc. have the same issue).
2. Search for similar method calls, switch cases, or conversion logic that could be affected.
3. Check if the same fix pattern needs to be applied elsewhere (e.g., in `DatabricksArray`, `DatabricksStruct`, or other parsers).
4. Report findings to the user as a list of potential related issues with file paths and line numbers.
5. Let the user decide whether to fix those in the same PR or create follow-up issues.

## Important Notes

- Always read files before modifying them.
- Follow the project's coding conventions (Google Java Style Guide, run `mvn spotless:apply`).
- Keep changes minimal — fix only what's broken.
- The reproduction test must fail before the fix and pass after.
- Research related issues is not optional — always do it as the final step.
226 changes: 226 additions & 0 deletions .claude/commands/sync-jdk8-branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
---
description: Sync the jdk-8 branch with the latest main branch and apply all JDK 8 compatibility transformations.
---

### User Input

```text
$ARGUMENTS
```

Optional: a specific commit SHA or range to sync. If empty, sync from the tip of `main`.

## Goal

Merge `main` into `jdk-8` and apply all JDK 8 compatibility transformations. Confirm with the user at each decision point before making irreversible changes.

---

## Steps

### Step 1: Set Up

1. Verify the non-EMU GitHub account is active: `gh auth status`. Switch if needed.
2. `git fetch origin main jdk-8`
3. `git checkout jdk-8`
4. Show pending commits: `git log jdk-8..origin/main --oneline`. Ask user to confirm scope before proceeding.

### Step 2: Merge

```bash
git merge origin/main --no-commit --no-ff
```

Resolve any conflicts, then continue to Step 3 before committing.

---

### Step 3: Apply JDK 8 Transformations

Read each file before editing. Apply all of the following.

#### `pom.xml` (root)

- Set `maven.compiler.source` and `maven.compiler.target` to `1.8`
- **Remove spotless entirely**: delete the `spotless-maven-plugin` plugin declaration, any `<pluginManagement>` entry for it, and any `spotless.version` property. Do NOT add a skip profile — the plugin must not exist on the jdk-8 branch at all.
<!-- Spotless is removed entirely (not just skipped) because even loading spotless-maven-plugin 2.39.0 on JDK 8 causes CI failures regardless of skip flags. TODO: Investigate whether an older version (pre-2.28.0) supports JDK 8 so formatting can be enforced rather than absent. -->
- **Remove `org.owasp:dependency-check-maven`** plugin entirely — remove from both `<plugins>` and any `<pluginManagement>` entry. Not needed on the jdk-8 branch.
- Pin these dependency versions:

| Property | jdk-8 value | Reason |
|---|---|---|
| `arrow.version` | `13.0.0` | Arrow 14+ requires Java 11 |
| `mockito.version` | `4.11.0` | Mockito 5.x requires Java 11 |
| `nimbusjose.version` | `9.47` | nimbus-jose-jwt 10.x requires Java 11 |

- Remove `wiremock.version` (WireMock 3.x requires Java 11; fakeservice tests are removed)
- Remove the spotless `<excludes>` block for Arrow patched classes (`MemoryUtil.java`, `ArrowBuf.java`, `DecimalUtility.java`)

#### `jdbc-core/pom.xml`

- Remove `--add-opens=java.base/java.nio=ALL-UNNAMED` from surefire `<argLine>` and exec-maven-plugin `<arguments>`. Do not add any JDK-version branching — target JDK 8 only. Final surefire `<argLine>`:
```xml
<argLine>@{argLine} -Xmx5g -Dnet.bytebuddy.experimental=true</argLine>
```
- Delete profiles `jdk17-NioNotOpen` and `jdk21-NioNotOpen` entirely
- Remove JaCoCo exclusions for Arrow patch and custom Arrow classes (`MemoryUtil*`, `ArrowBuf*`, `DecimalUtility*`, `DatabricksAllocationReservation*`, `DatabricksBufferAllocator*`, `DatabricksReferenceManager*`, `DatabricksArrowBuf*`)
- Remove `<groups>!Jvm17PlusAndArrowToNioReflectionDisabled</groups>` from the `local` profile
- Remove the `wiremock` test dependency
- Add to surefire `<excludes>`:
```xml
<exclude>**/integration/fakeservice/**/*.java</exclude>
<exclude>**/integration/e2e/**/*.java</exclude>
```

#### `.github/workflows/coverageReport.yml`

Change the JDK version to 8 and lower the coverage threshold to 80%:

```yaml
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
```

Update every occurrence of `85` in the threshold check to `80`. Also remove `-Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled'` from the test run command (that tag doesn't exist on the jdk-8 branch) and add `-Dspotless.skip=true`:

```bash
mvn -pl jdbc-core clean test -Dspotless.skip=true jacoco:report
```

**Do not modify any other workflow files.** All other `.github/workflows/*.yml` files must be left exactly as merged from main.

#### Source code — Java 9+ API replacements

Scan all Java source files for APIs introduced after JDK 8 and replace them. Common patterns:

| Java 9+ (incompatible) | JDK 8 replacement |
|---|---|
| `List.of(...)` | `Arrays.asList(...)` (or `Collections.unmodifiableList(Arrays.asList(...))`) |
| `Set.of(...)` | `ImmutableSet.of(...)` (Guava) |
| `Map.of(...)` | `ImmutableMap.of(...)` (Guava) |
| `Map.entry(k, v)` | `new AbstractMap.SimpleEntry<>(k, v)` (or Guava's `Maps.immutableEntry(k, v)`) |
| `Optional.isEmpty()` | `!optional.isPresent()` |
| `String.repeat(n)` | loop or `new String(new char[n]).replace('\0', c)` |
| `InputStream.nullInputStream()` | `new ByteArrayInputStream(new byte[0])` |
| `Reader.nullReader()` | `new StringReader("")` |
| `LocalDate.EPOCH` | `LocalDate.of(1970, 1, 1)` |
| `URLDecoder.decode(str, StandardCharsets.UTF_8)` (Charset overload, Java 10+) | `URLDecoder.decode(str, StandardCharsets.UTF_8.name())` |

After replacing, verify no stragglers remain:
```bash
grep -r "List\.of\|Set\.of\|Map\.of\|Map\.entry\|Optional\.isEmpty\|\.repeat(\|nullInputStream\|nullReader\|LocalDate\.EPOCH" src/main/java/ src/test/java/
```

#### Source code — Other changes

- **Remove JDBC 4.3 methods** from `DatabricksConnection.java` — `setShardingKeyIfValid` and `setShardingKey` overloads plus the `ShardingKey` import. Also remove JDBC 4.3 test methods such as `enquoteLiteral`, `enquoteIdentifier`, and any other JDBC 4.3+ APIs (`ConnectionBuilder`, `PooledConnectionBuilder`). All require Java 9+.

- **Remove Arrow patch files** (introduced in PR #1243 for JDK 16+ NIO restrictions — not relevant to JDK 8):

*Patched Arrow internals:*
- `src/main/java/org/apache/arrow/memory/util/MemoryUtil.java`
- `src/main/java/org/apache/arrow/memory/ArrowBuf.java`
- `src/main/java/org/apache/arrow/vector/util/DecimalUtility.java`

*Custom Arrow allocator classes:*
- `src/main/java/org/apache/arrow/memory/DatabricksAllocationReservation.java`
- `src/main/java/org/apache/arrow/memory/DatabricksArrowBuf.java`
- `src/main/java/org/apache/arrow/memory/DatabricksBufferAllocator.java`
- `src/main/java/org/apache/arrow/memory/DatabricksReferenceManager.java`
- `src/main/java/org/apache/arrow/memory/DatabricksReferenceManagerNOOP.java`

Revert any changes to `ArrowBufferAllocator.java` and `AbstractArrowResultChunk.java` that reference the removed custom allocator classes.

#### Test code

- Delete `src/test/java/com/databricks/jdbc/integration/fakeservice/` and `src/test/java/com/databricks/jdbc/integration/e2e/`
- Delete WireMock test resources: `src/test/resources/sqlexecapi/`, `src/test/resources/thriftserverapi/`, `src/test/resources/cloudfetchapi/`
- Delete Arrow patch tests (all introduced in PR #1243):
- `src/test/java/com/databricks/jdbc/api/impl/arrow/ArrowBufferAllocator*Test.java` (Netty, Unsafe, Unknown, base)
- `src/test/java/org/apache/arrow/memory/Databricks*Test.java` and `AbstractDatabricksArrowPatchTypesTest.java`, `ArrowParsingBenchmark.java`
- `src/test/resources/arrow/` (entire directory)
- Remove any test annotated with `@Tag("Jvm17PlusAndArrowToNioReflectionDisabled")`

- **Remove `IntervalConverter` overflow test**: Delete the test case for `Duration.ofNanos(Long.MIN_VALUE)` in `IntervalConverterTest` (or wherever it lives). On JDK 8, `Duration.toNanos()` uses `Math.multiplyExact()` internally and throws `ArithmeticException` when seconds × 1,000,000,000 overflows `long`. JDK 17+ doesn't have this problem. The edge case doesn't occur in practice — remove the test rather than working around it.

- **Fix `DatabricksDriverFeatureFlagsContext` hanging test**: Any test that constructs `DatabricksDriverFeatureFlagsContext` with a fake hostname (e.g. `sample-host.cloud.databricks.com`) will hang indefinitely on JDK 8. JDK 8's HTTP client has no default connection timeout, so the TCP attempt blocks for the full OS socket timeout (minutes+). JDK 17+ fails fast because of tighter defaults.

Fix in order of preference:
1. Mock the HTTP client / feature-flags fetcher so no real network call is made.
2. Pass a pre-populated flag map to the constructor instead of fetching from the server.
3. Set an explicit connection timeout before the test runs.

Never leave a test that makes a real outbound HTTP/TCP connection to a non-existent host on the jdk-8 branch — it will cause the CI job to time out.

#### Full dependency audit

Check **every** dependency across all `pom.xml` files for JDK 8 compatibility. A version bump from `main` can silently raise the minimum Java version.

Known incompatible versions:

| Dependency | Max safe version for JDK 8 |
|---|---|
| `org.apache.arrow:arrow-*` | 13.x |
| `org.mockito:mockito-*` | 4.x |
| `com.nimbusds:nimbus-jose-jwt` | 9.x |
| `org.wiremock:wiremock` | remove entirely |
| `com.diffplug.spotless:spotless-maven-plugin` | remove entirely (not just skip) |
| `org.owasp:dependency-check-maven` | remove entirely |
| `jakarta.annotation:jakarta.annotation-api` | 1.x (2.x requires Java 11) |

Everything else in the current `pom.xml` is JDK 8 compatible. For any new dependency not in this table: check Maven Central / release notes. If no JDK 8 compatible version exists, **stop and notify the user** with the options (pin older version, swap alternative, remove) before taking action.

---

### Step 4: Verify

```bash
mvn clean install -DskipTests # confirm no compilation errors
mvn -pl jdbc-core test -Dspotless.skip=true
```

After a successful build, confirm the jar targets JDK 8:

```bash
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
JAR=jdbc-core/target/databricks-jdbc-core-${VERSION}.jar
javap -verbose -cp "$JAR" \
$(jar tf "$JAR" | grep '\.class$' | head -1 | sed 's/\.class$//' | tr '/' '.') \
| grep 'major version'
# → major version: 52 ✅ (52 = JDK 8)
```

Fix any residual Java 9+ API usage before proceeding.

---

### Step 5: Create the PR

```bash
git add -p
git commit -s -m "Sync jdk-8 branch with main (<short description>)"
git push origin jdk-8
gh pr create --base jdk-8 \
--title "Sync jdk-8 with main: <short description>" \
--body "..."
```

PR body: summary of synced commits, list of transformations applied, `NO_CHANGELOG=true`.

Share the PR URL with the user.

---

## Rules

- Never use `--add-opens`, `--add-exports`, or any JPMS flag — invalid on JDK 8.
- Never add branching for JDK 9, 11, 17, or 21 — the branch targets JDK 8 only.
- Never run `mvn spotless:apply` on JDK 8. Spotless is fully removed from the jdk-8 branch (no plugin declaration, no pluginManagement entry, no version property) because even loading the plugin on JDK 8 causes CI failures. Always pass `-Dspotless.skip=true` as a safety net.
<!-- TODO: Investigate whether an older `spotless-maven-plugin` version (pre-2.28.0) supports JDK 8 so formatting can be enforced rather than absent. -->
- Never add JDBC 4.3+ APIs (`ShardingKey`, `ConnectionBuilder`, `PooledConnectionBuilder`, `enquoteLiteral`, `enquoteIdentifier`).
- Only unit tests belong in the jdk-8 branch. Never carry over fakeservice or e2e tests — fakeservice depends on WireMock 3.x (Java 11+), and e2e tests are covered by comprehensive MultiDBR testing. Remove them and their test resources entirely.
- Never leave a test that makes a real outbound HTTP/TCP connection to a non-existent host — JDK 8 will hang indefinitely without a connection timeout.
- Only modify `coverageReport.yml` in `.github/workflows/`. All other workflow files must be left exactly as merged from main.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If available, share redacted client side logs
- OS: [e.g. Windows]
- Java version [e.g. Java 21]
- Java vendor [e.g. OpenJDK]
- Driver Version [e.g. 3.0.7]
- Driver Version [e.g. 3.1.1]
- BI Tool (if used) [e.g. DBeaver]
- BI Tool version (if applicable) [e.g. 24.3.5]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bugCatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Run Integration Tests
run: mvn -B test -Dtest=*e2e/OAuthTests*
run: mvn -pl jdbc-core -B test -Dtest='*e2e/OAuthTests*'
env:
DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }}
DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }}
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Claude Code Review

on:
issue_comment:
types: [created]

jobs:
claude-review:
if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/review') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR')
runs-on:
group: databricks-protected-runner-group
labels: [linux-ubuntu-latest]
permissions:
contents: read
pull-requests: write
issues: write
id-token: write

steps:
- name: React to comment
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
-f content=eyes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get PR head ref
id: pr
run: |
PR_DATA=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }})
echo "ref=$(echo "$PR_DATA" | jq -r .head.ref)" >> "$GITHUB_OUTPUT"
echo "number=$(echo "$PR_DATA" | jq -r .number)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ steps.pr.outputs.ref }}
fetch-depth: 0

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
review_comment_id: ${{ github.event.comment.id }}
trigger_phrase: "/review"
timeout_minutes: 15
Loading
Loading