Skip to content

Fix no_status and duration for grid summaries #53087

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

Merged

Conversation

pierrejeambrun
Copy link
Member

@pierrejeambrun pierrejeambrun commented Jul 9, 2025

closes: #53078
closes: #53074

Screenshot 2025-07-09 at 13 51 45

Tested for task group, and mapped task and clearing task.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Jul 9, 2025
@pierrejeambrun pierrejeambrun force-pushed the fix-no-status-no-duration-for-grid branch from 4252a14 to 7811523 Compare July 9, 2025 12:01
@pierrejeambrun pierrejeambrun force-pushed the fix-no-status-no-duration-for-grid branch from 7811523 to 7dc5c9a Compare July 9, 2025 12:01
@vatsrahul1001
Copy link
Contributor

@pierrejeambrun we have verified and this indeed resolves both issues. Thanks for quick fix.

@pierrejeambrun
Copy link
Member Author

cc: @dstandish would love your input on that just to be sure it's not going against the original intention (since a lot has changed recently)

Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I agree with Pierre that Daniel's input would be great.

@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Jul 9, 2025

Lets merge it, I can follow up in case there is anything to update.

@pierrejeambrun pierrejeambrun added the backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch label Jul 9, 2025
@pierrejeambrun pierrejeambrun merged commit 8b04c38 into apache:main Jul 9, 2025
103 checks passed
@pierrejeambrun pierrejeambrun deleted the fix-no-status-no-duration-for-grid branch July 9, 2025 14:38
Copy link

github-actions bot commented Jul 9, 2025

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 8b04c38 v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

@pierrejeambrun
Copy link
Member Author

Manual cherry pick there:
#53092

pierrejeambrun added a commit that referenced this pull request Jul 9, 2025
)

* [v3-0-test] Fix no_status and duration for grid summaries #53087

* Fix CI
kaxil pushed a commit that referenced this pull request Jul 9, 2025
)

* [v3-0-test] Fix no_status and duration for grid summaries #53087

* Fix CI
@mpunch1
Copy link

mpunch1 commented Jul 10, 2025

@pierrejeambrun For the dynamic DAG when the version changes while the DAG is in running state the new graph is being generated but the state Colour are not rendering as the api is failing
API:-
/ui/grid/data_ingestion?offset=0&limit=1&run_after_gte=2025-07-10T10%3A25%3A20.714000Z&run_after_lte=2025-07-10T10%3A25%3A20.714000Z
Request Method:
GET
Status Code:
500 Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/applications.py", line 112, in call
await self.middleware_stack(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 29, in call
await responder(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 126, in call
await super().call(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 46, in call
await self.app(scope, receive, self.send_with_compression)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in call
await self.app(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py", line 176, in call
with recv_stream, send_stream, collapse_excgroups():
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
raise exc
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py", line 178, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/middleware.py", line 28, in dispatch
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py", line 156, in call_next
raise app_exc
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/base.py", line 141, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 714, in call
await self.middleware_stack(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 734, in app
await route.handle(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/routes/ui/grid.py", line 208, in grid_data
parent_task_id=task_node_map[ti.task_id]["parent_id"], task_node_map=task_node_map
~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'append_master_table_fiscal_date'

@pierrejeambrun
Copy link
Member Author

@mpunch1 Thanks for your message.

Can you share a minimal reproducible example DAG and process.

Also I don't think this is related to this PR, but more generally to the recent grid refactoring that took place. What version of airflow are you using?

@mpunch1
Copy link

mpunch1 commented Jul 10, 2025

@pierrejeambrun I am using airflow:3.0.3rc5, so basically how it works is that the DAG is dynamically generated using a for loop over an airflow variable. This particular variable is set in the prior task with some default dummy value, so that the DAG can be parsed. Initially when the DAG is parsed the graph is generated with this dummy value.
Once the initial task runs it sets that variable value and then the for loop gets updated value and while the DAG is in running state the new graph is generated based on the variable value. The version of DAG gets updated while the DAG is still in running state. Now the newly generated graph is rendered and the new task in the background are in running state but the graph itself doesn't render any colour.

#53079

HsiuChuanHsu pushed a commit to HsiuChuanHsu/airflow that referenced this pull request Jul 10, 2025
* Fix no_status and duration for grid summaries

* Fix CI
@pierrejeambrun
Copy link
Member Author

I don't think this is related to this specific PR. Can you test on RC4 and the problem should be the same of even worse, I suggest we continue the discussion on the linked dedicated issue thanks.

stephen-bracken pushed a commit to stephen-bracken/airflow that referenced this pull request Jul 15, 2025
* Fix no_status and duration for grid summaries

* Fix CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch
Projects
None yet
4 participants