-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Base date for fetching dag grid view must include selected run_id #34887
Conversation
e9e041b
to
2a5f571
Compare
I tried my best to review this PR but I was not able to get the UI running with breeze locally. GRID view did not show up anymore. Unfortunately I'm not really a TypeScript developer (noop level) and could not see the root cause. Reading the code I fear a bit that most of the logic is made in backend in views.py. As already above I am a noop but would assume it is better to have the logic in the client side, similar like "If requested run_id not in runs loaded, then load an are where the run_id is contained. |
This bug significantly impacts the efficiency of navigating DagRuns, particularly when dealing with a high volume of items. The ability to quickly identify a specific DagRun is critical to my workflow, and the current issue hinders this process. A prompt resolution would greatly enhance productivity and is eagerly anticipated. |
@ryanahamilton @ashb @bbovenzi @pierrejeambrun can you please help in reviewing or find someone else who can review this? This has been pending for some time now and fixes a very annoying bug where one can not permalink to individual dagruns #34723 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we need a custom context provider. I would prefer we try to have a useEffect
inside of useGridData
to detect only the first time runId
is specified in the url params.
It's been some time now so i don't remember the exact details, i think i tried that as first version but it didn't work for some reason. I wouldn't add context unnecessarily, as a I'm normally very anti global variables. :D The context is needed to transfer the first selection between The use of query params also introduces an ordering problem. If (The placement of If you see any better way to do this, i would be more than happy to use some other approach instead. Also feel free to overwrite this PR if you have some other example for this already. |
That makes sense. You are right the ordering is a bit tricky since selection/griddata also edit the url params. Let me pull this down locally and poke around today. |
|
Is it possible to take the base date changes separately as an improvement? This bug makes the most recent versions of airflow completely unusable for us, would be great to have some kind of fix in asap. |
Sure I can do a follow up PR. Let's still rebase. |
2a5f571
to
9522b33
Compare
Rebased now. I see the problem with base date now. The whole base date selector and the filter options stop working if a I did a quick and dirty attempt of fixing it but couldn't find a good solution in short time.
|
@hterik Ok I'm happy to clean up this filters+main logic. Mind to rebase the PR first? |
There's conflicts |
@hterik Can you handle the rebase and resolve conflicts? |
Yeah, would be great - as this fix was pushed multiple times... next release will be cut in ~24h - if rebased and reviewed the chance is likely to get it in... |
Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected. This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter. closes: apache#34723
9522b33
to
d7c403d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a test (visual inspection and test on UI level) and can confirm that this PR improves the situation - allowing to find a DAG run by search and then navigate to GRID.
Nevertheless I assume we really have follow-up issues (like mentioned before by @bbovenzi that if the navigation included the filter, that no attempt to rest filter or re-selection of a date is working. Nothing that I see is caused by this PR - so still I'd propose to merge, knowing that there need to be other fixes in the filtering following.
LGTM!
…4887) Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected. This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter. closes: #34723 (cherry picked from commit a0ebabb)
Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected.
This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter.
closes: #34723