Skip to content

Commit 29dfb27

Browse files
Merge branch 'master' into d/20260406-164203
2 parents 45149ee + 187b778 commit 29dfb27

40 files changed

Lines changed: 178 additions & 117 deletions

.github/workflows/build-native-image.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,36 +69,39 @@ jobs:
6969
ref: ${{ env.INPUT_REF }}
7070

7171
- name: Set up Java
72-
if: matrix.os_family != 'Linux'
72+
if: matrix.os_family != 'linux'
7373
uses: actions/setup-java@v5
7474
with:
7575
java-version: 23
7676
distribution: "graalvm"
7777

7878
- name: Set up Gradle
79-
if: matrix.os_family != 'Linux'
79+
if: matrix.os_family != 'linux'
8080
uses: gradle/actions/setup-gradle@v5
8181

8282
- name: Build native test server (non-Docker)
83-
if: matrix.os_family != 'Linux'
83+
if: matrix.os_family != 'linux'
8484
run: |
8585
./gradlew -PnativeBuild :temporal-test-server:nativeCompile
8686
8787
- name: Build native test server (Docker non-musl)
88-
if: matrix.os_family == 'Linux' && matrix.musl == false
88+
if: matrix.os_family == 'linux' && matrix.musl == false
8989
run: |
90+
IMAGE_ID=$(docker build -q ./docker/native-image)
9091
docker run \
9192
--rm -w /github/workspace -v "$(pwd):/github/workspace" \
92-
$(docker build -q ./docker/native-image) \
93+
"$IMAGE_ID" \
9394
sh -c "./gradlew -PnativeBuild :temporal-test-server:nativeCompile"
9495
9596
- name: Build native test server (Docker musl)
96-
if: matrix.os_family == 'Linux' && matrix.musl == true
97+
if: matrix.os_family == 'linux' && matrix.musl == true
9798
run: |
99+
IMAGE_ID=$(docker build -q ./docker/native-image-musl)
98100
docker run \
99101
--rm -w /github/workspace -v "$(pwd):/github/workspace" \
100-
$(docker build -q ./docker/native-image-musl) \
102+
"$IMAGE_ID" \
101103
sh -c "./gradlew -PnativeBuild -PnativeBuildMusl :temporal-test-server:nativeCompile"
104+
102105
# path ends in a wildcard because on windows the file ends in '.exe'
103106
- name: Upload executable to workflow
104107
if: ${{ inputs.upload_artifact }}

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
- name: Set up Java
192192
uses: actions/setup-java@v5
193193
with:
194-
java-version: "11"
194+
java-version: "23"
195195
distribution: "temurin"
196196

197197
- name: Set up Gradle
@@ -200,6 +200,30 @@ jobs:
200200
- name: Run copyright and code format checks
201201
run: ./gradlew --no-daemon spotlessCheck
202202

203+
javadoc:
204+
name: Javadoc
205+
runs-on: ubuntu-latest
206+
timeout-minutes: 20
207+
steps:
208+
- name: Checkout repo
209+
uses: actions/checkout@v5
210+
with:
211+
fetch-depth: 0
212+
submodules: recursive
213+
ref: ${{ github.event.pull_request.head.sha }}
214+
215+
- name: Set up Java
216+
uses: actions/setup-java@v5
217+
with:
218+
java-version: "23"
219+
distribution: "temurin"
220+
221+
- name: Set up Gradle
222+
uses: gradle/actions/setup-gradle@v5
223+
224+
- name: Run javadoc
225+
run: ./gradlew --no-daemon javadoc
226+
203227
build_native_images:
204228
name: Build native test server
205229
uses: ./.github/workflows/build-native-image.yml

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ src/main/idls/*
1818
.settings
1919
.vscode/
2020
*/bin
21-
/.claude
21+
/.claude
22+
mise.local.toml
23+
**/.factorypath

docker/native-image/dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV JAVA_HOME=/usr/lib64/graalvm/graalvm-community-java23
66
COPY --from=ghcr.io/graalvm/native-image-community:23 $JAVA_HOME $JAVA_HOME
77
ENV PATH="${JAVA_HOME}/bin:${PATH}"
88
RUN apt-get -y update --allow-releaseinfo-change && apt-get install -V -y software-properties-common
9-
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
9+
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
1010
RUN apt-get update
1111
# We need to update gcc and g++ to 10 for Graal to work on ARM64
1212
RUN apt-get install -y git build-essential zlib1g-dev gcc-10 g++-10

