Skip to content

Commit ebca9a4

Browse files
Add licensing, versioning and tests (#9)
* Add LICENSE and NOTICE Signed-off-by: teodordelibasic-db <[email protected]> * Add CHANGELOG.md and NEXT_CHANGELOG.md Signed-off-by: teodordelibasic-db <[email protected]> * Add generate proto tool Signed-off-by: teodordelibasic-db <[email protected]> * Clean up usage of gRPC stubs and channels Signed-off-by: teodordelibasic-db <[email protected]> * Update README.md Signed-off-by: teodordelibasic-db <[email protected]> * Add tests Signed-off-by: teodordelibasic-db <[email protected]> * Fix formatting Signed-off-by: teodordelibasic-db <[email protected]> * Update pom.xml and README.md Signed-off-by: teodordelibasic-db <[email protected]> * Fix flaky test Signed-off-by: teodordelibasic-db <[email protected]> * Fix formatting Signed-off-by: teodordelibasic-db <[email protected]> * Uncomment token fetching Signed-off-by: teodordelibasic-db <[email protected]> * Use Maven central for publishing Signed-off-by: teodordelibasic-db <[email protected]> * Fix CONTRIBUTING.md * Fix formatting --------- Signed-off-by: teodordelibasic-db <[email protected]>
1 parent f8bad59 commit ebca9a4

File tree

19 files changed

+2525
-178
lines changed

19 files changed

+2525
-178
lines changed

.github/workflows/push.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,47 @@ on:
77
types: [checks_requested]
88

99
jobs:
10+
tests-ubuntu:
11+
uses: ./.github/workflows/test.yml
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
javaVersion: ['11', '17', '21']
16+
with:
17+
os: linux-ubuntu-latest
18+
javaVersion: ${{ matrix.javaVersion }}
19+
20+
tests-windows:
21+
uses: ./.github/workflows/test.yml
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
javaVersion: ['11', '17', '21']
26+
with:
27+
os: windows-server-latest
28+
javaVersion: ${{ matrix.javaVersion }}
29+
1030
fmt:
1131
runs-on:
1232
group: databricks-protected-runner-group
1333
labels: linux-ubuntu-latest
14-
steps:
15-
- name: Set up JDK 11
16-
uses: actions/setup-java@v1
17-
with:
18-
java-version: 11
1934

35+
steps:
2036
- name: Checkout
2137
uses: actions/checkout@v4
2238

23-
- name: Cache Maven packages
24-
uses: actions/cache@v4
39+
- name: Set up JDK 11
40+
uses: actions/setup-java@v4
2541
with:
26-
path: ~/.m2
27-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: ${{ runner.os }}-m2
42+
java-version: 11
43+
distribution: 'temurin'
44+
cache: 'maven'
2945

3046
- name: Check formatting
31-
run: mvn --errors spotless:check
47+
run: mvn spotless:check
48+
49+
- name: Fail on formatting differences
50+
if: failure()
51+
run: |
52+
echo "Code formatting issues detected. Run 'mvn spotless:apply' to fix."
53+
exit 1

.github/workflows/test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test Workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
javaVersion:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
test:
15+
strategy:
16+
fail-fast: false
17+
runs-on:
18+
group: databricks-protected-runner-group
19+
labels: ${{ inputs.os }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Unshallow
25+
run: git fetch --prune --unshallow
26+
27+
- name: Set up JDK ${{ inputs.javaVersion }}
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: ${{ inputs.javaVersion }}
31+
distribution: 'temurin'
32+
cache: 'maven'
33+
34+
- name: Build with Maven
35+
run: mvn clean compile
36+
37+
- name: Run tests
38+
run: mvn test
39+
40+
- name: Upload test results
41+
if: always()
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: test-results-${{ inputs.os }}-java-${{ inputs.javaVersion }}
45+
path: |
46+
target/surefire-reports/
47+
target/test-classes/
48+
retention-days: 7

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Version changelog
2+
3+
## Release v0.1.0
4+
5+
Initial release of the Databricks Zerobus Ingest SDK for Java.
6+
7+
### API Changes
8+
9+
- Added `ZerobusSdk` class for creating ingestion streams
10+
- Added `ZerobusStream` class for managing stateful gRPC streams
11+
- Added `RecordAcknowledgment` for blocking until record acknowledgment
12+
- Added `TableProperties` for configuring table schema and name
13+
- Added `StreamConfigurationOptions` for stream behavior configuration
14+
- Added `ZerobusException` and `NonRetriableException` for error handling
15+
- Added `StreamState` enum for tracking stream lifecycle
16+
- Added utility methods in `ZerobusSdkStubUtils` for gRPC stub management
17+
- Support for Java 8 and higher

0 commit comments

Comments
 (0)