Skip to content

Fixed ray session fixture for uv run#3321

Closed
jx2lee wants to merge 1 commit intoapache:mainfrom
jx2lee:jx2lee/ray-uv-run-fixture
Closed

Fixed ray session fixture for uv run#3321
jx2lee wants to merge 1 commit intoapache:mainfrom
jx2lee:jx2lee/ray-uv-run-fixture

Conversation

@jx2lee
Copy link
Copy Markdown
Contributor

@jx2lee jx2lee commented May 3, 2026

Summary

Closes #3318. (cc. @Fokko)

  • use a temporary working directory for the session-scoped Ray fixture
  • disable Ray's uv runtime-env hook before importing Ray in ray_session

Testing

  • uv run pytest tests/integration/test_reads.py -m integration -k 'test_ray_' -vv

before upgrading

❯ uv run pytest tests/integration/test_reads.py -m integration -k 'test_ray_'; uv pip list | grep ray
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.10.19, pytest-9.0.3, pluggy-1.6.0
rootdir: /Users/jj/workspace/opensource/iceberg-python
configfile: pyproject.toml
plugins: mock-3.15.1, anyio-4.11.0, lazy-fixtures-1.4.0, checkdocs-2.14.0, requests-mock-1.12.1
collected 109 items / 101 deselected / 8 selected

tests/integration/test_reads.py ....ss..                                                                                                                 [100%]

======================================================== 6 passed, 2 skipped, 101 deselected in 15.67s =========================================================
aws-xray-sdk                  2.15.0
ray                           2.54.1

after,

❯ uv run pytest tests/integration/test_reads.py -m integration -k 'test_ray_'; uv pip list | grep ray
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.10.19, pytest-9.0.3, pluggy-1.6.0
rootdir: /Users/jj/workspace/opensource/iceberg-python
configfile: pyproject.toml
plugins: mock-3.15.1, anyio-4.11.0, lazy-fixtures-1.4.0, checkdocs-2.14.0, requests-mock-1.12.1
collected 109 items / 101 deselected / 8 selected

tests/integration/test_reads.py ....ss..                                                                                                                 [100%]

======================================================== 6 passed, 2 skipped, 101 deselected in 15.01s =========================================================
aws-xray-sdk                  2.15.0
ray                           2.55.1

@jx2lee jx2lee force-pushed the jx2lee/ray-uv-run-fixture branch from 000e966 to f75a3a3 Compare May 3, 2026 12:40
@jx2lee jx2lee changed the title Test: fix Ray session fixture for uv run fixed Ray session fixture for uv run May 3, 2026
@jx2lee jx2lee changed the title fixed Ray session fixture for uv run Fixed ray session fixture for uv run May 3, 2026
@kevinjqliu
Copy link
Copy Markdown
Contributor

Thanks @jx2lee this issue is fixed in https://github.com/apache/iceberg-python/pull/3299/files#diff-e52e4ddd58b7ef887ab03c04116e676f6280b824ab7469d5d3080e5cba4f2128R3032-R3038

@kevinjqliu kevinjqliu closed this May 3, 2026
@jx2lee jx2lee deleted the jx2lee/ray-uv-run-fixture branch May 4, 2026 10:39
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.

Update Ray to the latest version

2 participants