-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
Description
Apache Airflow Provider(s)
redis
Versions of Apache Airflow Providers
apache-airflow-providers-redis==3.5.0 (latest)
Apache Airflow version
2.8.0
Operating System
Debian GNU/Linux
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
What happened
When trying to use the RedisHook with SSL, the Redis client fails to instantiate due to misconfiguration of the ssl_cert_file which is not exist in the python redis library.
Instead it should be ssl_certfile, you can click here to see an examle in the redis docs.
When instantiating a RedisHook with SSL, the following error occurs:

The task obviously fails after this exception.
Full logs here:
dag_id=dummy_redis_run_id=manual__2024-01-03T09_14_02+00_00_task_id=dummy_redis_task_attempt=1.log
What you think should happen instead
The RedisHook instantiation should work with SSL.
How to reproduce
To reproduce do the following:
- Create the following connection:
You can copy the extra from here:
{
"db": 0,
"ssl": true,
"ssl_cert_reqs": "required",
"ssl_cert_file": "/tmp",
"ssl_check_hostname": false
}
- Run the following DAG:
from datetime import datetime, timedelta
from airflow import DAG
from airflow.providers.redis.operators.redis_publish import RedisPublishOperator
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2023, 1, 1),
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
with DAG(
'dummy_redis',
default_args=default_args,
schedule=None,
) as dag:
dummy_redis = RedisPublishOperator(
task_id="dummy_redis_task",
channel="dummy",
message="hello",
redis_conn_id="test_redis",
)
- Run the DAG and wait for it to fail.
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