Skip to content

Commit 69f01bb

Browse files
authored
chore(ci): add java build workflow. (#34)
* Add java build workflow. * Add doc string to callbackId() method. * Apply spotless.
1 parent 60a828b commit 69f01bb

4 files changed

Lines changed: 72 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Build and Test
2+
#
3+
# Description:
4+
# Builds the project and runs unit tests for every supported Java version.
5+
#
6+
# Triggers:
7+
# - pull_request: when a PR targets main
8+
# - push: when code is pushed to main
9+
#
10+
# Notes:
11+
# Builds against Java 17, 21, and 25.
12+
13+
name: Build
14+
run-name: Build - ${{ github.event_name }}
15+
16+
on:
17+
workflow_dispatch:
18+
pull_request:
19+
branches:
20+
- main
21+
paths:
22+
- 'sdk/**'
23+
- 'sdk-testing/**'
24+
- 'sdk-integration-tests/**'
25+
- 'examples/**'
26+
- 'pom.xml'
27+
push:
28+
branches:
29+
- main
30+
paths:
31+
- 'sdk/**'
32+
- 'sdk-testing/**'
33+
- 'sdk-integration-tests/**'
34+
- 'examples/**'
35+
- 'pom.xml'
36+
37+
permissions:
38+
contents: read
39+
40+
jobs:
41+
build:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
java:
46+
- 17
47+
- 21
48+
- 25
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v5
52+
53+
- name: Setup Java ${{ matrix.java }}
54+
uses: actions/setup-java@v5
55+
with:
56+
distribution: corretto
57+
java-version: ${{ matrix.java }}
58+
cache: maven
59+
60+
- name: Build and test
61+
run: mvn -B -q install --file pom.xml

sdk/src/main/java/com/amazonaws/lambda/durable/DurableCallbackFuture.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public DurableCallbackFuture(String callbackId, DurableOperation<T> operation) {
1616
this.callbackId = callbackId;
1717
}
1818

19+
/**
20+
* Returns the unique identifier for this callback.
21+
*
22+
* <p>External systems use this ID to send callback results back to the durable execution.
23+
*
24+
* @return the callback ID
25+
*/
1926
public String callbackId() {
2027
return callbackId;
2128
}

sdk/src/main/java/com/amazonaws/lambda/durable/DurableContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ public DurableLogger getLogger() {
227227
* Returns metadata about the current durable execution.
228228
*
229229
* <p>The execution context provides information that remains constant throughout the execution lifecycle, such as
230-
* the durable execution ARN. This is useful for tracking execution progress, correlating logs, and referencing
231-
* this execution in external systems.
230+
* the durable execution ARN. This is useful for tracking execution progress, correlating logs, and referencing this
231+
* execution in external systems.
232232
*
233233
* @return the execution context
234234
*/

sdk/src/main/java/com/amazonaws/lambda/durable/ExecutionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public class ExecutionContext {
2727
* <li>Reference this execution when calling Lambda APIs
2828
* </ul>
2929
*
30-
* <p>Example ARN format: {@code
31-
* arn:aws:lambda:us-east-1:123456789012:function:my-function:$LATEST/durable-execution/349beff4-a89d-4bc8-a56f-af7a8af67a5f/20dae574-53da-37a1-bfd5-b0e2e6ec715d}
30+
* <p>Example ARN format:
31+
* {@code arn:aws:lambda:us-east-1:123456789012:function:my-function:$LATEST/durable-execution/349beff4-a89d-4bc8-a56f-af7a8af67a5f/20dae574-53da-37a1-bfd5-b0e2e6ec715d}
3232
*
3333
* @return the durable execution ARN
3434
*/

0 commit comments

Comments
 (0)