Skip to content

Commit 60a828b

Browse files
authored
chore(ci): add check-spotless.yml GitHub workflow. (#33)
1 parent 09e65a5 commit 60a828b

3 files changed

Lines changed: 52 additions & 2 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Check for code formatting and license header errors using Spotless
2+
#
3+
# Description:
4+
# Runs Spotless check for pull requests to ensure code formatting consistency,
5+
# proper import ordering, and license headers.
6+
# Fails the build if any violations are found.
7+
#
8+
# Triggers:
9+
# - pull_request
10+
name: Spotless
11+
12+
on:
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- 'sdk/**'
18+
- 'sdk-testing/**'
19+
- 'sdk-integration-tests/**'
20+
- 'examples/**'
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
spotless-check:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v5
31+
32+
- name: Set up JDK 17
33+
uses: actions/setup-java@v5
34+
with:
35+
java-version: '17'
36+
distribution: 'corretto'
37+
cache: maven
38+
39+
- name: Run Spotless check
40+
run: mvn -B -q spotless:check --file pom.xml

.github/workflows/sync-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
- name: Git clone the repository
3636
uses: actions/checkout@v5
3737
- name: Set up JDK 17
38-
uses: actions/setup-java@v4
38+
uses: actions/setup-java@v5
3939
with:
4040
java-version: '17'
41-
distribution: 'temurin'
41+
distribution: 'corretto'
4242
cache: maven
4343
- name: Get version
4444
id: get_version

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@ private CallbackConfig(Builder builder) {
1717
this.serDes = builder.serDes;
1818
}
1919

20+
/**
21+
* Returns the maximum duration to wait for the callback to complete.
22+
*
23+
* @return the timeout duration, or null if not specified
24+
*/
2025
public Duration timeout() {
2126
return timeout;
2227
}
2328

29+
/**
30+
* Returns the maximum duration between heartbeats before the callback is considered failed.
31+
*
32+
* @return the heartbeat timeout duration, or null if not specified
33+
*/
2434
public Duration heartbeatTimeout() {
2535
return heartbeatTimeout;
2636
}

0 commit comments

Comments
 (0)