Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ObjectStoragePath to exclude conn_id from storage options passed to fsspec#62701

Open
jason810496 wants to merge 4 commits intoapache:mainfrom
jason810496:fix/fix-object-storage-path-constructing-issue
Open

Fix ObjectStoragePath to exclude conn_id from storage options passed to fsspec#62701
jason810496 wants to merge 4 commits intoapache:mainfrom
jason810496:fix/fix-object-storage-path-constructing-issue

Conversation

@jason810496
Copy link
Member

@jason810496 jason810496 commented Mar 2, 2026

closes: #62691
related: #60519

Why

The fsspec doesn't understand conn_id, so we need to exclude from the storage_options.

Follow-up

Add an integration test to cover XCom ObjectStore and prevent regressions.

@jason810496 jason810496 self-assigned this Mar 3, 2026
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one qn

self._conn_id = storage_options.pop("conn_id", None)
super().__init__(*args, protocol=protocol, **storage_options)

@classmethod_or_method # type: ignore[arg-type]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the # type: ignore[arg-type] here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or Mypy will raise the following warning:

 task-sdk/src/airflow/sdk/io/path.py:120: error: Argument 1 to
  "classmethod_or_method" has incompatible type
  "Callable[[ObjectStoragePath, Any], Any]"; expected
  "def (type[Any], /, *Any, **Any) -> Any"  [arg-type]
          @classmethod_or_method

and there ins't a trivial way to fixing it. If we really need to be mypy compatible without the inline ignore, we need to re-defining all the method of parent class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task failing with AioSession.__init__() got an unexpected keyword argument 'conn_id' with xcombackend

4 participants