Apache Airflow version
2.5.3
What happened
SlackWebhookOperator.__init__ has a default arg of link_names=False. Then, SlackWebhookOperator.execute calls SlackWebhookHook explicitly with link_names=self.link_names. So SlackWebhookHook.__init__ always explicitly receives a kwarg named link_names, which triggers an unavoidable warning message.
What you think should happen instead
If the user did not instantiate SlackWebhookOperator with link_names, then link_names should not be passed to SlackWebhookHook. Then there would be no warning.
How to reproduce
Call the SlackWebhookOperator without a link_names arg. Notice the warning shows up anyway.
Operating System
image: apache/airflow:2.5.3-python3.10
Versions of Apache Airflow Providers
apache-airflow-providers-amazon==7.3.0
apache-airflow-providers-celery==3.1.0
apache-airflow-providers-cncf-kubernetes==5.2.2
apache-airflow-providers-common-sql==1.3.4
apache-airflow-providers-docker==3.5.1
apache-airflow-providers-elasticsearch==4.4.0
apache-airflow-providers-ftp==3.3.1
apache-airflow-providers-google==8.11.0
apache-airflow-providers-grpc==3.1.0
apache-airflow-providers-hashicorp==3.3.0
apache-airflow-providers-http==4.2.0
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-mysql==4.0.2
apache-airflow-providers-odbc==3.2.1
apache-airflow-providers-postgres==5.4.0
apache-airflow-providers-redis==3.1.0
apache-airflow-providers-sendgrid==3.1.0
apache-airflow-providers-sftp==4.2.4
apache-airflow-providers-slack==7.2.0
apache-airflow-providers-sqlite==3.3.1
apache-airflow-providers-ssh==3.5.0
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
Even though we're in the process of upgrading from 2.5.3 to 2.6.3, I read the code in main and believe this problem still exists.
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
2.5.3
What happened
SlackWebhookOperator.__init__has a default arg oflink_names=False. Then,SlackWebhookOperator.executecalls SlackWebhookHook explicitly withlink_names=self.link_names. SoSlackWebhookHook.__init__always explicitly receives a kwarg namedlink_names, which triggers an unavoidable warning message.What you think should happen instead
If the user did not instantiate
SlackWebhookOperatorwithlink_names, thenlink_namesshould not be passed toSlackWebhookHook. Then there would be no warning.How to reproduce
Call the
SlackWebhookOperatorwithout alink_namesarg. Notice the warning shows up anyway.Operating System
image: apache/airflow:2.5.3-python3.10
Versions of Apache Airflow Providers
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
Even though we're in the process of upgrading from 2.5.3 to 2.6.3, I read the code in main and believe this problem still exists.
Are you willing to submit PR?
Code of Conduct