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/04/06 14:53:02 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request, #22786: Fix SQLALchemy warning about conflicting relationships

ephraimbuddy opened a new pull request, #22786:
URL: https://github.com/apache/airflow/pull/22786

   Running airflow commands print out warnings about conflicting relationships.
   
   ```
   SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id
    to column dag_run.dag_id, which conflicts with relationship(s): 'RenderedTaskInstanceFields.dag_run'
    (copies rendered_task_instance_fields.dag_id to dag_run.dag_id). If this is not the intention,
    consider if these relationships should be linked with back_populates, or if viewonly=True
   should be applied to one or more if they are read-only. For the less common case that foreign
   key constraints are partially overlapping, the orm.foreign() annotation can be used to
   isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove
    this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
   /usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning:
   relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to
   column dag_run.dag_id, which conflicts with relationship(s): 'RenderedTaskInstanceFields.dag_run'
   (copies rendered_task_instance_fields.dag_id to dag_run.dag_id). If this is not the intention,
    consider if these relationships should be linked with back_populates, or if viewonly=True
    should be applied to one or more if they are read-only. For the less common case that foreign
   key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate
   the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning.
    (Background on this error at: http://sqlalche.me/e/14/qzyx)
   ```
   Since the RenderedTaskInstanceFields.dag_run is only used in loading up the execution_date, we mark it as
   viewonly which fixes the above warning
   


-- 
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


[GitHub] [airflow] github-actions[bot] commented on pull request #22786: Fix SQLALchemy warning about conflicting relationships

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22786:
URL: https://github.com/apache/airflow/pull/22786#issuecomment-1090401667

   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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


[GitHub] [airflow] kaxil merged pull request #22786: Fix SQLALchemy warning about conflicting relationships

Posted by GitBox <gi...@apache.org>.
kaxil merged PR #22786:
URL: https://github.com/apache/airflow/pull/22786


-- 
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