ashb commented on code in PR #58253:
URL: https://github.com/apache/airflow/pull/58253#discussion_r2522806498
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2486,7 +2486,9 @@ def serialize_dag(cls, dag: DAG) -> dict:
try:
serialized_dag = cls.serialize_to_json(dag, cls._decorated_fields)
serialized_dag["_processor_dags_folder"] = DAGS_FOLDER
- serialized_dag["tasks"] = [cls.serialize(task) for _, task in
dag.task_dict.items()]
+ serialized_dag["tasks"] = [
+ cls.serialize(task) for _, task in
sorted(dag.task_dict.items(), key=lambda x: x[0])
+ ]
Review Comment:
Yeah, this is not good. It will mean that the order of tasks in the UI is
always alphabetical (once dependencies are taken in to account), and it should
not be -- it should be tasks added first to the dag appear higher up in the
grid view.
--
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]