Skip to content

Conversation

ychebotarev
Copy link
Contributor

@ychebotarev ychebotarev commented May 7, 2025

READ BEFORE MERGING: All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted.

What changed?
Add activity options to the pending activity info

Why?
If activity options where changed - there is no "official" way to users to know what are the current options.
UI should display current options, so we will provide them as a part of DescribeWorfklow response.
Thus we add activity options to the pending activity info, which will be a part of DescribeWorfklow response.

Breaking changes
No

@ychebotarev ychebotarev requested review from a team as code owners May 7, 2025 20:58
@ychebotarev ychebotarev requested a review from gow May 7, 2025 21:01
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Nothing blocking

@@ -322,6 +323,9 @@ message PendingActivityInfo {
}

PauseInfo pause_info = 23;

// current activity options. May be different from the one used to start the activity.
temporal.api.activity.v1.ActivityOptions activity_options = 24;
Copy link
Member

Choose a reason for hiding this comment

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

I wish we had put activity options in common tbh. Setting up this proto package dependency cycle may make other things more difficult in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dependency cycle

where is it coming from? "activity" depends on "common", not visa/versa.

Copy link
Member

Choose a reason for hiding this comment

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

It's not a "cycle" per se, but now having the workflow depend on activity means that nothing in activity can ever depend on anything that depends on workflow now (e.g. batch). Separating these messages out to single-use small packages makes things difficult for users later.

For example, the fact that WorkflowExecutionOptions was put in workflow by the versioning team meant we couldn't put PostResetOperation in common alongside other reset things, ref #581 (comment). Same can happen here. Now everyone that wants ActivityOptions has to make sure they are in a package that doesn't cause a cycle with activity.

@ychebotarev ychebotarev merged commit c765266 into master May 9, 2025
5 checks passed
@ychebotarev ychebotarev deleted the y_desc_ac_policy branch May 9, 2025 17:27
ychebotarev added a commit to temporalio/temporal that referenced this pull request May 9, 2025
## What changed?
Populate activity options in DescriveWorfklow request.
Corresponding API PR:
temporalio/api#586

## Why?
* Activity options can be changed, and right now there is no way to know
that.
* Requirement in UI.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [X] added new unit test(s)
- [ ] added new functional test(s)
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.

3 participants