uranusjr commented on code in PR #23891:
URL: https://github.com/apache/airflow/pull/23891#discussion_r881243996


##########
airflow/providers/alibaba/cloud/hooks/oss.py:
##########
@@ -43,11 +43,12 @@ def provide_bucket_name(func: T) -> T:
     def wrapper(*args, **kwargs) -> T:
         bound_args = function_signature.bind(*args, **kwargs)
         self = args[0]
-        if 'bucket_name' not in bound_args.arguments or 
bound_args.arguments['bucket_name'] is None:
-            if self.oss_conn_id:
-                connection = self.get_connection(self.oss_conn_id)
-                if connection.schema:
-                    bound_args.arguments['bucket_name'] = connection.schema
+        if (
+            'bucket_name' not in bound_args.arguments or 
bound_args.arguments['bucket_name'] is None
+        ) and self.oss_conn_id:

Review Comment:
   ```suggestion
           if bound_args.arguments.get('bucket_name') is None and 
self.oss_conn_id:
   ```



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