You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/11 10:37:17 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #20802: Only validate Params when DAG is triggered

ephraimbuddy commented on a change in pull request #20802:
URL: https://github.com/apache/airflow/pull/20802#discussion_r782017751



##########
File path: airflow/models/dagbag.py
##########
@@ -398,6 +400,10 @@ def _process_modules(self, filepath, mods, file_last_changed_on_disk):
             dag.fileloc = mod.__file__
             try:
                 dag.timetable.validate()
+                # create a copy of params before validating
+                copied_params = copy.deepcopy(dag.params)
+                copied_params.update(conf or {})

Review comment:
       Oops...didn't think much about that. Wrong here. I see that validating at create_dagrun is necessary too. I will add it back but then, since we validate during parsing, the check at create_dagrun would check for error when conf is added manually.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org