ephraimbuddy commented on PR #47592:
URL: https://github.com/apache/airflow/pull/47592#issuecomment-2965379429

   > > I noticed a pattern where you have to add DagModel with the bundle_name 
explicitly despite that there's dag.sync_to_db next to it. I feel something is 
wrong somewhere for us to do that
   > 
   > Hi @ephraimbuddy, This is because DagModel.bundle_name does not have a 
not-null default value. I think ideally, `bulk_write_to_db` or `sync_to_db` can 
be updated to handle `DagModel` and `DagBundleModel` insertion, while I am 
afraid this is too much to be added to this PR, as these these methods are used 
in other unrelated unit tests and components as well. I can probably leave a 
TODO comment and improve this in another PR. What do you think?
   > 
   > Another potential approach is to set `dags-folder` as the default value in 
the model. While I don't see a similar case with hard-coded string value in 
other models, so I assume we don't want to this.
   
   Improving it in another PR is good too.


-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to