phanikumv commented on code in PR #68554:
URL: https://github.com/apache/airflow/pull/68554#discussion_r3411522748


##########
go-sdk/pkg/execution/messages.go:
##########
@@ -388,6 +396,20 @@ func (m TaskStateMsg) toMap() map[string]any {
        }
 }
 
+// RetryTaskMsg is sent as a terminal message when a task fails but has 
retries.
+type RetryTaskMsg struct {
+       EndDate time.Time
+       Reason  string
+}
+
+func (m RetryTaskMsg) toMap() map[string]any {
+       return map[string]any{
+               "type":     "RetryTask",
+               "end_date": m.EndDate.UTC().Format(time.RFC3339Nano),
+               "reason":   m.Reason,

Review Comment:
   ```suggestion
                "retry_reason":   m.Reason,
   ```
   
   because as per 
https://github.com/apache/airflow/blob/cc3fb17712fc6548bb9b8ac69b637ca3351804a4/task-sdk/src/airflow/sdk/api/datamodels/_generated.py#L322-L334
 , the JSON key is `retry_reason`, not `reason `



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to