Skip to content

Conversation

@hussein-awala
Copy link
Member

closes: #34109

For some reason, the sqlalchemy sessions created in the CLI do not find the table ab_user, I tested different solutions such as providing the session to the method task_test using provide_session decorator, using deferrable constraint and other solutions, and they did not work, but moving the foreign key to the column fixed the issue.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk potiuk added this to the Airflow 2.7.2 milestone Sep 6, 2023
@potiuk potiuk merged commit 2f32769 into apache:main Sep 6, 2023
@Taragolis Taragolis mentioned this pull request Sep 7, 2023
2 tasks
@dstandish
Copy link
Contributor

@hussein-awala i see these warnings now:

/Users/dstandish/code/airflow/airflow/models/taskinstance.py:3432 SAWarning: Can't validate argument 'foreign_key'; can't locate any SQLAlchemy dialect named 'foreign'
/Users/dstandish/code/airflow/airflow/models/dagrun.py:1488 SAWarning: Can't validate argument 'foreign_key'; can't locate any SQLAlchemy dialect named 'foreign'

appears related

dstandish added a commit to astronomer/airflow that referenced this pull request Sep 27, 2023
@dstandish
Copy link
Contributor

looks like this fixes it #34656

hussein-awala pushed a commit that referenced this pull request Oct 1, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Oct 3, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 5, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 5, 2023
Introduced in #34120.

(cherry picked from commit 1fdc231)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlalchemy error when running CLI command airflow tasks test

6 participants