phanikumv commented on code in PR #68554:
URL: https://github.com/apache/airflow/pull/68554#discussion_r3411531839
##########
go-sdk/pkg/execution/integration_test.go:
##########
@@ -153,6 +181,34 @@ func TestTaskRunnerPanic(t *testing.T) {
assert.Equal(t, "failed", result["state"])
}
+func TestTaskRunnerPanicRetry(t *testing.T) {
+ bundle := buildBundle(t, func(r bundlev1.Registry) {
+ r.AddDag("test_dag").AddTask(panicTask)
+ })
+
+ details := &StartupDetails{
+ TI: TaskInstanceInfo{
+ ID: "550e8400-e29b-41d4-a716-446655440000",
+ DagID: "test_dag",
+ TaskID: "panicTask",
+ RunID: "run1",
+ MapIndex: -1,
+ },
+ BundleInfo: BundleInfoMsg{Name: "test", Version: "1.0"},
+ TIContext: TIRunContext{
+ ShouldRetry: true,
+ MaxTries: 3,
+ },
+ }
+
+ logger := slog.New(slog.NewTextHandler(io.Discard, nil))
+ comm := NewCoordinatorComm(bytes.NewReader(nil), io.Discard, logger)
+
+ result := RunTask(context.Background(), bundle, details, comm, logger)
+ assert.Equal(t, "RetryTask", result["type"])
+ assert.Contains(t, result["reason"], "panic: something went wrong")
Review Comment:
```suggestion
assert.Contains(t, result["retry_reason"], "panic: something went
wrong")
```
--
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]