S3TaskHandler doesn't seem to run the close method and doesn't push the logs to S3 #55402
Replies: 6 comments
-
|
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
|
My guess is something wrong with the chart, maybe the variables are not passed as you think they are - but you should check there - this chart is not managed by us. This works if you configure it locally in general (a lot of people would complain if not) - so something must be problematic in the configuration of the chart, or you have some typo. Generally speaking you should find information in the local logs (writtent in the place where the chart configures them to be written) and you should look there for clues. |
Beta Was this translation helpful? Give feedback.
-
|
Converting to a discussion. |
Beta Was this translation helpful? Give feedback.
-
|
I tried in local with Docker and was not able to push the logs to S3 either 🙂 The variables are OK since I am able to read a log file I pushed manually in the S3 bucket (Screenshot shared above). |
Beta Was this translation helpful? Give feedback.
-
I think it would be good to look why -> if there is a reason you could not push it manually, it should be also the same reason logs are not sent by Airflow. You need to see what the problem is.
Any logs produced in the logs folder of Airflow - see "logging" docs in Airflow documentation. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Apache Airflow Provider(s)
amazon
Versions of Apache Airflow Providers
apache-airflow-providers-amazon==8.29.0
Apache Airflow version
2.10.5
Operating System
Debian GNU/Linux 12 (bookworm)
Deployment
Official Apache Airflow Helm Chart
Deployment details
Deployment through the Helm chart
https://airflow-helm.github.io/chartsversion8.9.0.Airflow image :
slim-2.10.5-python3.10My deployment creates a Service Account to allow to connect to our AWS S3 to push the logs there.
Configuration for logging :
AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER: "s3://{{ bucket }}/airflow/logs"
AIRFLOW__LOGGING__REMOTE_LOGGING: "True"
AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID: "s3_remote_logging"
What happened
It seems the
close()method inS3TaskHandleris not called. I don't have any log stored in S3.I am able to read a file from S3 :
I am able to push a log from the worker manually by running this code :
What you think should happen instead
When closing the task, The Task Handler should have pushed the logs to my S3 bucket.
How to reproduce
slim-2.10.5-python3.10with the amazon provider packageAnything else
This problem is occurring on all my tasks now. Please let me know if I misconfigured something. Thanks !
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions