temporalio / temporalio/temporal

Worker identity from task heartbeats is not exposed anyhow in API

Open
#1,979 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Background

PendingActivityInfo has a field called lastWorkerIdentity.
Right now this field is populated only from a worker response when it picks up the activity task when it was started.
See: https://github.com/temporalio/temporal/blob/ff069578a44dac7f39d7454771e88a989f62fe61/service/history/historyEngine.go#L1196

RecordActivityTaskHeartbeatRequest and RecordActivityTaskHeartbeatByIdRequest from heartbeating API both have identity field that right now is not used and exposed in describeExecution API even if worker didn't report an identity during actviity task pickup, but did report it later in a heartbeat.

Proposal

Either

  1. Identity reported in heartbeating should override PendingActivityInfo#lastWorkerIdentity (if heartbeating identity is not empty).

Or
2. Identity reported in heartbeating should be exposed in a new PendingActivityInfo field.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in service/history/historyEngine.go near the referenced activity-task handling, then trace PendingActivityInfo, RecordActivityTaskHeartbeatRequest, and RecordActivityTaskHeartbeatByIdRequest through the describeExecution API. Determine whether heartbeat identity should override lastWorkerIdentity or be added as a new field, and verify that the chosen behavior is exposed when identity is reported only by a heartbeat.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.