nuclearpinguin commented on a change in pull request #7234: [AIRFLOW-6493] Add SSL configuration to Redis hook connections URL: https://github.com/apache/airflow/pull/7234#discussion_r370297981
########## File path: airflow/providers/redis/hooks/redis.py ########## @@ -54,6 +58,13 @@ def get_conn(self): self.password = None if str(conn.password).lower() in ['none', 'false', ''] else conn.password self.db = conn.extra_dejson.get('db', None) + # check for ssl parameters in conn.extra + ssl_args = {} + for arg_name, arg_val in conn.extra_dejson.items(): + if arg_name in ["ssl", "ssl_cert_reqs", "ssl_ca_certs", "ssl_keyfile", "ssl_cert_file", + "ssl_check_hostname"]: + ssl_args[arg_name] = arg_val Review comment: ```python ssl_args_names = ["ssl", "ssl_cert_reqs", "ssl_ca_certs", "ssl_keyfile", "ssl_cert_file", "ssl_check_hostname"] ssl_args = {n: v for n, v conn.extra_dejson.items() if n in ssl_args_names} ``` What do you think about simplifying this? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services