Skip to content

Commit 243214b

Browse files
authored
Merge branch 'main' into vabachu/add-contributing
2 parents 102063d + b3b4a01 commit 243214b

14 files changed

Lines changed: 196 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## placeholder
1+
## v1.5.1
2+
* Improve logging for unexpected connection failures in DurableTaskGrpcWorker ([#216](https://github.com/microsoft/durabletask-java/pull/216/files))
3+
* Add User-Agent Header to gRPC Metadata ([#213](https://github.com/microsoft/durabletask-java/pull/213))
4+
* Update protobuf definitions to include new properties in OrchestratorRequest and update source commit hash ([#214](https://github.com/microsoft/durabletask-java/pull/214))
25
* DTS Support ([#201](https://github.com/microsoft/durabletask-java/pull/201))
36
* Add automatic proto file download and commit hash tracking during build ([#207](https://github.com/microsoft/durabletask-java/pull/207))
47
* Fix infinite loop when use continueasnew after wait external event ([#183](https://github.com/microsoft/durabletask-java/pull/183))

CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#
77

88
#
9-
# AZURE FUNCTIONS TEAM
109
# For all file changes, github would automatically include the following people in the PRs.
1110
#
12-
* @cgillum @kaibocai @shreyas-gopalakrishna
11+
* @microsoft/durabletask

azurefunctions/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group 'com.microsoft'
9-
version = '1.5.0'
9+
version = '1.5.1'
1010
archivesBaseName = 'durabletask-azure-functions'
1111

1212
def protocVersion = '3.12.0'

azuremanaged/build.gradle

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plugins {
1717

1818
archivesBaseName = 'durabletask-azuremanaged'
1919
group 'com.microsoft'
20-
version = '1.5.0-preview.1'
20+
version = '1.5.1-preview.1'
2121

2222
def grpcVersion = '1.59.0'
2323
def azureCoreVersion = '1.45.0'
@@ -152,3 +152,26 @@ spotbugsTest {
152152
}
153153
}
154154

155+
// Add this after the plugins block
156+
def generatedSourcesDir = file("$buildDir/generated/sources/version/java/main")
157+
158+
sourceSets {
159+
main {
160+
java {
161+
srcDirs += generatedSourcesDir
162+
}
163+
}
164+
}
165+
166+
task generateVersionInfo(type: Copy) {
167+
from 'src/main/resources/VersionInfo.java.template'
168+
into generatedSourcesDir
169+
expand(version: project.version)
170+
rename { 'VersionInfo.java' }
171+
}
172+
173+
compileJava.dependsOn generateVersionInfo
174+
175+
tasks.named('sourcesJar') {
176+
dependsOn generateVersionInfo
177+
}

azuremanaged/src/main/java/com/microsoft/durabletask/azuremanaged/DurableTaskSchedulerClientOptions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ public void start(ClientCall.Listener<RespT> responseListener, Metadata headers)
226226
taskHubName
227227
);
228228

229+
headers.put(
230+
Metadata.Key.of("user-agent", Metadata.ASCII_STRING_MARSHALLER),
231+
DurableTaskUserAgentUtil.getUserAgent()
232+
);
233+
229234
// Add authorization token if credentials are configured
230235
if (finalTokenCache != null) {
231236
String token = finalTokenCache.getToken().getToken();

azuremanaged/src/main/java/com/microsoft/durabletask/azuremanaged/DurableTaskSchedulerWorkerOptions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ public void start(ClientCall.Listener<RespT> responseListener, Metadata headers)
235235
taskHubName
236236
);
237237

238+
headers.put(
239+
Metadata.Key.of("user-agent", Metadata.ASCII_STRING_MARSHALLER),
240+
DurableTaskUserAgentUtil.getUserAgent()
241+
);
242+
238243
// Add authorization token if credentials are configured
239244
if (finalTokenCache != null) {
240245
String token = finalTokenCache.getToken().getToken();
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
package com.microsoft.durabletask.azuremanaged;
5+
6+
/**
7+
* Utility class for generating the user agent string for the Durable Task SDK.
8+
*/
9+
public final class DurableTaskUserAgentUtil {
10+
/**
11+
* The name of the SDK used in the user agent string.
12+
*/
13+
private static final String SDK_NAME = "durabletask-java";
14+
15+
private DurableTaskUserAgentUtil() {
16+
// Private constructor to prevent instantiation
17+
}
18+
19+
/**
20+
* Generates the user agent string for the Durable Task SDK based on a fixed name and the package version.
21+
*
22+
* @return The user agent string.
23+
*/
24+
public static String getUserAgent() {
25+
return String.format("%s/%s", SDK_NAME, VersionInfo.VERSION);
26+
}
27+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
package com.microsoft.durabletask.azuremanaged;
5+
6+
/**
7+
* Auto-generated version information for the Durable Task SDK.
8+
* This file is generated during the build process.
9+
*/
10+
public final class VersionInfo {
11+
/**
12+
* The version of the SDK.
13+
*/
14+
public static final String VERSION = "${version}";
15+
16+
private VersionInfo() {
17+
// Private constructor to prevent instantiation
18+
}
19+
}

client/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group 'com.microsoft'
12-
version = '1.5.0'
12+
version = '1.5.1'
1313
archivesBaseName = 'durabletask-client'
1414

1515
def grpcVersion = '1.59.0'

client/src/main/java/com/microsoft/durabletask/DurableTaskGrpcWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ else if (requestType == RequestCase.HEALTHPING)
191191
} else if (e.getStatus().getCode() == Status.Code.CANCELLED) {
192192
logger.log(Level.INFO, "Durable Task worker has disconnected from {0}.", this.getSidecarAddress());
193193
} else {
194-
logger.log(Level.WARNING, "Unexpected failure connecting to {0}.", this.getSidecarAddress());
194+
logger.log(Level.WARNING, String.format("Unexpected failure connecting to %s", this.getSidecarAddress()), e);
195195
}
196196

197197
// Retry after 5 seconds

0 commit comments

Comments
 (0)