Skip to content

v6: Backups API#346

Open
bevzzz wants to merge 9 commits intov6-collectionsfrom
v6-backups
Open

v6: Backups API#346
bevzzz wants to merge 9 commits intov6-collectionsfrom
v6-backups

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Mar 4, 2026

Merge #339 to reduce diff.

This PR adds Backup API with support for all features from v1.36 (cancel restore, incremental backups) and previous releases.

Key changes:

  • backup/client.go - new namespaced client, i.e. the public API
  • internal/api/backup.go - implementation of the supported REST requests
  • backup/wait.go - AwaitSuccess and AwaitStatus utils
  • backup/client_test.go, backup/wait_test.go, internal/api/endpoint_test.go -- unit tests

Miscellaneous:

  • internal/testkit/context.go - adds "ticking context", which expires after Done has been called a certain number of times. Useful for mocking context timeouts at fine granularity.
  • ErrorIs in internal/testkit/error.go is similar to the ExpectError but allows asserting specific a concrete error type.

@bevzzz bevzzz changed the base branch from main to v6 March 4, 2026 12:05
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 115   low 594   info 611 View in Orca
Passed Warning SAST high 1   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
🛡️ The following IaC misconfigurations have been detected
NAME FILE
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info JSON '$ref' alongside other properties ...st/schema.check.json View in code
info Empty Array .../rest/schema.v3.yaml View in code
... ... ... ...
🛡️ The following SAST misconfigurations have been detected
NAME FILE
high Leaky Use of time.After in for-select Statements backup/wait.go View in code

Note: The scan should have failed if no policies were configured in warn-only mode.

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 Secrets high 0   medium 0   low 0   info 0 View in Orca

Copy link
Collaborator

@tsmith023 tsmith023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: should this branch be targeting v6-collections rather than v6 since it includes the collections/ directory?

@bevzzz bevzzz changed the base branch from v6 to v6-new-client March 16, 2026 09:29
Base automatically changed from v6-new-client to v6-collections March 18, 2026 15:00
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.

2 participants