fritz-astronomer opened a new issue, #54155:
URL: https://github.com/apache/airflow/issues/54155

   ### Apache Airflow version
   
   3.0.3
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Example DAG: 
   ```
   from airflow.decorators import dag, task
   
   @dag()
   def exampledag():
       @task
       def sleeper():
           sleep(100)
           return 'good morning :)'
       sleeper()
   exampledag()
   ```
   
   1. Triggered above DAG with no tasks (forgot to add the `sleeper()` line, 
initially)
   2. Corrected the DAG, Added the task
   3. Retriggered the DAG
   4. Task keeps getting marked `Removed` 
   
   <img width="915" height="434" alt="Image" 
src="https://github.com/user-attachments/assets/8f5e5590-898b-444b-b5b6-740fc4cf3214";
 />
   
   Related error in logs:
   ```
   025-08-05T15:11:17.046543000-04:00During handling of the above exception, 
another exception occurred:
   2025-08-05T15:11:17.046546000-04:00
   2025-08-05T15:11:17.046549000-04:00Traceback (most recent call last):
   2025-08-05T15:11:17.046551000-04:00  File 
"/usr/local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py",
 line 409, in run_asgi
   2025-08-05T15:11:17.046555000-04:00    result = await app(  # type: 
ignore[func-returns-value]
   2025-08-05T15:11:17.046614000-04:00             
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046622000-04:00  File 
"/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, 
in __call__
   2025-08-05T15:11:17.046626000-04:00    await super().__call__(scope, 
receive, send)
   2025-08-05T15:11:17.046629000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 112, 
in __call__
   2025-08-05T15:11:17.046632000-04:00    await self.middleware_stack(scope, 
receive, send)
   2025-08-05T15:11:17.046636000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 
187, in __call__
   2025-08-05T15:11:17.046639000-04:00    raise exc
   2025-08-05T15:11:17.046642000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 
165, in __call__
   2025-08-05T15:11:17.046646000-04:00    await self.app(scope, receive, _send)
   2025-08-05T15:11:17.046660000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 
29, in __call__
   2025-08-05T15:11:17.046668000-04:00    await responder(scope, receive, send)
   2025-08-05T15:11:17.046671000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 
126, in __call__
   2025-08-05T15:11:17.046675000-04:00    await super().__call__(scope, 
receive, send)
   2025-08-05T15:11:17.046678000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/gzip.py", line 
46, in __call__
   2025-08-05T15:11:17.046684000-04:00    await self.app(scope, receive, 
self.send_with_compression)
   2025-08-05T15:11:17.046690000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 
85, in __call__
   2025-08-05T15:11:17.046694000-04:00    await self.app(scope, receive, send)
   2025-08-05T15:11:17.046697000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
176, in __call__
   2025-08-05T15:11:17.046700000-04:00    with recv_stream, send_stream, 
collapse_excgroups():
   2025-08-05T15:11:17.046825000-04:00                                   
^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046834000-04:00  File 
"/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
   2025-08-05T15:11:17.046837000-04:00    self.gen.throw(value)
   2025-08-05T15:11:17.046841000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_utils.py", line 82, in 
collapse_excgroups
   2025-08-05T15:11:17.046844000-04:00    raise exc
   2025-08-05T15:11:17.046847000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
178, in __call__
   2025-08-05T15:11:17.046851000-04:00    response = await 
self.dispatch_func(request, call_next)
   2025-08-05T15:11:17.046854000-04:00               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046858000-04:00  File 
"/usr/local/lib/python3.12/site-packages/airflow/api_fastapi/auth/managers/simple/middleware.py",
 line 34, in dispatch
   2025-08-05T15:11:17.046861000-04:00    return await call_next(request)
   2025-08-05T15:11:17.046864000-04:00           ^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046867000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
156, in call_next
   2025-08-05T15:11:17.046870000-04:00    raise app_exc
   2025-08-05T15:11:17.046873000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
141, in coro
   2025-08-05T15:11:17.046877000-04:00    await self.app(scope, 
receive_or_disconnect, send_no_error)
   2025-08-05T15:11:17.046880000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
176, in __call__
   2025-08-05T15:11:17.046883000-04:00    with recv_stream, send_stream, 
collapse_excgroups():
   2025-08-05T15:11:17.046886000-04:00                                   
^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046889000-04:00  File 
"/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
   2025-08-05T15:11:17.046905000-04:00    self.gen.throw(value)
   2025-08-05T15:11:17.046911000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_utils.py", line 82, in 
collapse_excgroups
   2025-08-05T15:11:17.046915000-04:00    raise exc
   2025-08-05T15:11:17.046918000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
178, in __call__
   2025-08-05T15:11:17.046921000-04:00    response = await 
self.dispatch_func(request, call_next)
   2025-08-05T15:11:17.046924000-04:00               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046927000-04:00  File 
"/usr/local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/middleware.py",
 line 28, in dispatch
   2025-08-05T15:11:17.046931000-04:00    response = await call_next(request)
   2025-08-05T15:11:17.046934000-04:00               ^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046937000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
156, in call_next
   2025-08-05T15:11:17.046940000-04:00    raise app_exc
   2025-08-05T15:11:17.046943000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
141, in coro
   2025-08-05T15:11:17.046947000-04:00    await self.app(scope, 
receive_or_disconnect, send_no_error)
   2025-08-05T15:11:17.046950000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
176, in __call__
   2025-08-05T15:11:17.046953000-04:00    with recv_stream, send_stream, 
collapse_excgroups():
   2025-08-05T15:11:17.046956000-04:00                                   
^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.046960000-04:00  File 
"/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
   2025-08-05T15:11:17.046963000-04:00    self.gen.throw(value)
   2025-08-05T15:11:17.046986000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_utils.py", line 82, in 
collapse_excgroups
   2025-08-05T15:11:17.046990000-04:00    raise exc
   2025-08-05T15:11:17.046994000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
178, in __call__
   2025-08-05T15:11:17.046997000-04:00    response = await 
self.dispatch_func(request, call_next)
   2025-08-05T15:11:17.047000000-04:00               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047004000-04:00  File 
"/usr/local/lib/python3.12/site-packages/astronomer/runtime/plugin.py", line 
90, in dispatch
   2025-08-05T15:11:17.047007000-04:00    response = await call_next(request)
   2025-08-05T15:11:17.047010000-04:00               ^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047013000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
156, in call_next
   2025-08-05T15:11:17.047016000-04:00    raise app_exc
   2025-08-05T15:11:17.047019000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 
141, in coro
   2025-08-05T15:11:17.047022000-04:00    await self.app(scope, 
receive_or_disconnect, send_no_error)
   2025-08-05T15:11:17.047025000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", 
line 62, in __call__
   2025-08-05T15:11:17.047203000-04:00    await 
wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
   2025-08-05T15:11:17.047208000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 
53, in wrapped_app
   2025-08-05T15:11:17.047212000-04:00    raise exc
   2025-08-05T15:11:17.047216000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 
42, in wrapped_app
   2025-08-05T15:11:17.047219000-04:00    await app(scope, receive, sender)
   2025-08-05T15:11:17.047222000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 714, in 
__call__
   2025-08-05T15:11:17.047225000-04:00    await self.middleware_stack(scope, 
receive, send)
   2025-08-05T15:11:17.047228000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 734, in app
   2025-08-05T15:11:17.047231000-04:00    await route.handle(scope, receive, 
send)
   2025-08-05T15:11:17.047235000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 288, in 
handle
   2025-08-05T15:11:17.047238000-04:00    await self.app(scope, receive, send)
   2025-08-05T15:11:17.047241000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
   2025-08-05T15:11:17.047244000-04:00    await 
wrap_app_handling_exceptions(app, request)(scope, receive, send)
   2025-08-05T15:11:17.047247000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 
53, in wrapped_app
   2025-08-05T15:11:17.047251000-04:00    raise exc
   2025-08-05T15:11:17.047254000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 
42, in wrapped_app
   2025-08-05T15:11:17.047257000-04:00    await app(scope, receive, sender)
   2025-08-05T15:11:17.047260000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
   2025-08-05T15:11:17.047263000-04:00    response = await f(request)
   2025-08-05T15:11:17.047266000-04:00               ^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047269000-04:00  File 
"/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 301, in app
   2025-08-05T15:11:17.047273000-04:00    raw_response = await 
run_endpoint_function(
   2025-08-05T15:11:17.047276000-04:00                   
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047279000-04:00  File 
"/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 214, in 
run_endpoint_function
   2025-08-05T15:11:17.047282000-04:00    return await 
run_in_threadpool(dependant.call, **values)
   2025-08-05T15:11:17.047285000-04:00           
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047288000-04:00  File 
"/usr/local/lib/python3.12/site-packages/starlette/concurrency.py", line 37, in 
run_in_threadpool
   2025-08-05T15:11:17.047292000-04:00    return await 
anyio.to_thread.run_sync(func)
   2025-08-05T15:11:17.047295000-04:00           
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047335000-04:00  File 
"/usr/local/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in 
run_sync
   2025-08-05T15:11:17.047342000-04:00    return await 
get_async_backend().run_sync_in_worker_thread(
   2025-08-05T15:11:17.047346000-04:00           
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047349000-04:00  File 
"/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 
2470, in run_sync_in_worker_thread
   2025-08-05T15:11:17.047352000-04:00    return await future
   2025-08-05T15:11:17.047355000-04:00           ^^^^^^^^^^^^
   2025-08-05T15:11:17.047358000-04:00  File 
"/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 
967, in run
   2025-08-05T15:11:17.047362000-04:00    result = context.run(func, *args)
   2025-08-05T15:11:17.047364000-04:00             ^^^^^^^^^^^^^^^^^^^^^^^^
   2025-08-05T15:11:17.047368000-04:00  File 
"/usr/local/lib/python3.12/site-packages/airflow/api_fastapi/core_api/routes/ui/grid.py",
 line 527, in get_grid_ti_summaries
   2025-08-05T15:11:17.047371000-04:00    
dag_version_id=task_instances[0].dag_version_id,
   2025-08-05T15:11:17.047374000-04:00                   ~~~~~~~~~~~~~~^^^
   2025-08-05T15:11:17.047491000-04:00IndexError: list index out of range
   ```
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Reproduction instructions above
   
   ### Operating System
   
   Astro Dev / Debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to