Skip to content

Commit ee86c34

Browse files
authored
Provide SerializationContext for PayloadConverter and PayloadCodec (#1695)
Issue #1694
1 parent 7521f85 commit ee86c34

File tree

64 files changed

+1734
-530
lines changed

Some content is hidden

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

64 files changed

+1734
-530
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
id 'org.cadixdev.licenser' version '0.6.1'
1111
id 'com.palantir.git-version' version "${palantirGitVersionVersion}" apply false
1212
id 'io.github.gradle-nexus.publish-plugin' version '1.2.0'
13-
id 'com.diffplug.spotless' version '6.15.0' apply false
13+
id 'com.diffplug.spotless' version '6.17.0' apply false
1414
id 'com.github.nbaztec.coveralls-jacoco' version "1.2.15" apply false
1515

1616
// id 'org.jetbrains.kotlin.jvm' version '1.4.32'

docs/AOT-native-image.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ Temporal JavaSDK dependencies like gRPC and Protobuf use reflection and some of
66

77
## [native-image](https://www.graalvm.org/reference-manual/native-image/)
88

9-
Temporal JavaSDK and Test Server support and can be used with GraalVM `native-image`.
9+
Temporal JavaSDK and Test Server support GraalVM `native-image`.
1010

1111
Temporal JavaSDK team does its best effort to maintain as complete `native-image` descriptors as technically possible for the following modules:
1212
`temporal-sdk`, `temporal-testing`, `temporal-serviceclient`, `temporal-test-server`.
13-
These modules are distributed with the embedded `native-image` descriptors.
1413
While these descriptors provide enough information for `native-image` to build and run a fully functional Temporal Test Server,
1514
any user building an application with Temporal JavaSDK will require an additional configuration for the reasons mentioned above: user interfaces are used by the JavaSDK for proxy creation, and they need to know in advance for `native-image`.
1615

1716
`native-image` build can be configured with respect to JNI, java proxying, reflection, etc
1817
by providing [JSON configuration descriptors](https://www.graalvm.org/22.3/reference-manual/native-image/metadata/#specifying-metadata-with-json)
19-
which help `native-image` during building of the native execution file.
18+
which helps `native-image` during building of the native execution file.
2019
This can be done manually, but it's labor-intensive and requires good understanding of `native-image` build [process](https://www.graalvm.org/22.3/reference-manual/native-image/basics/) and [configuration](https://www.graalvm.org/22.3/reference-manual/native-image/overview/Build-Overview/).
2120

22-
Instead we recommend users to run their JVM application along with
21+
Instead, we recommend users run their JVM application along with
2322
[the native-image Tracing agent](https://www.graalvm.org/22.3/reference-manual/native-image/metadata/AutomaticMetadataCollection/).
2423
For example, the agent can be run with the full set of integration tests of the app to cover the largest variety of code paths.
2524
This agent will automatically generate additional descriptor files that users should [place and retain with their project's source code](https://www.graalvm.org/22.3/reference-manual/native-image/overview/BuildConfiguration/#embed-a-configuration-file) under `META-INF/native-image`.

gradle/wrapper/gradle-wrapper.jar

818 Bytes
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac

gradlew.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

temporal-kotlin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
id 'org.jlleitschuh.gradle.ktlint' version '11.2.0'
4+
id 'org.jlleitschuh.gradle.ktlint' version '11.3.1'
55
}
66

77
apply plugin: 'org.jetbrains.kotlin.jvm'

temporal-remote-data-encoder/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies {
2121

2222
// Jetty 10+ brings a non-production ready slf4j that doesn't work with released logback.
2323
// It also require Java 11+. That's why we stay on Jetty 9. It's for tests only anyway.
24-
testImplementation(platform("org.eclipse.jetty:jetty-bom:9.4.50.v20221201"))
24+
testImplementation(platform("org.eclipse.jetty:jetty-bom:9.4.51.v20230217"))
2525
testImplementation ("org.eclipse.jetty:jetty-server")
2626
testImplementation ("org.eclipse.jetty:jetty-servlet")
2727
}

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,33 @@ public interface ActivityInfo {
9797
String getWorkflowType();
9898

9999
/**
100-
* @return the Namespace of Workflow Execution that executed the Activity.
100+
* Note: At some moment Temporal had built-in support for scheduling activities on a different
101+
* namespace than the original workflow. Currently, Workflows can schedule activities only on the
102+
* same namespace, hence no need for different {@code getWorkflowNamespace()} and {@link
103+
* #getActivityNamespace()} methods.
104+
*
105+
* @return the Namespace of Workflow Execution that scheduled the Activity.
106+
* @deprecated use {@link #getNamespace()}
101107
*/
108+
@Deprecated
102109
String getWorkflowNamespace();
103110

104111
/**
105-
* @return the Namespace of the Activity Execution.
112+
* Note: At some moment Temporal had built-in support for scheduling activities on a different
113+
* namespace than the original workflow. Currently, Workflows can schedule activities only on the
114+
* same namespace, hence no need for different {@link #getWorkflowNamespace()} and {@code
115+
* getActivityNamespace()} methods.
116+
*
117+
* @return the Namespace of this Activity Execution.
118+
* @deprecated use {@link #getNamespace()}
106119
*/
120+
@Deprecated
107121
String getActivityNamespace();
108122

123+
String getNamespace();
124+
125+
String getActivityTaskQueue();
126+
109127
/**
110128
* Gets the current Activity Execution attempt count. Attempt counts start at 1 and increment on
111129
* each Activity Task Execution retry.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Builder setHeartbeatTimeout(Duration heartbeatTimeoutSeconds) {
136136

137137
/**
138138
* Task queue to use when dispatching activity task to a worker. By default, it is the same task
139-
* list name the workflow was started with.
139+
* list name the workflow was started with. Default is used if set to {@code null}.
140140
*/
141141
public Builder setTaskQueue(String taskQueue) {
142142
this.taskQueue = taskQueue;

0 commit comments

Comments
 (0)