Skip to content

Conversation

@SamWheating
Copy link
Contributor

closes: #29843

Because the column and column in the DB are both called try_number, flask-appbuilder ends up trying to build a filter using the try_number property, which doesn't work.

I think that we could get around this by renaming the property, but that would be a huge refactor. Instead, we can just use the @hybrid_property decorator which will enable different behaviour at the class vs. instance-level.

(more on sqlalchemy hybrid properties here)

Tested this in breeze and can confirm it works:
image

Will wait for the full tests to run before I claim that this doesn't break anything else 🤞

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Mar 2, 2023
@SamWheating SamWheating changed the title Use hybrid_property for ti.try_number to fix broken filter in in /taskinstance/list View Fixing broken filter in in /taskinstance/list view Mar 2, 2023
@SamWheating SamWheating force-pushed the sw-fix-trynumber-filter-in-ti-view branch 3 times, most recently from ac75360 to 66fa2b4 Compare March 2, 2023 01:51
@eladkal eladkal added this to the Airflow 2.5.2 milestone Mar 2, 2023
@SamWheating SamWheating force-pushed the sw-fix-trynumber-filter-in-ti-view branch from 66fa2b4 to d520bf6 Compare March 3, 2023 17:36
@SamWheating SamWheating force-pushed the sw-fix-trynumber-filter-in-ti-view branch from c3047e5 to 0948f2c Compare March 6, 2023 21:32
@potiuk potiuk force-pushed the sw-fix-trynumber-filter-in-ti-view branch from 0948f2c to 61e62ae Compare March 7, 2023 22:44
@potiuk
Copy link
Member

potiuk commented Mar 7, 2023

Rebased to account for the caching/pipx issue.

@potiuk potiuk merged commit a3c9902 into apache:main Mar 10, 2023
@zachliu
Copy link
Contributor

zachliu commented Mar 16, 2023

this is not yet in 2.5.2 right? 🤔

@potiuk
Copy link
Member

potiuk commented Mar 16, 2023

Should be. Did you check release notes?

@potiuk potiuk modified the milestones: Airflow 2.5.2, Airflow 2.5.3 Mar 16, 2023
@potiuk
Copy link
Member

potiuk commented Mar 16, 2023

FYI @pierrejeambrun @ephraimbuddy - > looks like this one was marked to 2.5.2 but was not cherry-picked. I guess it was some race condition (merging it around the release cut time).

I moved it to 2.5.3

@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 23, 2023
@pierrejeambrun pierrejeambrun changed the title Fixing broken filter in in /taskinstance/list view Fixing broken filter in /taskinstance/list view Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "Try Number" filter under task instances search is comparing integer with non-integer object

6 participants