Skip to content

Commit db2b644

Browse files
New StateMachine contract
Shared core support using Panama (only Java 23+)
1 parent 1c8ccff commit db2b644

115 files changed

Lines changed: 6991 additions & 1352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bump.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
name: Bump release version
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515
- name: Install dasel
16-
run: curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel && mv ./dasel /usr/local/bin/dasel
16+
run: curl -sSLf "https://github.com/tomwright/dasel/releases/download/v2.8.1/dasel_linux_amd64" -L -o dasel && chmod +x dasel && mv ./dasel /usr/local/bin/dasel
1717
- name: Bump version overwriting libs.versions.toml
18-
run: dasel -f gradle/libs.versions.toml put -t string -v "${{ github.event.inputs.version }}" ".versions.restate"
18+
run: dasel put -f gradle/libs.versions.toml -t string -v "${{ github.event.inputs.version }}" 'versions.restate'
1919
- name: Create version bump PR
20-
uses: peter-evans/create-pull-request@v3
20+
uses: peter-evans/create-pull-request@v8
2121
with:
2222
title: "[Release] Bump to ${{ github.event.inputs.version }}"
2323
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dependency-submission.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout sources
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616
- name: Setup Java
17-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1818
with:
1919
distribution: 'temurin'
20-
java-version: 17
20+
java-version: 25
21+
- name: Install Rust toolchain
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
23+
with:
24+
cache-workspaces: sdk-core/src/main/rust
2125
- name: Generate and submit dependency graph
22-
uses: gradle/actions/dependency-submission@v4
26+
uses: gradle/actions/dependency-submission@v6

.github/workflows/docker.yaml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,42 @@ jobs:
1616
sdk-test-docker:
1717
if: github.repository_owner == 'restatedev'
1818
runs-on: warp-ubuntu-latest-x64-4x
19-
name: "Create test-services Docker Image"
20-
19+
name: "Create test-services Docker Image (JRE ${{ matrix.jreVersion }})"
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
jreVersion: [ 17, 21, 25 ]
24+
2125
steps:
22-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2327
with:
2428
repository: restatedev/sdk-java
2529

2630
- name: Setup Java
27-
uses: actions/setup-java@v4
31+
uses: actions/setup-java@v5
2832
with:
2933
distribution: 'temurin'
30-
java-version: '21'
34+
java-version: '25'
3135

3236
- name: Setup Gradle
33-
uses: gradle/actions/setup-gradle@v4
37+
uses: gradle/actions/setup-gradle@v6
38+
39+
- name: Install Rust toolchain
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
41+
with:
42+
cache-workspaces: sdk-core/src/main/rust
3443

3544
- name: Log into GitHub container registry
36-
uses: docker/login-action@v2
45+
uses: docker/login-action@v4
3746
with:
3847
registry: ${{ env.GHCR_REGISTRY }}
3948
username: ${{ env.GHCR_REGISTRY_USERNAME }}
4049
password: ${{ env.GHCR_REGISTRY_TOKEN }}
4150

42-
- name: Build restatedev/test-services-java image
43-
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild
51+
- name: Build restatedev/test-services-java image (JRE ${{ matrix.jreVersion }})
52+
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}
4453

45-
- name: Push restatedev/test-services-java:main image
54+
- name: Push restatedev/test-services-java image
4655
run: |
47-
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main
48-
docker push ghcr.io/restatedev/test-services-java:main
56+
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
57+
docker push ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Integration (internal)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: '0 */6 * * *' # Every 6 hours
10+
workflow_dispatch:
11+
inputs:
12+
restateCommit:
13+
description: 'restate commit'
14+
required: false
15+
default: ''
16+
type: string
17+
restateImage:
18+
description: 'restate image, superseded by restate commit'
19+
required: false
20+
default: 'ghcr.io/restatedev/restate:main'
21+
type: string
22+
23+
jobs:
24+
sdk-test-suite:
25+
if: github.repository_owner == 'restatedev'
26+
runs-on: warp-ubuntu-latest-x64-4x
27+
name: "Features integration test (JRE ${{ matrix.jreVersion }})"
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
jreVersion: [ 17, 21, 25 ]
32+
permissions:
33+
contents: read
34+
issues: read
35+
checks: write
36+
pull-requests: write
37+
actions: read
38+
39+
steps:
40+
- uses: actions/checkout@v6
41+
with:
42+
repository: restatedev/sdk-java
43+
44+
- name: Set up Docker containerd snapshotter
45+
uses: docker/setup-docker-action@v5
46+
with:
47+
version: "v28.5.2"
48+
set-host: true
49+
daemon-config: |
50+
{
51+
"features": {
52+
"containerd-snapshotter": true
53+
}
54+
}
55+
56+
### Download the Restate container image, if needed
57+
# Setup restate snapshot if necessary
58+
# Due to https://github.com/actions/upload-artifact/issues/53
59+
# We must use download-artifact to get artifacts created during *this* workflow run, ie by workflow call
60+
- name: Download restate snapshot from in-progress workflow
61+
if: ${{ inputs.restateCommit != '' && github.event_name != 'workflow_dispatch' }}
62+
uses: actions/download-artifact@v8
63+
with:
64+
name: restate.tar
65+
# In the workflow dispatch case where the artifact was created in a previous run, we can download as normal
66+
- name: Download restate snapshot from completed workflow
67+
if: ${{ inputs.restateCommit != '' && github.event_name == 'workflow_dispatch' }}
68+
uses: dawidd6/action-download-artifact@v21
69+
with:
70+
repo: restatedev/restate
71+
workflow: ci.yml
72+
commit: ${{ inputs.restateCommit }}
73+
name: restate.tar
74+
- name: Install restate snapshot
75+
if: ${{ inputs.restateCommit != '' }}
76+
run: |
77+
output=$(docker load --input restate.tar | head -n 1)
78+
docker tag "${output#*: }" "localhost/restatedev/restate-commit-download:latest"
79+
docker image ls -a
80+
81+
- name: Setup Java
82+
if: ${{ inputs.serviceImage == '' }}
83+
uses: actions/setup-java@v5
84+
with:
85+
distribution: 'temurin'
86+
java-version: '25'
87+
88+
- name: Setup Gradle
89+
if: ${{ inputs.serviceImage == '' }}
90+
uses: gradle/actions/setup-gradle@v6
91+
92+
- name: Install Rust toolchain
93+
if: ${{ inputs.serviceImage == '' }}
94+
uses: actions-rust-lang/setup-rust-toolchain@v1
95+
with:
96+
cache-workspaces: sdk-core/src/main/rust
97+
98+
- name: Build restatedev/test-services-java image
99+
if: ${{ inputs.serviceImage == '' }}
100+
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}
101+
102+
# Pre-emptively pull the test-services image to avoid affecting execution time
103+
- name: Pull test services image
104+
if: ${{ inputs.serviceImage != '' }}
105+
shell: bash
106+
run: docker pull ${{ inputs.serviceImage }}
107+
108+
- name: Run test tool
109+
continue-on-error: ${{ inputs.continueOnError == 'true' }}
110+
uses: restatedev/e2e/sdk-tests@v2.1
111+
with:
112+
envVars: ${{ inputs.envVars }}
113+
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && format('{0}-jre{1}', inputs.testArtifactOutput, matrix.jreVersion) || format('sdk-java-jre{0}-integration-test-report', matrix.jreVersion) }}
114+
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
115+
serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-java' }}

