Skip to content

[Standalone Activity] More cleanup - #675

Merged
bergundy merged 3 commits into
temporalio:standalone-activityfrom
bergundy:standalone-activity
Dec 3, 2025
Merged

[Standalone Activity] More cleanup#675
bergundy merged 3 commits into
temporalio:standalone-activityfrom
bergundy:standalone-activity

Conversation

@bergundy

Copy link
Copy Markdown
Member

What changed?

  • Removed all references to ActivityOptions
  • Add request_id to TerminateActivityExecution
  • Add close_time to ActivityInfo

@bergundy
bergundy requested review from a team as code ownersDecember 2, 2025 19:30
Comment threadtemporal/api/workflowservice/v1/request_response.proto Outdated
bergundyand others added 2 commits December 2, 2025 17:35
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>

@dandavisondandavison left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I made a few suggestions for improving the doc comments.

Comment threadtemporal/api/activity/v1/message.proto Outdated
Comment threadtemporal/api/activity/v1/message.proto Outdated
Co-authored-by: Dan Davison <dandavison7@gmail.com>

@cretzcretz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some notes are related to past reviews that weren't caught then

// More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING.
temporal.api.enums.v1.PendingActivityState run_state = 5;

temporal.api.taskqueue.v1.TaskQueue task_queue = 6;

@cretzcretzDec 3, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason why this is a task queue object here but in the list info message it is a task queue string? Should we be consistent in our task queue representation?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is flattened out ActivityOptions, for workflow.PendingActivityInfo we also use the struct.
I can see that we would want to use the struct consistently for ActivityListInfo too though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

➕ for consistency please

int32 attempt = 9;
int32 maximum_attempts = 10;
int32 attempt = 15;
int32 maximum_attempts = 16;

@cretzcretzDec 3, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this different than what's in retry policy? Can some docs be added to this field to explain it a bit? (I know this isn't part of this review, but it stood out)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Ah, that's oversight by me. I copied this originally from PendingActivityInfo but that has duplication with ActivityOptions now. I am really regretting that we ever introduced ActivityOptions into the API.

We can avoid the duplication here at least.

google.protobuf.Timestamp expiration_time = 12;
google.protobuf.Timestamp expiration_time = 18;
// Time when the activity transitioned to a closed state.
google.protobuf.Timestamp close_time = 19;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For list we are providing a helper field of execution_duration that is close_time - scheduled_time. Any reason to do that there and not here? Should we remove from list side?

In another review it was promised there would be a helper that confirmed that list would not contain more than describe. Are there still plans to write it?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I don't think we have that tracked FTR. But if we do this for activities, we should also do it for schedules which takes the exact same approach.

@cretzcretzDec 4, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unsure, was just told there would be a tool that would keep me from having to constantly go over these PRs with a fine tooth comb to catch mistakes.

Regardless, to the part of the comment about this execution_duration field, can we be consistent there?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I'm on the fence if it's worth adding this field to ActivityInfo, I'm not even sure we need it in ActivityListInfo, it's available as a system search attribute, which is important to use as a query but not so important to reflect in the results, since it's really just subtracting timestamps.

google.protobuf.Timestamp expiration_time = 12;
google.protobuf.Timestamp expiration_time = 18;
// Time when the activity transitioned to a closed state.
google.protobuf.Timestamp close_time = 19;

@cretzcretzDec 3, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Past/present tense inconsistency between scheduled and close terms

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

close_time the term WorkflowExecutionInfo uses, and scheduled_time is from PendingActivityInfo.

Should we be consistent here even though we won't be consistent with those other two structs?

@cretzcretzDec 4, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Up to you, just noticed them inconsistent in this same message

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I'll make it consistent here but the UI folks will probably not be happy with the inconsistency with other fields in PendingActivityInfo.

@bergundy
bergundy merged commit 2232a25 into temporalio:standalone-activityDec 3, 2025
5 checks passed
bergundy added a commit to bergundy/temporal-api that referenced this pull request Dec 4, 2025
**What changed?**
- Removed all references to `ActivityOptions`
- Add request_id to `TerminateActivityExecution`
- Add `close_time` to `ActivityInfo`
---------
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>
Co-authored-by: Dan Davison <dandavison7@gmail.com>
bergundy added a commit to bergundy/temporal-api that referenced this pull request Dec 4, 2025
dandavison added a commit to bergundy/temporal-api that referenced this pull request Dec 5, 2025
**What changed?**
- Removed all references to `ActivityOptions`
- Add request_id to `TerminateActivityExecution`
- Add `close_time` to `ActivityInfo`
---------
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>
Co-authored-by: Dan Davison <dandavison7@gmail.com>
dandavison added a commit that referenced this pull request Dec 16, 2025
**What changed?**
- Removed all references to `ActivityOptions`
- Add request_id to `TerminateActivityExecution`
- Add `close_time` to `ActivityInfo`
---------
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>
Co-authored-by: Dan Davison <dandavison7@gmail.com>
dandavison pushed a commit that referenced this pull request Dec 16, 2025
dandavison added a commit that referenced this pull request Dec 19, 2025
**What changed?**
- Removed all references to `ActivityOptions`
- Add request_id to `TerminateActivityExecution`
- Add `close_time` to `ActivityInfo`
---------
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>
Co-authored-by: Dan Davison <dandavison7@gmail.com>
dandavison pushed a commit that referenced this pull request Dec 19, 2025
Sign up for freeto 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

@bergundy@dandavison@cretz@fretz12