Skip to content

Conversation

@YunchuWang
Copy link
Member

@YunchuWang YunchuWang commented Jan 23, 2025

Two new azuremanaged packages for connecting to durable task schedulers.
This pull request introduces several significant changes to the azuremanaged project, including new build configurations, client extensions, and options for the Durable Task Scheduler. The most important changes are summarized below:

Build Configuration Updates:

  • Added a new allprojects configuration to set the group and version for all projects in azuremanaged/build.gradle.
  • Introduced a new build file for the client module with necessary plugins, dependencies, and publishing configurations in azuremanaged/client/build.gradle.
  • Added a new build file for the shared module with required plugins and dependencies in azuremanaged/shared/build.gradle.
  • Updated the settings to include new modules (client, worker, shared) in azuremanaged/settings.gradle.

Client Extensions:

  • Created DurableTaskSchedulerClientExtensions class to provide extension methods for creating and configuring DurableTaskClient instances.

Client Options:

  • Added DurableTaskSchedulerClientOptions class to handle configuration options for the Durable Task Scheduler, including methods for creating gRPC channels and handling authentication.

Token Management:

  • Implemented AccessTokenCache class to cache access tokens for Azure authentication, ensuring tokens are refreshed before expiration.

Workflow Adjustment:

  • Modified the build validation workflow to remove the -x sign flag from the publishToMavenLocal task in .github/workflows/build-validation.yml.

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@cgillum
Copy link
Member

cgillum commented Jan 23, 2025

In DTS and Python repos, we changed the build process to instead copy the proto definitions locally rather than rely on a submodule. It's nice because working with submodules can be complicated and hard to track with source control. Should we do the same thing here?

@YunchuWang YunchuWang marked this pull request as draft January 23, 2025 18:44
@YunchuWang YunchuWang changed the title Add gradle task to update submodule and update proto to latest version Update protos to latest version, remove submodule, include completionToken required in latest complete grpc calls def Jan 23, 2025
@YunchuWang
Copy link
Member Author

YunchuWang commented Jan 23, 2025

Running sample working:
client curl
{953C49AC-AAF2-4D66-84E9-499507FB45FD}

sample logs:
2025-01-23 10:38:38.879 INFO 7760 --- [global-thread-0] c.azure.identity.ChainedTokenCredential : Azure Identity => Attempted credential AzureCliCredential returns a token
2025-01-23 10:38:39.621 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : a99035b4-2a2a-4324-b0e4-28db2866abd2: calling activity 'ValidateOrder' (#0) with serialized input: "'{orderId:123,"
2025-01-23 10:38:39.621 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : The orchestrator has yielded and will await for new events.
2025-01-23 10:38:39.705 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : a99035b4-2a2a-4324-b0e4-28db2866abd2: Activity 'ValidateOrder' (#0) completed with serialized output: false
2025-01-23 10:39:09.701 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:39:39.709 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:40:09.707 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:40:39.708 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:41:09.720 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:41:39.717 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:41:44.814 INFO 7760 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-01-23 10:41:44.814 INFO 7760 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2025-01-23 10:41:44.814 INFO 7760 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
2025-01-23 10:41:45.275 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 740edaa7-2483-4933-bd6f-c064e431d9d6: calling activity 'ValidateOrder' (#0) with serialized input: "'{orderId:123,"
2025-01-23 10:41:45.275 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : The orchestrator has yielded and will await for new events.
2025-01-23 10:41:45.362 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 740edaa7-2483-4933-bd6f-c064e431d9d6: Activity 'ValidateOrder' (#0) completed with serialized output: false
2025-01-23 10:42:15.365 WARN 7760 --- [ Thread-1] com.microsoft.durabletask : Received and dropped an unknown {0} work-item from the sidecar.
2025-01-23 10:42:16.000 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: calling activity 'ValidateOrder' (#0) with serialized input: "{"orderId":"123", "amount":100}"
2025-01-23 10:42:16.000 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : The orchestrator has yielded and will await for new events.
2025-01-23 10:42:16.059 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: Activity 'ValidateOrder' (#0) completed with serialized output: true
2025-01-23 10:42:16.059 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: calling activity 'ProcessPayment' (#1) with serialized input: "{"orderId":"123", "amount":100}"
2025-01-23 10:42:16.059 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : The orchestrator has yielded and will await for new events.
2025-01-23 10:42:17.128 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: Activity 'ProcessPayment' (#1) completed with serialized output: "{"success":true, "transactionId":"TXN1737657737098"}"
2025-01-23 10:42:17.129 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: calling activity 'ShipOrder' (#2) with serialized input: "{"orderId":"123", "amount":100}"
2025-01-23 10:42:17.129 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : The orchestrator has yielded and will await for new events.
2025-01-23 10:42:18.187 DEBUG 7760 --- [ Thread-1] com.microsoft.durabletask : 06be66ce-ede9-46ea-b6a0-d305cc304bcd: Activity 'ShipOrder' (#2) completed with serialized output: "{"trackingNumber":"TRACK1737657738154"}"

dashboard showing result:
{766BF5C8-69F2-47B3-8370-7255671D2624}

@YunchuWang YunchuWang marked this pull request as ready for review January 23, 2025 20:24
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can refactor this a bit, so that the only new package we ship is an azureManaged package.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you for making these changes. I just have a question about the intended scope of this PR.

@YunchuWang
Copy link
Member Author

pr connecting to production scheduler working
{E59FDCE1-99F2-4350-B188-318C6D7076F9}

…d "client", gradle expects unique module names and build one module only if colliding names
kaibocai
kaibocai previously approved these changes Mar 21, 2025
@YunchuWang YunchuWang changed the title DTS Support + CompletionToken fix for proto update DTS Support Mar 21, 2025
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments.

Can you also update the CHANGELOG.md file?

@YunchuWang YunchuWang requested a review from cgillum March 23, 2025 19:40
kaibocai
kaibocai previously approved these changes Mar 24, 2025
@kaibocai
Copy link
Member

Probably Waiting for @cgillum approvement as well.

…tion types in DurableTaskSchedulerConnectionString. Update tests to verify new credential types.
…onnectionString. Update tests to verify the new credential type.
@YunchuWang YunchuWang requested a review from cgillum March 24, 2025 20:27
@cgillum cgillum merged commit 661cae5 into main Mar 24, 2025
4 checks passed
@cgillum cgillum deleted the wangbill/update-proto branch March 24, 2025 20:35
JoshVanL pushed a commit to JoshVanL/durabletask-java that referenced this pull request May 7, 2025
JoshVanL pushed a commit to JoshVanL/durabletask-java that referenced this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants