Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Aug 13, 2025

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 BackupGetter joins the public API for the TS client.

@bevzzz bevzzz requested a review from tsmith023 August 13, 2025 11:13
Copy link

@orca-security-eu orca-security-eu bot left a 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
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz force-pushed the feat/list-backups branch from 0af812d to b39aa04 Compare August 13, 2025 11:14
@tsmith023
Copy link
Collaborator

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 list method to the interface here

@bevzzz bevzzz force-pushed the feat/list-backups branch from e9d77d9 to 600be34 Compare August 21, 2025 19:42
Comment on lines +92 to +107

// 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));
}
Copy link
Collaborator Author

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.

@bevzzz
Copy link
Collaborator Author

bevzzz commented Aug 21, 2025

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 list method to the interface here

My bad @tsmith023, I forgot we had v2 in the same repo. I stripped the old code away and added the list() endpoint under src/collections/backup.

@bevzzz bevzzz changed the title feat: add BackupGetter to the public API feat: support list backups Aug 28, 2025
@bevzzz bevzzz merged commit 8762b65 into main Aug 28, 2025
18 checks passed
@bevzzz bevzzz deleted the feat/list-backups branch August 28, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants