-
Notifications
You must be signed in to change notification settings - Fork 14
DTS Support #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
DTS Support #201
Changes from 15 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
51d210f
Add gradle task to update submodule and update proto to latest version
YunchuWang 8660f1b
bump build pipeline github action version to non deprecated version
YunchuWang 8a54ce4
initial dts support changes
YunchuWang f951428
placeholder
YunchuWang 12e9e50
ignore
YunchuWang 3b09d59
update
YunchuWang 32eca1e
remove
YunchuWang ea2e181
update
YunchuWang e025538
update
YunchuWang 6ea3a65
update
YunchuWang 2270ed2
signing is disabled, should not exclude as there is no sign
YunchuWang 9a02b23
save
YunchuWang 8fb193f
feedback changes
YunchuWang a51ba86
delete legacy lib/java
YunchuWang 7241e34
create skeleton project for pkg "com.microsoft.durabletask-azuremanaged"
YunchuWang 8688320
split pkg in progress
YunchuWang 628c093
move out
YunchuWang a7e8d19
progress
YunchuWang ab89785
p
YunchuWang 6fc0748
progress
YunchuWang e3406d7
progress
YunchuWang 110306e
fix
YunchuWang b7a88af
p
YunchuWang 1b7fe1c
save
YunchuWang b74d699
save
YunchuWang f6611af
save
YunchuWang 03df094
save
YunchuWang 3cd3598
clientoptions done
YunchuWang 357ecdd
client ext
YunchuWang df4a0e4
client refactored
YunchuWang 0f79297
worker done
YunchuWang c7eb4f1
sample update
YunchuWang aa94d9c
fix
YunchuWang 02f92ea
save
YunchuWang 2b9d8eb
fix
YunchuWang 3eca075
cleanup
YunchuWang 6e9a6e8
cleanup
YunchuWang 2f2a359
Merge branch 'main' into wangbill/update-proto
YunchuWang 41ef360
Merge branch 'main' into wangbill/update-proto
YunchuWang d9e20ec
unit tests
YunchuWang f59af6b
Update Gradle build command to include stacktrace option for better d…
YunchuWang f7c5376
cleanup
YunchuWang 538033c
Enhance build validation workflow to handle build failures by uploadi…
YunchuWang bb1fbb1
Update PATH_TO_TEST_JAVA_RUNTIME in build.gradle files to use environ…
YunchuWang 637863c
Revert "Update PATH_TO_TEST_JAVA_RUNTIME in build.gradle files to use…
YunchuWang 8d530cb
separate build and unit tests
YunchuWang 5f3ebfb
use jdk11 for unit tests
YunchuWang 02ec66d
update sample
YunchuWang f23edcc
clean up
YunchuWang 299ab73
rename azuremanaged module names to avoid colliding module names name…
YunchuWang 8cf6cdb
update azure managed to one package
YunchuWang 1bebf5a
conn str support
YunchuWang 98cf7eb
changelog
YunchuWang 8705055
Add support for Visual Studio Code and Interactive Browser authentica…
YunchuWang ad72eca
Add support for IntelliJ authentication type in DurableTaskSchedulerC…
YunchuWang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ pool: | |
|
|
||
| steps: | ||
| - checkout: self | ||
| submodules: true | ||
|
|
||
| - task: Gradle@3 | ||
| inputs: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| plugins { | ||
| id 'java-library' | ||
| id 'maven-publish' | ||
| id 'signing' | ||
| } | ||
|
|
||
| group 'com.microsoft' | ||
| version = '1.5.0' | ||
| archivesBaseName = 'durabletask-azuremanaged' | ||
|
|
||
| def jacksonVersion = '2.15.3' | ||
|
|
||
| dependencies { | ||
| // TODO: update the package then dependency here | ||
| // api project(':client') | ||
| implementation 'com.azure:azure-identity:1.15.0' | ||
|
|
||
| // Jackson dependencies if needed by the Azure package | ||
| implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" | ||
| implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" | ||
| implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}" | ||
| implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}" | ||
|
YunchuWang marked this conversation as resolved.
Outdated
|
||
|
|
||
| testImplementation(platform('org.junit:junit-bom:5.7.2')) | ||
| testImplementation('org.junit.jupiter:junit-jupiter') | ||
| } | ||
|
|
||
| java { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| withSourcesJar() | ||
| withJavadocJar() | ||
| } | ||
|
|
||
| test { | ||
| useJUnitPlatform() | ||
| } | ||
|
|
||
| publishing { | ||
| repositories { | ||
| maven { | ||
| url "file://$project.rootDir/repo" | ||
| } | ||
| } | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| from components.java | ||
| artifactId = archivesBaseName | ||
| pom { | ||
| name = 'Durable Task Azure Managed SDK for Java' | ||
| description = 'This package contains Azure-specific extensions for the Durable Task Framework in Java.' | ||
| url = "https://github.com/microsoft/durabletask-java/tree/main/azuremanaged" | ||
| licenses { | ||
| license { | ||
| name = "MIT License" | ||
| url = "https://opensource.org/licenses/MIT" | ||
| distribution = "repo" | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = "Microsoft" | ||
| name = "Microsoft Corporation" | ||
| } | ||
| } | ||
| scm { | ||
| connection = "scm:git:https://github.com/microsoft/durabletask-java" | ||
| developerConnection = "scm:git:git@github.com:microsoft/durabletask-java" | ||
| url = "https://github.com/microsoft/durabletask-java/tree/main/azuremanaged" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| java { | ||
| withSourcesJar() | ||
| withJavadocJar() | ||
| } | ||
35 changes: 35 additions & 0 deletions
35
azuremanaged/src/main/java/com/microsoft/durabletask/azuremanaged/AccessTokenCache.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.microsoft.durabletask.azuremanaged; | ||
|
|
||
| import com.azure.core.credential.TokenCredential; | ||
| import com.azure.core.credential.AccessToken; | ||
| import com.azure.core.credential.TokenRequestContext; | ||
|
|
||
| import java.time.Duration; | ||
| import java.time.OffsetDateTime; | ||
|
|
||
| public final class AccessTokenCache { | ||
| private final TokenCredential credential; | ||
| private final TokenRequestContext context; | ||
| private final Duration margin; | ||
| private AccessToken cachedToken; | ||
|
|
||
| public AccessTokenCache(TokenCredential credential, TokenRequestContext context, Duration margin) { | ||
| this.credential = credential; | ||
| this.context = context; | ||
| this.margin = margin; | ||
| } | ||
|
|
||
| public AccessToken getToken() { | ||
| OffsetDateTime nowWithMargin = OffsetDateTime.now().plus(margin); | ||
|
|
||
| if (cachedToken == null | ||
| || cachedToken.getExpiresAt().isBefore(nowWithMargin)) { | ||
| this.cachedToken = credential.getToken(context).block(); | ||
| } | ||
|
|
||
| return cachedToken; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,6 @@ jobs: | |
|
|
||
| steps: | ||
| - checkout: self | ||
| submodules: true | ||
|
|
||
| - task: Gradle@3 | ||
| inputs: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 310000510e1c1544a4e99172007bd058ade66c55 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Durable Task Protobuf Files | ||
|
|
||
| This directory contains the protocol buffer definitions used by the Durable Task Framework Java SDK. The files in this directory are automatically downloaded and updated during the build process from the [microsoft/durabletask-protobuf](https://github.com/microsoft/durabletask-protobuf) repository. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| - `protos/` - Contains the downloaded proto files | ||
| - `PROTO_SOURCE_COMMIT_HASH` - Contains the commit hash of the latest proto file version | ||
|
|
||
| ## Auto-Update Process | ||
|
|
||
| The proto files are automatically downloaded and updated when running Gradle builds. This is handled by the `downloadProtoFiles` task in the `client/build.gradle` file. The task: | ||
|
|
||
| 1. Downloads the latest version of `orchestrator_service.proto` | ||
| 2. Saves the current commit hash for tracking purposes | ||
| 3. Updates these files before proto compilation begins | ||
|
|
||
| ## Manual Update | ||
|
|
||
| If you need to manually update the proto files, you can run: | ||
|
|
||
| ```bash | ||
| ./gradlew downloadProtoFiles -PprotoBranch=<branch-name> | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.