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

Correctly handle None returns from Query.scalar() #16345

Merged
merged 1 commit into from Jun 15, 2021

Conversation

@uranusjr
Copy link
Member

@uranusjr uranusjr commented Jun 9, 2021

Toward #8171, fix #16328.

None is possible when the query does not return a row, according to SQLAlchemy documentation. We can handle them to provide better errors in unexpected situations.

kaxil
kaxil approved these changes Jun 9, 2021
@kaxil kaxil added this to the Airflow 2.1.1 milestone Jun 9, 2021
@github-actions
Copy link

@github-actions github-actions bot commented Jun 9, 2021

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.

airflow/jobs/scheduler_job.py Outdated Show resolved Hide resolved
@kaxil kaxil self-requested a review Jun 10, 2021
@uranusjr uranusjr force-pushed the scalar-none-fixes branch from a70df2a to 7a36545 Jun 11, 2021
This is possible when the query does not return a row, according to
SQLAlchemy documentation. We can handle them to provide better errors in
unexpected situations.
@uranusjr uranusjr force-pushed the scalar-none-fixes branch from 7a36545 to 2518f90 Jun 15, 2021
@kaxil kaxil merged commit 147bcec into apache:main Jun 15, 2021
50 checks passed
jhtimmins added a commit to astronomer/airflow that referenced this issue Jun 16, 2021
This is possible when the query does not return a row, according to
SQLAlchemy documentation. We can handle them to provide better errors in
unexpected situations.

Toward apache#8171, fix apache#16328.

(cherry picked from commit 147bcec)
ashb added a commit that referenced this issue Jun 22, 2021
This is possible when the query does not return a row, according to
SQLAlchemy documentation. We can handle them to provide better errors in
unexpected situations.

Toward #8171, fix #16328.

(cherry picked from commit 147bcec)
@uranusjr uranusjr deleted the scalar-none-fixes branch Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants