Repository navigation
Description
Apache Airflow version
3.0.4
If "Other Airflow 2 version" selected, which one?
No response
What happened?
After upgrading our Airflow deployment from version 3.0.3 to 3.0.4, all tasks started to fail with a RuntimeError: generator didn't yield. Our Airflow instance is deployed on Kubernetes and is configured to use S3 for remote logging.
The error occurred because a missing aws_default connection caused a failure during the logging setup phase for tasks. This seems to be a new requirement in version 3.0.4 that wasn't present in 3.0.3, or a regression that causes a critical failure when the connection is absent.
Worker logs traceback:
2025-08-14 09:02:05.978736 [warning ] Server error [airflow.sdk.api.client] detail={'detail': {'reason': 'not_found', 'message': 'Connection with ID aws_default not found'}}
2025-08-14 09:02:05.979060 [error ] Connection not found [airflow.sdk.api.client] conn_id=aws_default detail={'detail': {'reason': 'not_found', 'message': 'Connection with ID aws_default not found'}} status_code=404
2025-08-14 09:02:05.985273 [error ] Task execute_workload[fe7b5051-82c5-4dec-880d-e4e7c37b3ef2] raised unexpected: RuntimeError("generator didn't yield") [celery.app.trace]
The traceback points to this line in the code:
https://github.com/apache/airflow/blob/3.0.4/task-sdk/src/airflow/sdk/execution_time/supervisor.py#L1700
│ /app/.venv/lib/python3.11/site-packages/airflow/sdk/execution_time/supervisor.py:1700 in │
│ _configure_logging │
│ │
│ ❱ 1700 with _remote_logging_conn(client): │
...
RuntimeError: generator didn't yield
What you think should happen instead?
Tasks should execute successfully. If a connection is required for remote logging, Airflow should either:
-
Use a different, non-critical logging path if the connection is missing and warn users.
-
Provide a clear, helpful error message about the missing connection instead of a cryptic RuntimeError: generator didn't yield.
-
Include a warning in the release notes about the new requirement for a
aws_defaultconnection when using S3 remote logging.
How to reproduce
-
Deploy an Airflow instance on Kubernetes.
-
Configure remote_logging to use S3 in airflow.cfg or through environment variables.
-
Ensure that there is no Airflow connection named aws_default.
-
Upgrade the Airflow version to 3.0.4.
-
Run a DAG with one or more tasks.
-
Observe the task failure and the logs.
Operating System
Airflow in k8s
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
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
- I agree to follow this project's Code of Conduct
Activity
[-]Exception in remote logging if connection doesn't exist[/-][+]Unhandled Exception in remote logging if connection doesn't exist[/+]csp33 commentedon Aug 14, 2025
Probably related: #53719
eladkal commentedon Aug 14, 2025
cc @ashb
ashb commentedon Aug 14, 2025
Yeah the error should be improved, but I think an exception is the right behaviour here?
ashb commentedon Aug 14, 2025
We could continue to log things to a local file, and in that file log that the remote log couldn't be uploaded -- I can see that perhaps being more useful than the current behaviour too
4 remaining items
dada-engineer commentedon Dec 11, 2025
The overall problem is that the api server is called and the connection is requested via API call. This endpoint only checks if there is one in the DB. If not it returns a 404. So all the env var specified connections are ignored here. I would argue that these even should have priority. Why not check the env var created connections before calling the API server anyways? @ashb
Edit: I do understand why the API server does not return these connections as they have never been shown in the UI. Still for internal usage env var specified connections seem to be less useful.
Edit2: TLDR; Add the connection via UI or deployment hook to the actual airflow DB connections.
potiuk commentedon Dec 23, 2025
I think this has been already handled better in latest airflow 3.1.5 -> but I am not really sure, it should be re-verified in 3.1.5 and reported back here.
dada-engineer commentedon Jan 15, 2026
I have deployed 3.1.6 to try this and still face the same issue @potiuk.
ginolegigot commentedon Jan 20, 2026
for people stumbling upon this after migrating from 2.11 to 3.1.6, setting remote_conn_id https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#remote-log-conn-id for aws (i guess but did not try) or gcp default connections fixes the issue.
In my case, I wanted to remote log to a gcs bucket:
To create a default gcp connection, select create a google cloud connection type, no need for extra parameters, set a conn_id and put this conn id in remote_log_conn_id.
dada-engineer commentedon Jan 21, 2026
Actually if you create the connection you can create any no need to call this default. It just matters that the API server can find this in the DB. Interestingly enough I only face this issue in AWS not Azure...
sagu2602 commentedon Mar 4, 2026
How to fix it? We are using 3.1.7
Does that mean remote_logging with s3 won't work at all?
dada-engineer commentedon Mar 4, 2026
nono @sagu2602 this does not mean it is unusable. It just means you have to create the connection in the db (either via cli or UI). Depending on what you are using as aws auth mechanism (we run in EKS and can benefit from automatic identity web tokens injection into the pod based on service account IAM role, so it only needs a name), you also have to configure this then.
ForeverWintr commentedon Mar 5, 2026
We ran into this issue on 3.0.6 and I can confirm that adding an empty
aws_defaultconnection fixes it.It looks to me like the current version of
_remote_logging_connshouldn't have this issue, so hopefully it is included in the next release.o-nikolas commentedon Mar 5, 2026
I was just looking into this as well. It seems that #59801 fixes it. And it was not backported into either 3.1.6 or 3.1.7 since it wasn't the specific intention of the PR to fix that bug so no one noticed perhaps?
It will be included in 3.2 of course, but we could consider backporting it for the upcoming 3.1.8 release @vatsrahul1001
vatsrahul1001 commentedon Mar 6, 2026
Targeting this for 3.1.9. The 3.1.8 release process has already started, and the change may require more testing.
Dev-iL commentedon Mar 6, 2026
Backport here: #62979
eladkal commentedon Mar 6, 2026
Closing as solved #59801