Taragolis commented on code in PR #36757:
URL: https://github.com/apache/airflow/pull/36757#discussion_r1451195890


##########
airflow/providers/slack/provider.yaml:
##########
@@ -58,7 +58,7 @@ versions:
 dependencies:
   - apache-airflow>=2.6.0
   - apache-airflow-providers-common-sql>=1.3.1
-  - slack_sdk>=3.0.0
+  - slack_sdk>=3.19.0

Review Comment:
   Initial version which supports `client.file_upload_v2`: 
https://github.com/slackapi/python-slack-sdk/releases/tag/v3.19.0



##########
pyproject.toml:
##########
@@ -755,7 +755,7 @@ grpc = [
   "grpcio>=1.15.0",
 ]
 hashicorp = [
-  "hvac>=0.10",
+  "hvac>=1.1.0",

Review Comment:
   I'm not sure, but seems like this changes made by pre-commit, seems like 
changes in https://github.com/apache/airflow/pull/36532 made before we move 
into the `pyproject.toml`
   
   I think better to move this changes in the separate PR



##########
airflow/providers/slack/operators/slack.py:
##########
@@ -48,7 +52,7 @@ def __init__(
         self,
         *,
         slack_conn_id: str = SlackHook.default_conn_name,
-        method: str | None = None,
+        method: str,

Review Comment:
   method can't be `None` because `SlackHook.call` method expected `str` 
however this previously doesn't failed on static checks, my assumption due to 
the wrong signature of `SlackAPIOperator.execute` method.  After I change it to 
correct one it starts failed with an error
   
   ```console
   airflow/providers/slack/operators/slack.py:100: error: Argument 1 to "call" 
of
   "SlackHook" has incompatible type "Optional[str]"; expected "str"  [arg-type]
               self.hook.call(self.method, json=self.api_params
   ```



##########
airflow/providers/slack/operators/slack.py:
##########
@@ -90,7 +94,7 @@ def construct_api_call_params(self) -> Any:
             "SlackAPIOperator should not be used directly. Chose one of the 
subclasses instead"
         )
 
-    def execute(self, **kwargs):
+    def execute(self, context: Context):

Review Comment:
   This a bit confuse me how it works before 🙄 but it does



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

Reply via email to