-
Notifications
You must be signed in to change notification settings - Fork 30
feat: support list backups #330
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
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.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
0af812d to
b39aa04
Compare
|
This code looks to be relevant only to the old v2 client, which we haven't released a new version of for a year. For the v3 client, we'd need to add a |
e9d77d9 to
600be34
Compare
|
|
||
| // wait to complete so that other tests can run without colliding with Weaviate's lack of simultaneous backups | ||
| let wait = true; | ||
| while (wait) { | ||
| const { status, error } = await collection.backup.getCreateStatus({ | ||
| backupId: res.id as string, | ||
| backend: res.backend as Backend, | ||
| }); | ||
| if (status === 'SUCCESS') { | ||
| wait = false; | ||
| } | ||
| if (status === 'FAILED') { | ||
| throw new Error(`Backup creation failed: ${error}`); | ||
| } | ||
| await new Promise((resolve) => setTimeout(resolve, 1000)); | ||
| } |
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.
Added this wait to make sure the in-progress backup does not interfere with any tests that might follow.
My bad @tsmith023, I forgot we had v2 in the same repo. I stripped the old code away and added the |
Weaviate 1.32 supports listing all backups for a backend. This functionality's already been implemented in the client, but we've refrained from exporting before.
Now
BackupGetterjoins the public API for the TS client.