Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unfound ab_user table in the CLI session #34120

Merged
merged 2 commits into from
Sep 6, 2023

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.

airflow/models/dagrun.py Outdated Show resolved Hide resolved
@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
42 checks passed
@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