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


##########
go-sdk/pkg/execution/integration_test.go:
##########
@@ -471,6 +471,89 @@ func TestTaskRunnerArgBindingsMissingRequiredFields(t 
*testing.T) {
        }
 }
 
+func TestTaskRunnerArgBindingsMappedTaskNotImplemented(t *testing.T) {
+       cases := []struct {
+               what string
+               spec map[string]any
+       }{
+               {
+                       what: `binding kind "sequence"`,
+                       spec: map[string]any{"name": "country", "kind": 
"sequence", "task_id": "extract"},
+               },
+               {
+                       what: `binding kind "tuple"`,
+                       spec: map[string]any{"name": "country", "kind": 
"tuple", "parts": []any{}},
+               },
+               {
+                       what: "map_index",
+                       spec: map[string]any{
+                               "name": "country", "kind": "xcom", "task_id": 
"extract", "map_index": 0,
+                       },
+               },
+               {
+                       what: "element_index",
+                       spec: map[string]any{
+                               "name": "country", "kind": "xcom", "task_id": 
"extract", "element_index": 1,
+                       },
+               },
+               {
+                       what: "apply_map",
+                       spec: map[string]any{
+                               "name": "country", "kind": "xcom", "task_id": 
"extract", "apply_map": true,
+                       },
+               },
+               {
+                       what: "apply_map",
+                       spec: map[string]any{
+                               "name": "country", "kind": "literal", "value": 
"x", "apply_map": true,
+                       },
+               },
+               {
+                       what: "kwarg",
+                       spec: map[string]any{
+                               "name": "country", "kind": "literal", "value": 
"x", "kwarg": "country",
+                       },
+               },
+               {
+                       what: "fallback",
+                       spec: map[string]any{
+                               "name": "country", "kind": "literal", "value": 
"x",
+                               "fallback": map[string]any{"kind": "literal", 
"value": "y"},
+                       },
+               },
+       }
+       for _, tc := range cases {
+               t.Run(fmt.Sprintf("%s on %s", tc.what, tc.spec["kind"]), func(t 
*testing.T) {
+                       ran := false
+                       bundle := buildBundle(t, func(r testBundle) {
+                               
r.AddDag("test_dag").AddTaskWithName("transform",
+                                       func(actx contexttest.Context, country 
string) error {
+                                               ran = true
+                                               return nil
+                                       })
+                       })
+
+                       details := newStartupDetails("transform", tc.spec)
+                       details.TIContext.ShouldRetry = true

Review Comment:
   Nit: a retry can never fix this error, but it goes through 
`failTask(ShouldRetry, …)` and uses up every retry. The server returns a 422 
for undeliverable bindings for the same reason. This is not a blocker, because 
a malformed spec already behaves this way. But it may be worth failing without 
retry for the not-implemented case, here or in a follow-up.
   



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