FrankYang0529 commented on code in PR #74178:
URL: https://github.com/apache/airflow/pull/74178#discussion_r4183002685


##########
go-sdk/pkg/execution/client.go:
##########
@@ -254,6 +254,24 @@ func (c *CoordinatorClient) PushXCom(
        return err
 }
 
+// deleteXCom asks the supervisor to delete the XCom of ti with the given key. 
Like PushXCom, it
+// leaves map_index out for an unmapped task instance, and the Execution API 
then deletes the XCom
+// with map_index -1.
+func (c *CoordinatorClient) deleteXCom(ctx context.Context, ti 
sdk.TaskInstance, key string) error {
+       msg := genmodels.DeleteXCom{
+               Key:    key,
+               DagID:  ti.DagID,
+               TaskID: ti.TaskID,
+               RunID:  ti.RunID,
+       }
+       if ti.MapIndex != nil && *ti.MapIndex != -1 {
+               msg.MapIndex = ti.MapIndex
+       }

Review Comment:
   Thanks for the suggestion. Updated it.



-- 
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