Skip to content

Conversation

@stephanos
Copy link
Collaborator

@stephanos stephanos commented Jul 29, 2025

ℹ️ This PR includes the #189 PR; you can just look at the "Client ActivityType" commit for review.

What was changed

Adds new "Client" ActivityType to execute client actions (e.g. Update, Signal) from a workflow activity.

Why?

  • Keeps all action execution in one place (ie the workflow).
  • Makes client actions part of the event history (free resume-ability, easier debugging).
  • Execution is (more) deterministic.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@stephanos stephanos force-pushed the kitchensink-client-activity branch 4 times, most recently from dc13182 to 3bb375e Compare July 31, 2025 18:55
@stephanos stephanos force-pushed the kitchensink-client-activity branch 12 times, most recently from 4e43179 to 3a55098 Compare August 7, 2025 01:18
@stephanos stephanos changed the base branch from main to kitchensink-validation August 7, 2025 01:22
@stephanos stephanos changed the base branch from kitchensink-validation to main August 7, 2025 01:23
@stephanos stephanos force-pushed the kitchensink-client-activity branch 12 times, most recently from 5e0a5ce to 6f1bd89 Compare August 7, 2025 14:56
}
})

// Handle initial set.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needs to be after signal handler is registered.

@stephanos stephanos mentioned this pull request Aug 18, 2025
@stephanos stephanos force-pushed the kitchensink-client-activity branch 12 times, most recently from 3c2b7c4 to 92d73d3 Compare August 19, 2025 17:08
@stephanos stephanos requested a review from a team as a code owner August 19, 2025 17:08
@stephanos stephanos force-pushed the kitchensink-client-activity branch from 92d73d3 to 2cd1d99 Compare August 19, 2025 17:09
@stephanos stephanos changed the base branch from main to test-refactor August 19, 2025 18:02
@stephanos stephanos changed the base branch from test-refactor to main August 19, 2025 18:02
@stephanos stephanos force-pushed the kitchensink-client-activity branch 3 times, most recently from 343d863 to 84014ba Compare August 26, 2025 16:53
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Looking good to me. The C# bit might need some verification.

let client_sequence = ClientSequence {
action_sets: vec![ClientActionSet {
actions: vec![u.arbitrary()?],
concurrent: false,
Copy link
Member

Choose a reason for hiding this comment

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

Should this be allowed to be true? Seemingly the support is already there?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The support for Go is there but the support for the other SDKs isn't there yet. #188 will only add support for non-current client activity there.

Comment on lines 150 to 151
await LaunchActivity(execActivity, tokenSrc);
await HandleAwaitableChoiceAsync(Task.FromResult<object?>(null), tokenSrc, execActivity.AwaitableChoice);
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm... not sure that's right. Probably we need to just fix HandleAwaitableChoice to not eat the exception in this case (though not sure why it is in the first place).

Otherwise I would expect something like var actAwait = LaunchActivity(execActivity, tokenSrc); and then passing that to HandleAwaitableChoiceAsync

stephanos added a commit that referenced this pull request Aug 27, 2025
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR! 
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->

<!--- For ALL Contributors 👇 -->

## What was changed
<!-- Describe what has changed in this PR -->

Prelude for #179:
- adds partial history matching (when full matching won't work)
- scopes build logs to test run
- runs kitchen sink tests in parallel
- fixes data race
- adds new end-to-end ThroughputStress test

## Why?
<!-- Tell your future self why have you made these changes -->

Improve test experience.

## Checklist
<!--- add/delete as needed --->

1. Closes <!-- add issue number here -->

2. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->

3. Any docs updates needed?
<!--- update README if applicable
      or point out where to update docs.temporal.io -->
@stephanos stephanos force-pushed the kitchensink-client-activity branch from 84014ba to e1ff4a5 Compare August 27, 2025 20:15
@stephanos stephanos merged commit ce7aad7 into main Aug 27, 2025
33 checks passed
@stephanos stephanos deleted the kitchensink-client-activity branch August 27, 2025 20:31
stephanos added a commit that referenced this pull request Sep 4, 2025
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR! 
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->

<!--- For ALL Contributors 👇 -->

## What was changed
<!-- Describe what has changed in this PR -->

Follow-up to #179 to include
other SDKs.

Adds new "Client" ActivityType to execute client actions (e.g. Update,
Signal) from a workflow activity to TS, .NET and Python.

The client action executor implementations were all modeled after the Go
one.

---

ℹ️ Concurrent execution of the client actions is out of scope for this
PR.

🫘 I couldn't get Java to work; it's out of scope for this PR now. Sorry.

⚠️ The ClientActionExecutors were mostly AI generated - with lots of
manual pruning and fixing - but I can't quite vouch for them being 100%
idiomatic.

## Why?
<!-- Tell your future self why have you made these changes -->

Narrow kitchensink support gap to Go.

## Checklist
<!--- add/delete as needed --->

1. Closes <!-- add issue number here -->

2. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->

3. Any docs updates needed?
<!--- update README if applicable
      or point out where to update docs.temporal.io -->
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