nailo2c commented on issue #38144:
URL: https://github.com/apache/airflow/issues/38144#issuecomment-2888531750
Hi @w0ut0, does this issue still occur? I tried reproducing it with this DAG
on Airflow 3.1.0 and couldn’t, so I suspect it’s been fixed.
```python
from datetime import timedelta
import pendulum
from airflow.decorators import dag
from airflow.operators.bash import BashOperator
from airflow.hooks.base import BaseHook
@dag(
dag_id="shell_test_all_providers",
description="Test secret masking for Postgres, MySQL, Azure, Databricks",
start_date=pendulum.datetime(2025, 1, 1),
schedule=None,
catchup=False,
tags=["test"],
default_args={
"retries": 0,
"retry_delay": timedelta(minutes=5),
},
)
def shell_test_all_providers():
pg_uri = BaseHook.get_connection("DATAWAREHOUSE").get_uri()
mysql_uri = BaseHook.get_connection("MYSQL_CONN").get_uri()
azure_uri = BaseHook.get_connection("AZURE_CONN").get_uri()
dbrk_uri = BaseHook.get_connection("DATABRICKS_CONN").get_uri()
mask_test = BashOperator(
task_id="masking_demo_all",
bash_command=(
'echo "Postgres: $PG_URI"\n'
'echo "MySQL: $MYSQL_URI"\n'
'echo "Azure: $AZURE_URI"\n'
'echo "Databricks: $DATABRICKS_URI"'
),
env={
"PG_URI": pg_uri,
"MYSQL_URI": mysql_uri,
"AZURE_URI": azure_uri,
"DATABRICKS_URI": dbrk_uri,
},
)
return mask_test
shell_test_all_providers()
```

--
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]