dramis commented on issue #49887:
URL: https://github.com/apache/airflow/issues/49887#issuecomment-2865907609
Here is a minimal DAG that triggers the issue:
```
from datetime import datetime, timedelta
from airflow import DAG
from airflow.utils.task_group import TaskGroup
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.standard.operators.python import PythonOperator
from airflow.hooks.base import BaseHook
default_args = {
}
# === Utility function ===
def _get_credential_from_conn(conn_id: str, **op_kwargs):
now = datetime.now().isoformat()
with open('/tmp/runnint.txt', 'a') as f:
f.write(f"running {now}\n")
conn = BaseHook.get_connection(conn_id)
return f'-u {conn.login} -p {conn.password}'
# === DAG Definition ===
with DAG(
dag_id="test-error",
start_date=datetime(2025, 4, 28),
schedule="15 6 * * *",
catchup=True,
default_args=default_args,
render_template_as_native_obj=True,
tags=['elasticsearch', 'drk-1'],
) as dag:
get_hydroqc_data_hourly = BashOperator(
task_id="get_hydroqc_data_hourly",
bash_command=f"echo {_get_credential_from_conn('test_endpoint')}",
)
get_hydroqc_data_hourly
```
The test_endpoint connection is an HTTP connection with only the login and
password fields filled in.
A line is appended to the /tmp/runnint.txt file only when the DAG is
actually executed.
However, as soon as the DAG processor loads the DAG file, the number of open
files on the system gradually increases.
--
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]