.github/workflows/integration.yaml

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
1-
name: Integration
1+
name: Integration (external)
22

3-
# Controls when the workflow will run
43
on:
5-
pull_request:
6-
push:
7-
branches:
8-
- main
9-
schedule:
10-
- cron: '0 */6 * * *' # Every 6 hours
11-
workflow_dispatch:
12-
inputs:
13-
restateCommit:
14-
description: 'restate commit'
15-
required: false
16-
default: ''
17-
type: string
18-
restateImage:
19-
description: 'restate image, superseded by restate commit'
20-
required: false
21-
default: 'ghcr.io/restatedev/restate:main'
22-
type: string
23-
serviceImage:
24-
description: "service image, if provided it will skip building the image from sdk main branch"
25-
required: false
26-
default: ""
27-
type: string
284
workflow_call:
295
inputs:
306
restateCommit:
@@ -71,12 +47,12 @@ jobs:
7147
actions: read
7248

7349
steps:
74-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@v6
7551
with:
7652
repository: restatedev/sdk-java
7753

7854
- name: Set up Docker containerd snapshotter
79-
uses: docker/setup-docker-action@v4
55+
uses: docker/setup-docker-action@v5
8056
with:
8157
version: "v28.5.2"
8258
set-host: true
@@ -93,13 +69,13 @@ jobs:
9369
# We must use download-artifact to get artifacts created during *this* workflow run, ie by workflow call
9470
- name: Download restate snapshot from in-progress workflow
9571
if: ${{ inputs.restateCommit != '' && github.event_name != 'workflow_dispatch' }}
96-
uses: actions/download-artifact@v4
72+
uses: actions/download-artifact@v8
9773
with:
9874
name: restate.tar
9975
# In the workflow dispatch case where the artifact was created in a previous run, we can download as normal
10076
- name: Download restate snapshot from completed workflow
10177
if: ${{ inputs.restateCommit != '' && github.event_name == 'workflow_dispatch' }}
102-
uses: dawidd6/action-download-artifact@v3
78+
uses: dawidd6/action-download-artifact@v21
10379
with:
10480
repo: restatedev/restate
10581
workflow: ci.yml
@@ -114,18 +90,24 @@ jobs:
11490
11591
- name: Setup Java
11692
if: ${{ inputs.serviceImage == '' }}
117-
uses: actions/setup-java@v4
93+
uses: actions/setup-java@v5
11894
with:
11995
distribution: 'temurin'
120-
java-version: '21'
96+
java-version: '25'
12197

12298
- name: Setup Gradle
12399
if: ${{ inputs.serviceImage == '' }}
124-
uses: gradle/actions/setup-gradle@v4
100+
uses: gradle/actions/setup-gradle@v6
101+
102+
- name: Install Rust toolchain
103+
if: ${{ inputs.serviceImage == '' }}
104+
uses: actions-rust-lang/setup-rust-toolchain@v1
105+
with:
106+
cache-workspaces: sdk-core/src/main/rust
125107

126108
- name: Build restatedev/test-services-java image
127109
if: ${{ inputs.serviceImage == '' }}
128-
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild
110+
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}
129111

130112
# Pre-emptively pull the test-services image to avoid affecting execution time
131113
- name: Pull test services image
@@ -138,6 +120,6 @@ jobs:
138120
uses: restatedev/e2e/sdk-tests@v2.1
139121
with:
140122
envVars: ${{ inputs.envVars }}
141-
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && inputs.testArtifactOutput || 'sdk-java-integration-test-report' }}
123+
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && format('{0}-jre{1}', inputs.testArtifactOutput, matrix.jreVersion) || format('sdk-java-jre{0}-integration-test-report', matrix.jreVersion) }}
142124
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
143125
serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-java' }}

0 commit comments

Comments
 (0)