Repository navigation
[Wheel] Migrate structured object storage to unified package - #3633
Merged
Merged
Conversation
Aionw
requested review from
Ann-1024,
ShangmingCai,
luketong777,
stmatengss,
ykwd and
zxpdemonio
as code owners
August 24, 2026 08:51
Conflict resolutions: - .github/CODEOWNERS: keep the structured_object_store.py and _fast_copy.c owners ahead of main's migrated python/ entries; drop the per-file python/tests/store/ entries now covered by main's /python/tests/store/. - .github/labeler.yml: keep both sides; drop this branch's python/tests/store entries from the store and Tests labels (covered by main's python/tests/store/**/* and python/tests/**/* globs). - scripts/build_wheel.sh: add structured_object_store.py and _fast_copy.c to main's multi-line MIGRATED_PYTHON_MODULES list. - scripts/test_installation.sh: keep both the test_fast_copy.py copy and main's ssd_tests copy. - python/tests/packaging/test_installed_wheel.py: fold the structured-object assertions into main's parametrized unified/legacy smoke test, reuse its installed_files set, and install numpy/pillow directly for the legacy wheel, which has no structured extra. - python/tests/packaging/test_project.py: keep both sides; parse the multi-line MIGRATED_PYTHON_MODULES list like the sibling tests, and drop structured_object_store.py from the list of legacy-supplied modules.
…cy test fallback The migrated files count as fully changed for the changed-lines ruff check, so format them with ruff 0.6.9 (the result equals ruff format of main's legacy-path copies). Let mooncake-wheel/tests/conftest.py extend mooncake.__path__ for both the unified source package and the legacy tree, so legacy-only helpers such as mooncake._partial_read stay importable from source.
main's /python/tests/store/ entry (#3586) would otherwise drop @zxpdemonio from the two migrated structured-object tests. Place the per-file entries after it so they take effect.
17 of 34 tasks
8 of 32 tasks
ykwd
approved these changes
Oct 14, 2026
8 of 13 tasks
8 of 36 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the structured-object storage increment of RFC #3534 Phase 2.
mooncake.structured_object_storeand its_fast_copyC source intopython/mooncakeas the sole tracked source;python/tests/store;_fast_copyfrom its canonical source through the root CMake/PEP 517 build;The public
mooncake.structured_object_storeandmooncake._fast_copypaths and behavior are unchanged. This PR does not migratedataproto_catalog.py, rename native extensions, redesign Store APIs, or perform the release/backend cutover.Overlap and conflict risk
mainsince this PR was opened; the 2026-09-28 merge ofmain(d9152a4) carries their changes to the newpython/paths through rename detection. This PR does not duplicate any of that work: apart fromruff format(see below), both large files are identical tomain's legacy copies. [Bugfix][Wheel] Preserve PIL image state in structured transfer #3412 is still open and patches the legacystructured_object_store.pyand its test, so it will need to target the newpython/paths if this migration merges first.ruff format0.6.9 change to the legacystructured_object_store.pyand its test; the formatting hunks here are identical, so whichever PR lands second drops them.from mooncake._partial_read import ...tostructured_object_store.py._partial_read.pyand its test stay inmooncake-wheel/for now: the unified wheel installs legacy-tree modules throughpython/CMakeLists.txt, the legacy builder builds frommooncake-wheel/, andmooncake-wheel/tests/conftest.pynow extendsmooncake.__path__to both source trees. It can move in a later increment.main; this branch includes them through itsmainsyncs, most recently the 2026-09-28 merge ofmain(d9152a4). [Reshard] Migrate to unified Python package #3585 (Reshard) is still open and remains out of scope.After merging
main, the rename-aware diff is 596 additions and 275 deletions (871 total), covered by RFC #3534. Of that, 484 additions and 264 deletions areruff formaton the two moved Python files; the migration itself is 112 additions and 11 deletions.Closes no issue; contributes to #3534.
Module
mooncake-transfer-engine)mooncake-store)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Original submission (before merging
mainon 2026-09-28; superseded by "After mergingmain" below). Since #3586 movedbuffer_pool.py,python/must come beforemooncake-wheel/onPYTHONPATH:Test commands:
Test results:
twine checkpassed; isolated installed-wheel test passed. The no-dependency phase verified core import without NumPy/Pillow, then the structured extra was installed and both the canonical Python module and compiled_fast_copyhelper were smoke-tested outside the repository.mooncake/structured_object_store.pyand_fast_copy.cpython-310-x86_64-linux-gnu.so;_fast_copy.candtest_fast_copy.pyare 100% renames, and the two formatted Python files are 95%/96% renames whose content equalsruff formatofmain's legacy copies.Originally,
ruff-formatchanges to the two moved Python files were reverted to keep the diff migration-only. Since #3567 added CI's changed-lines Python format check, which treats moved files as fully changed, both files are now formatted with ruff 0.6.9. The result is exactlyruff formatapplied tomain's legacy copies, so it can be checked mechanically, and the PR-scoped pre-commit command now passes every hook.After merging
main(d9152a4, 2026-09-28):PYTHONPATH=python:mooncake-wheel python -m pytest -q \ python/tests/store/test_structured_object_store.py python/tests/store/test_fast_copy.py \ mooncake-wheel/tests/test_partial_read.py mooncake-wheel/tests/test_dataproto_catalog.py \ python/tests/packaging PYTHONPATH=python python -m pytest -q \ mooncake-wheel/tests/test_partial_read.py mooncake-wheel/tests/test_dataproto_catalog.py pre-commit run --files $(git diff --name-only --diff-filter=ACMR origin/main...HEAD)mooncake.store, a built_fast_copy, or built wheels. WithPYTHONPATH=pythononly, the legacy-tree tests pass (25 passed), the same as onmain..github/CODEOWNERS,.github/labeler.yml,scripts/build_wheel.sh,scripts/test_installation.sh,python/tests/packaging/test_installed_wheel.py,python/tests/packaging/test_project.pywere resolved by keeping both sides.structured_object_store.pyis removed from the legacy-module list intest_scikit_build_consumes_unified_python_sources; the installed-wheel structured smoke test installs the[structured]extra for the unified wheel andnumpy/pillowdirectly for the legacy wheel, becausemain's installed-wheel test is now parametrized over both wheels and the legacy wheel declares nostructuredextra; and the per-filestore/Testslabel entries forpython/tests/store/are dropped becausemain's globs cover them.ruff formaton the two moved Python files (see above);mooncake-wheel/tests/conftest.pyprobes both source trees so legacy-only modules such asmooncake._partial_readstay importable from source; and the per-file CODEOWNERS entries for the two moved tests now sit aftermain's/python/tests/store/ @ykwd @stmatengssentry, so they still take effect and keep @zxpdemonio.ruff checkplusscripts/ci/check_changed_python_format.py, ruff 0.6.9) passes.twine check, and installed-wheel smoke runs from the original submission were not repeated after the merge. CI does not run them either (it builds only the legacyscripts/build_wheel.shwheel and runsscripts/test_installation.sh), so they still need a rerun.Checklist
./scripts/code_format.sh(the staged C/C++ hook passed;_fast_copy.cis unchanged)AI Assistance Disclosure
OpenAI Codex assisted with the migration, overlap review, build and packaging updates, validation, diff review, and PR preparation. The human submitter remains responsible for reviewing every changed line and defending the change end to end.
Claude Code (Anthropic) merged
maininto this branch on 2026-09-28, resolved the conflicts, added follow-up commits for theruff formatof the two moved Python files, themooncake-wheel/tests/conftest.pyfallback, and the test CODEOWNERS entries, re-ran the focused tests listed under "After mergingmain", and updated this description.