ashb commented on code in PR #55849:
URL: https://github.com/apache/airflow/pull/55849#discussion_r2360454966
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2384,25 +2383,23 @@ class SerializedDAG(BaseSerialization):
_processor_dags_folder: str
def __init__(self, *, dag_id: str) -> None:
- self.catchup = airflow_conf.getboolean("scheduler",
"catchup_by_default")
+ self.catchup = False # Schema default
self.dag_id = self.dag_display_name = dag_id
self.dagrun_timeout = None
self.deadline = None
self.default_args = {}
self.description = None
- self.disable_bundle_versioning =
airflow_conf.getboolean("dag_processor", "disable_bundle_versioning")
+ self.disable_bundle_versioning = False
self.doc_md = None
self.edge_info = {}
self.end_date = None
self.fail_fast = False
self.has_on_failure_callback = False
self.has_on_success_callback = False
self.is_paused_upon_creation = None
- self.max_active_runs = airflow_conf.getint("core",
"max_active_runs_per_dag")
Review Comment:
Is it worth adding a test (or is there one already?) to ensure that if this
config is set to something other than 16 that it shows up somewhere in the
serialized dag?
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1093,21 +1093,6 @@ def _deserialize_params_dict(cls, encoded_params:
list[tuple[str, dict]]) -> Par
return ParamsDict(op_params)
- @classmethod
- def get_operator_optional_fields_from_schema(cls) -> set[str]:
- schema_loader = cls._json_schema
-
- if schema_loader is None:
- return set()
-
- schema_data = schema_loader.schema
- operator_def = schema_data.get("definitions", {}).get("operator", {})
- operator_fields = set(operator_def.get("properties", {}).keys())
- required_fields = set(operator_def.get("required", []))
-
- optional_fields = operator_fields - required_fields
- return optional_fields
-
@classmethod
Review Comment:
Should this be `@cache` too? I don't know how often we check it
--
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]