Skip to content

Expose requested_start_time and actual_start_time on standalone activities#10760

Open
fretz12 wants to merge 2 commits into
fredtzeng/saa-start-delay-resetfrom
fredtzeng/saa-start-delay-desclist
Open

Expose requested_start_time and actual_start_time on standalone activities#10760
fretz12 wants to merge 2 commits into
fredtzeng/saa-start-delay-resetfrom
fredtzeng/saa-start-delay-desclist

Conversation

@fretz12

@fretz12 fretz12 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What changed?

Adds requested_start_time and actual_start_time to ActivityExecutionInfo for standalone activities:

  • requested_start_time = schedule_time + start_delay. Always populated (equals schedule_time when start_delay is unset).
  • actual_start_time = when a worker first picked up the activity, read from first_attempt_started_time. Unset until first pickup, and never moves on retries or resets.

The delta between the two is a useful debugging signal: it captures how long a worker took to pick the activity up after its requested target (matching backlog, worker downtime, etc.).

Also cleaned up a misleading timeout error message.

Why?

Both fields to be exposed via Describe for the SAA "delayed-not-yet-dispatched" use case. Describe today shows neither. This PR closes the Describe-side gap.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@fretz12 fretz12 requested review from a team as code owners June 17, 2026 23:22
@fretz12 fretz12 marked this pull request as draft June 17, 2026 23:23
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-reset branch from d1ba240 to 41170f2 Compare June 18, 2026 20:03
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-desclist branch from 4748df2 to b1d3d85 Compare June 18, 2026 20:03
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-reset branch from 41170f2 to 1d2c473 Compare June 18, 2026 21:23
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-desclist branch from b1d3d85 to 0e74b39 Compare June 18, 2026 21:23
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-reset branch from 1d2c473 to 4d444ae Compare June 18, 2026 22:15
@fretz12 fretz12 force-pushed the fredtzeng/saa-start-delay-desclist branch from 0e74b39 to 7e132e7 Compare June 18, 2026 22:15
} else {
// Deduction failed as there's not enough information to fill in missing timeouts.
return serviceerror.NewInvalidArgumentf("a valid StartToClose or ScheduleToCloseTimeout is not set on ScheduleActivityTaskCommand. ActivityId=%s ActivityType=%s",
return serviceerror.NewInvalidArgumentf("a valid StartToCloseTimeout or ScheduleToCloseTimeout must be set on the activity. ActivityId=%s ActivityType=%s",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sliding in an err message fix as pointed out in another conversation

@fretz12 fretz12 marked this pull request as ready for review June 18, 2026 22:56
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.

1 participant