gradle/java.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ subprojects {
3232

3333
javadoc {
3434
options.encoding = 'UTF-8'
35-
if (JavaVersion.current().isJava8Compatible()) {
36-
options.addStringOption('Xdoclint:none', '-quiet')
37-
}
35+
options.addStringOption('Xdoclint:reference', '-quiet')
36+
options.addBooleanOption('Werror', true)
3837
if (JavaVersion.current().isJava9Compatible()) {
3938
options.addBooleanOption('html5', true)
4039
}

temporal-envconfig/src/main/java/io/temporal/envconfig/ClientConfig.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ public static ClientConfig getDefaultInstance() {
4444
private static String getDefaultConfigFilePath() {
4545
String userDir = System.getProperty("user.home");
4646
if (userDir == null || userDir.isEmpty()) {
47-
throw new RuntimeException("failed getting user home directory");
47+
return null;
4848
}
4949
return getDefaultConfigFilePath(userDir, System.getProperty("os.name"), System.getenv());
5050
}
5151

5252
static String getDefaultConfigFilePath(
5353
String userDir, String osName, Map<String, String> environment) {
54+
if (userDir == null || userDir.isEmpty()) {
55+
return null;
56+
}
5457
if (osName != null) {
5558
String osNameLower = osName.toLowerCase();
5659
if (osNameLower.contains("mac")) {
@@ -60,7 +63,7 @@ static String getDefaultConfigFilePath(
6063
if (osNameLower.contains("win")) {
6164
String appData = environment != null ? environment.get("APPDATA") : null;
6265
if (appData == null || appData.isEmpty()) {
63-
throw new RuntimeException("%APPDATA% is not defined");
66+
return null;
6467
}
6568
return Paths.get(appData, "temporalio", "temporal.toml").toString();
6669
}
@@ -122,6 +125,10 @@ public static ClientConfig load(LoadClientConfigOptions options) throws IOExcept
122125
if (file == null || file.isEmpty()) {
123126
file = getDefaultConfigFilePath();
124127
}
128+
// No config dir available — return default empty config
129+
if (file == null) {
130+
return getDefaultInstance();
131+
}
125132
try {
126133
ClientConfigToml.TomlClientConfig result = reader.readValue(new File(file));
127134
return new ClientConfig(ClientConfigToml.getClientProfiles(result));
@@ -172,7 +179,7 @@ public static ClientConfig fromToml(byte[] tomlData, ClientConfigFromTomlOptions
172179
*
173180
* @param config the client config to convert
174181
* @return the TOML data as bytes
175-
* @apiNote The output will not be identical to the input if the config was loaded from a file
182+
* <p>Note: The output will not be identical to the input if the config was loaded from a file
176183
* because comments and formatting are not preserved.
177184
*/
178185
public static byte[] toTomlAsBytes(ClientConfig config) throws IOException {

temporal-envconfig/src/test/java/io/temporal/envconfig/ClientConfigProfileTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,22 @@ public void defaultConfigFilePath() {
325325
ClientConfig.getDefaultConfigFilePath("/home/test", "Linux", Collections.emptyMap()));
326326
}
327327

328+
@Test
329+
public void loadDefaultConfigMissingHomeDir() throws IOException {
330+
String original = System.getProperty("user.home");
331+
try {
332+
System.setProperty("user.home", "");
333+
ClientConfig config =
334+
ClientConfig.load(
335+
LoadClientConfigOptions.newBuilder().setEnvOverrides(Collections.emptyMap()).build());
336+
Assert.assertEquals(ClientConfig.getDefaultInstance(), config);
337+
} finally {
338+
if (original != null) {
339+
System.setProperty("user.home", original);
340+
}
341+
}
342+
}
343+
328344
@Test
329345
public void parseToml() throws IOException {
330346
String toml =

temporal-remote-data-encoder/src/main/java/io/temporal/payload/codec/AbstractRemoteDataEncoderCodec.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
/**
1212
* Performs encoding/decoding of the payloads via the Remote Data Encoder (RDE) available over http.
1313
*
14-
* <p>
15-
*
1614
* <h2>Remote Data Encoder Http Server specification</h2>
1715
*
1816
* <p>RDE Server must:

temporal-sdk/src/main/java/io/temporal/activity/ActivityInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public interface ActivityInfo {
126126
/**
127127
* Return the priority of the activity task.
128128
*
129-
* @apiNote If unset or on an older server version, this method will return {@link
130-
* Priority#getDefaultInstance()}.
129+
* <p>Note: If unset or on an older server version, this method will return {@link
130+
* Priority#getDefaultInstance()}.
131131
*/
132132
@Experimental
133133
@Nonnull

temporal-sdk/src/main/java/io/temporal/activity/ActivityInterface.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
* When <code>CImpl</code> instance is registered with the {@link io.temporal.worker.Worker} the
4343
* following activities are registered:
4444
*
45-
* <p>
46-
*
4745
* <ul>
4846
* <li>B_a
4947
* <li>B_b

0 commit comments

Comments
 (0)