Hey folks,
We have had a functional PayloadCodec
+ Codec Server for Temporal Cloud Web UI for the past few months, using the Temporal Python SDK (currently on 1.9.0).
We did start running into an odd issue once we started using Activity Heartbeats. It does not appear to affect the workflow & activity execution, only our Codec Server /decode
endpoint.
What we observed is that:
-
We heartbeat in an activity with
activity.heartbeat(f"iteration {i}")
. -
When we view these activities from Temporal Cloud Web UI, our Codec Server
/decode
endpoint receives a top-level JSON array with many strings. e.g.,{"payloads": ["iteration 1", "iteration 2", "iteration 3", ...]}
, rather than the usual array-of-objects. -
The endpoint — which closely resembles the Python SDK Example — then fails to unmarshal this into
Payloads
, since it expects the array elements to be JSON objects having themetadata
anddata
keys.
So it appears to be the heartbeat details are not encoded by PayloadCodec
in the first place. Yet Temporal Cloud Web UI somehow still forwards it to the Codec Server /decode
to try to decode it.
All these all expected behaviours?