-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: allow deleting v0 from version file & correctly propagate errors on DeleteCollectionVersion
#4579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -131,6 +133,7 @@ func convertToCreateCollectionModel(req *coordinatorpb.CreateCollectionRequest) | |||
GetOrCreate: req.GetGetOrCreate(), | |||
TenantID: req.GetTenant(), | |||
DatabaseName: req.GetDatabase(), | |||
Ts: time.Now().Unix(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prior to this, v0 in the version file always had created_at_secs: 0
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
7a408ad
to
c3dbe3a
Compare
ea5808a
to
491f743
Compare
c3dbe3a
to
40357ea
Compare
491f743
to
9007b34
Compare
40357ea
to
aa00a67
Compare
9007b34
to
b2ad54c
Compare
DeleteCollectionVersion
b2ad54c
to
7f84029
Compare
DeleteCollectionVersion
DeleteCollectionVersion
Enable Deletion of v0 from Version File & Improve Error Propagation in DeleteCollectionVersion This PR updates logic so that version 0 (v0) can be deleted from the version file where previously it could not, and ensures errors arising during DeleteCollectionVersion are correctly propagated to the caller. It also includes some adjustments to method signatures and tests to reflect the improved error handling, and minor adjustments in related Rust and Go code to support the new behavior. Key Changes: Affected Areas: This summary was automatically generated by @propel-code-bot |
7f84029
to
98433a2
Compare
@@ -759,7 +759,7 @@ func TestCatalog_DeleteCollectionVersion_CollectionNotFound(t *testing.T) { | |||
resp, err := catalog.DeleteCollectionVersion(context.Background(), req) | |||
|
|||
// Verify results | |||
assert.NoError(t, err) | |||
assert.Error(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[BestPractice]
The code is returning a successful response (assert.NoError(t, err)
) even when the collection does not exist, but that seems to conflict with the implementation which now returns the first error encountered. The test should expect an error in this case.
aa00a67
to
a124ff5
Compare
98433a2
to
1d4c6d1
Compare
a124ff5
to
20cf4db
Compare
1d4c6d1
to
7d21e46
Compare
20cf4db
to
100a8d5
Compare
7d21e46
to
3cbfa34
Compare
100a8d5
to
9accc22
Compare
3cbfa34
to
7d4d78b
Compare
4b76db0
to
43ad358
Compare
7d4d78b
to
dbab3d2
Compare
dbab3d2
to
68b21f3
Compare
43ad358
to
1676e9e
Compare
68b21f3
to
8f416dd
Compare
Merge activity
|
Description of changes
Prior to this change, v0 could not be deleted from a version file. This also correctly propagates errors for the
DeleteCollectionVersion
method.Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?
n/a