Skip to content

Conversation

@weiliu1031
Copy link
Contributor

This commit implements comprehensive snapshot management functionality in pymilvus, enabling users to create, list, describe, restore, and delete collection snapshots for backup and disaster recovery purposes.

Changes include:

  • Add 7 snapshot request builders in Prepare class with parameter validation for snapshot_name, collection_name, and job_id
  • Implement snapshot APIs in GrpcHandler (sync) and AsyncGrpcHandler:
    • create_snapshot: Create a snapshot for a collection
    • drop_snapshot: Delete an existing snapshot
    • list_snapshots: List snapshot names by collection
    • describe_snapshot: Get detailed snapshot information
    • restore_snapshot: Restore snapshot to a new collection
    • get_restore_snapshot_state: Monitor restore job progress
    • list_restore_snapshot_jobs: List all restore jobs
  • Add public APIs in MilvusClient and AsyncMilvusClient with comprehensive docstrings and usage examples

This commit implements comprehensive snapshot management functionality
in pymilvus, enabling users to create, list, describe, restore, and
delete collection snapshots for backup and disaster recovery purposes.

Changes include:

- Add 7 snapshot request builders in Prepare class with parameter
  validation for snapshot_name, collection_name, and job_id
- Implement snapshot APIs in GrpcHandler (sync) and AsyncGrpcHandler:
  * create_snapshot: Create a snapshot for a collection
  * drop_snapshot: Delete an existing snapshot
  * list_snapshots: List snapshot names by collection
  * describe_snapshot: Get detailed snapshot information
  * restore_snapshot: Restore snapshot to a new collection
  * get_restore_snapshot_state: Monitor restore job progress
  * list_restore_snapshot_jobs: List all restore jobs
- Add public APIs in MilvusClient and AsyncMilvusClient with
  comprehensive docstrings and usage examples

Signed-off-by: Wei Liu <[email protected]>
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weiliu1031
To complete the pull request process, please assign tedxu after the PR has been reviewed.
You can assign the PR to them by writing /assign @tedxu in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 47.67025% with 146 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@ea4aec4). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pymilvus/grpc_gen/schema_pb2.py 2.89% 67 Missing ⚠️
pymilvus/grpc_gen/common_pb2.py 6.06% 31 Missing ⚠️
pymilvus/client/grpc_handler.py 34.14% 27 Missing ⚠️
pymilvus/milvus_client/async_milvus_client.py 33.33% 14 Missing ⚠️
pymilvus/grpc_gen/msg_pb2.py 20.00% 4 Missing ⚠️
pymilvus/grpc_gen/feder_pb2.py 33.33% 2 Missing ⚠️
pymilvus/grpc_gen/rg_pb2.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3083   +/-   ##
=========================================
  Coverage          ?   45.24%           
=========================================
  Files             ?       65           
  Lines             ?    14063           
  Branches          ?        0           
=========================================
  Hits              ?     6363           
  Misses            ?     7700           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants