Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
/mooncake-reshard @ShangmingCai @stmatengss @Bo-Vincent @zxpdemonio
/mooncake-store @ykwd @stmatengss @XucSh @YiXR
/mooncake-store/*/ha/ @Libotry @YiXR @00fish0 @Icedcoco @Aionw
/python/mooncake/buffer_pool.py @ykwd @stmatengss
/python/mooncake/ep.py @UNIDY2002 @ympcMark @yuechen-sys
/python/mooncake/mooncake_config.py @ykwd @stmatengss
/python/mooncake/mooncake_elastic_buffer.py @UNIDY2002 @ympcMark @yuechen-sys
/python/mooncake/mooncake_ep_buffer.py @UNIDY2002 @ympcMark @yuechen-sys
/python/tests/ep/ @UNIDY2002 @ympcMark @yuechen-sys
/python/tests/store/ @ykwd @stmatengss
/python/tests/unit/test_mooncake_config.py @ykwd @stmatengss
/python/mooncake/mooncake_ssd_*.py @ykwd @stmatengss
/python/mooncake/spdk_tgt_create.py @ykwd @stmatengss
/python/tests/ssd/ @ykwd @stmatengss
Expand Down
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ store:
- changed-files:
- any-glob-to-any-file:
- 'mooncake-store/**/*'
- 'python/mooncake/buffer_pool.py'
- 'python/mooncake/mooncake_config.py'
- 'python/tests/store/**/*'
- 'python/tests/unit/test_mooncake_config.py'
- 'python/mooncake/mooncake_ssd_*.py'
- 'python/mooncake/spdk_tgt_create.py'
- 'python/tests/ssd/**/*'
Expand Down
2 changes: 1 addition & 1 deletion mooncake-integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ if(NOT SKBUILD)
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../mooncake-wheel/mooncake/mooncake_store_service.py"
"${CMAKE_CURRENT_SOURCE_DIR}/../mooncake-wheel/mooncake/mooncake_config.py"
"${CMAKE_CURRENT_SOURCE_DIR}/../python/mooncake/mooncake_config.py"
"${CMAKE_CURRENT_SOURCE_DIR}/../mooncake-wheel/mooncake/cli.py"
DESTINATION ${MOONCAKE_PYTHON_INSTALL_DIR})

Expand Down
2 changes: 2 additions & 0 deletions python/tests/packaging/test_installed_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def test_wheel_imports_outside_the_repository(
import sys
import mooncake
import mooncake.engine
import mooncake.mooncake_config
import mooncake.reshard
import mooncake.store

Expand All @@ -66,6 +67,7 @@ def test_wheel_imports_outside_the_repository(
assert "administration" in metadata.metadata("mooncake-transfer-engine").get_all("Provides-Extra", [])
assert mooncake.BufferPool is mooncake.store.BufferPool
assert mooncake.engine.TransferEngine is not None
assert mooncake.mooncake_config.MooncakeConfig is not None
for ep_module in (
"ep.py",
"mooncake_ep_buffer.py",
Expand Down
22 changes: 22 additions & 0 deletions python/tests/packaging/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,28 @@ def test_ep_modules_have_one_authoritative_source() -> None:
assert not legacy_test.exists()


def test_lightweight_modules_have_one_authoritative_source() -> None:
package_root = REPOSITORY_ROOT / "python" / "mooncake"
legacy_package_root = REPOSITORY_ROOT / "mooncake-wheel" / "mooncake"

for module in ("buffer_pool.py", "mooncake_config.py"):
assert (package_root / module).is_file()
assert not (legacy_package_root / module).exists()

assert (
REPOSITORY_ROOT / "python" / "tests" / "unit" / "test_mooncake_config.py"
).is_file()
assert (
REPOSITORY_ROOT / "python" / "tests" / "store" / "test_buffer_pool_native.py"
).is_file()
assert not (
REPOSITORY_ROOT / "mooncake-wheel" / "tests" / "test_mooncake_config.py"
).exists()
assert not (
REPOSITORY_ROOT / "mooncake-wheel" / "tests" / "test_buffer_pool_native.py"
).exists()


def test_ssd_administration_modules_have_one_authoritative_source() -> None:
package_root = REPOSITORY_ROOT / "python" / "mooncake"
legacy_package_root = REPOSITORY_ROOT / "mooncake-wheel" / "mooncake"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ def test_buffer_pool_rejects_invalid_alignment() -> None:
@pytest.mark.parametrize("size", [0, 1, 128 * 1024 + 1])
def test_buffer_pool_supports_arbitrary_sizes(size: int) -> None:
store = create_store()
pool = BufferPool(
store, 1024 * 1024, max_size_class=128 * 1024, alignment=4096
)
pool = BufferPool(store, 1024 * 1024, max_size_class=128 * 1024, alignment=4096)

lease = pool.acquire(size)
assert lease.size == size
Expand Down
2 changes: 2 additions & 0 deletions scripts/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ echo "Building wheel package..."
MIGRATED_PYTHON_SOURCE_DIR="python/mooncake"
MIGRATED_PYTHON_STAGING_DIR="$(pwd)/mooncake-wheel/mooncake"
MIGRATED_PYTHON_MODULES=(
buffer_pool.py
mooncake_config.py
ep.py
mooncake_ep_buffer.py
mooncake_elastic_buffer.py
Expand Down
3 changes: 2 additions & 1 deletion scripts/test_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python -c "import mooncake.reshard.weight" && echo "Success: Reshard import succ
echo "Running import structure test..."
# Run the import structure test
cp -r mooncake-wheel/tests test_env/
cp -r python/tests/unit test_env/unit_tests
cp -r mooncake-reshard/tests test_env/reshard_tests
cp -r python/tests/ssd test_env/ssd_tests
cd test_env
Expand All @@ -46,7 +47,7 @@ python tests/test_fast_copy.py
python tests/test_import_structure.py

echo "Running mooncake config test..."
python tests/test_mooncake_config.py
python unit_tests/test_mooncake_config.py

echo "Running reshard contract tests..."
python -m pip install pytest hypothesis==6.141.0 paramiko
Expand Down
Loading