jason810496 commented on code in PR #62701:
URL: https://github.com/apache/airflow/pull/62701#discussion_r2872121052


##########
task-sdk/src/airflow/sdk/io/path.py:
##########
@@ -111,7 +111,11 @@ def __init__(
         # override conn_id if explicitly provided
         if conn_id is not None:
             storage_options["conn_id"] = conn_id
-        super().__init__(*args, protocol=protocol, **storage_options)
+
+        # pop conn_id before calling super to prevent it from being passed
+        # to the underlying fsspec filesystem, which doesn't understand it
+        storage_options_without_conn_id = {k: v for k, v in 
storage_options.items() if k != "conn_id"}
+        super().__init__(*args, protocol=protocol, 
**storage_options_without_conn_id)

Review Comment:
   I had tried this approach. However, we still required `conn_id` like
   
   
https://github.com/apache/airflow/blob/7b8a9674d6dda78d08876a1b59c486d810d7b976/task-sdk/src/airflow/sdk/io/path.py#L120-L142
   
   I moved `conn_id` as attribute in last try but encounter no `conn_id` 
attribute for `ObjectStoragePath` error, so I decide to go with current 
approach, which is simpler.



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