FrankYang0529 commented on code in PR #73895:
URL: https://github.com/apache/airflow/pull/73895#discussion_r4162038358
##########
go-sdk/airflow/task_option.go:
##########
@@ -17,17 +17,20 @@
package airflow
-// TaskOption is an option to [DagRef.Task]. [TaskSpec] is one.
+// TaskOption is an option to [DagRef.Task]. There are two kinds: a [TaskSpec]
sets the
+// attributes of the task that DagRef.Task adds, and [Inputs] passes the
results of other tasks
+// to that task.
//
// Its only method is unexported, so a type outside this package cannot
declare it.
// A struct that embeds a TaskSpec or a TaskOption still satisfies the
interface, and Task
// panics when it is given one.
type TaskOption interface{ applyTask(*taskConfig) }
type taskConfig struct {
- // specs keeps every TaskSpec passed to DagRef.Task, so that Task can
reject a second one
- // instead of merging the two.
- specs []TaskSpec
+ // specs and inputs keep every TaskSpec and every Inputs passed to
DagRef.Task, so that Task
+ // can reject a second TaskSpec or a second Inputs instead of merging
it into the first.
+ specs []TaskSpec
+ inputs [][]*TaskRef
Review Comment:
Follow-up PR: https://github.com/apache/airflow/pull/74057
--
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]