ChickenBenny commented on code in PR #77489:
URL: https://github.com/apache/airflow/pull/77489#discussion_r4741025957
##########
go-sdk/pkg/execution/execution_timeout.go:
##########
@@ -19,17 +19,32 @@ package execution
import (
"context"
+ "errors"
"fmt"
+ "log/slog"
+ "math"
+ "time"
"github.com/apache/airflow/go-sdk/pkg/execution/genmodels"
+ "github.com/apache/airflow/go-sdk/sdk"
)
-// resolveExecutionTimeout returns the task's execution_timeout in seconds
from ti_context, or nil
-// when the task has no timeout. The coordinator has already filled in the
worker's default.
-// As in the Python task runner, zero means no timeout and a negative value
has already elapsed.
-func resolveExecutionTimeout(fromContext any) (*float64, error) {
+// executionTimeout is a task's execution_timeout. Call start before run.
Review Comment:
Folded in 03444ef8e6. `Run` sends `SetExecutionTimeout` first, and if that
fails it returns the error without calling the function.
`TestExecuteDoesNotRunTheTaskFunctionWhenTheTimeoutFails` covers this. Since
06f13017c2 it is sent after the arguments are read, right before the task
function, which is also where Python sends it (`_run_execute_callable`).
--
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]