uranusjr commented on code in PR #75503:
URL: https://github.com/apache/airflow/pull/75503#discussion_r4410647559
##########
go-sdk/internal/bundle/task.go:
##########
@@ -65,10 +65,24 @@ type SerializedDag struct {
Err error
}
+// DagSerializationOptions are the Airflow settings that the Dag processor
sends with a parse
+// request. A bundle cannot read the Airflow config that Python's DAG reads,
so the Dag processor
+// sends the settings that the serializer needs instead.
+type DagSerializationOptions struct {
+ // CreateCronDataIntervals is [scheduler] create_cron_data_intervals.
Python's DAG builds a
+ // CronDataIntervalTimetable from a cron expression when it is set, and
a CronTriggerTimetable
+ // when it is not.
+ CreateCronDataIntervals bool
+ // DefaultTimezone is Airflow's encoded [core] default_timezone. A Dag
without a start date uses
+ // it as both its timezone and its cron timetable timezone. Nil
represents the wire schema's
+ // default value, "UTC", for in-process callers.
+ DefaultTimezone any
Review Comment:
A bad value from the wire (a float, a map) would be written into the Dag
JSON unchecked. Use a small typed representation (name or offset) and validate
it once in `parseDags`.
--
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]