Skip to content

Fix fsspec S3 virtual addressing boolean parsing#3492

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/fsspec-s3-virtual-addressing-bool
Open

Fix fsspec S3 virtual addressing boolean parsing#3492
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/fsspec-s3-virtual-addressing-bool

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Rationale for this change

FsspecFileIO checked s3.force-virtual-addressing with raw property truthiness. That meant "false" still enabled virtual-host addressing because it is a non-empty string.

This changes the fsspec S3 setup to use the existing boolean property parser, matching the rest of the codebase and preserving the default behavior when the property is absent.

Are these changes tested?

  • PYTHONPATH=. uv run --extra s3fs pytest tests/io/test_fsspec.py::test_fsspec_s3_session_properties_force_virtual_addressing
  • PYTHONPATH=. uv run --extra s3fs pytest tests/io/test_fsspec.py -k "s3_session_properties"
  • uv run prek run ruff --files pyiceberg/io/fsspec.py tests/io/test_fsspec.py
  • uv run prek run ruff-format --files pyiceberg/io/fsspec.py tests/io/test_fsspec.py

Are there any user-facing changes?

Yes. Setting s3.force-virtual-addressing=false for fsspec S3 FileIO now leaves the default addressing behavior unchanged instead of forcing virtual addressing.

@ebyhr ebyhr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. I've confirmed that the added test fails without this PR's change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants