You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(export): introduce StorageBackend shared base for backup/export backends
Reviewer (#dirkkul) asked for the backend choices to be discoverable from
the export API and for the Backup and Export sub-clients to feel
consistent in use. Introduce a shared abstract base record that both
features inherit from, so:
- typing 'ExportBackend.' surfaces Filesystem/S3/GCS/Azure factories from
the export entry point (mirrors the existing factories on BackupBackend);
- export-typed variables can be declared as 'StorageBackend' instead of
the misleading 'BackupBackend';
- the same concrete backend types (FilesystemBackend, ObjectStorageBackend)
flow through both BackupClient and ExportClient unchanged.
Changes:
- New: 'public abstract record StorageBackend' in Models/StorageBackend.cs
carrying the abstract Provider/Path contract that previously lived on
BackupBackend.
- Existing: 'BackupBackend : StorageBackend' — abstract members now
inherited from StorageBackend; static factories unchanged. Concrete
FilesystemBackend / ObjectStorageBackend / EmptyBackend continue to
derive from BackupBackend, so existing callers compile and behave
identically (backwards compatible).
- New: 'public abstract record ExportBackend : StorageBackend' with
static Filesystem / S3 / GCS / Azure factories that delegate to
BackupBackend's and return StorageBackend.
- Widen export-side API to StorageBackend (export feature is new in this
PR, no consumer impact): ExportCreateRequest.Backend, Export.Backend,
ExportClient.GetStatus / Cancel parameters, ParseBackend return.
Backwards compatibility:
- BackupCreateRequest.Backend stays BackupBackend.
- All concrete backend types still derive from BackupBackend.
- BackupBackend.Provider / Path remain accessible (inherited from
StorageBackend) — 'is BackupBackend' / 'as BackupBackend' checks
on FilesystemBackend / ObjectStorageBackend keep working.
- All factories on BackupBackend keep their original return types.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Weaviate.Client.Models.Export.Deconstruct(out string! Id, out Weaviate.Client.Models.BackupBackend! Backend, out string? Path, out string! StatusRaw, out string![]? Collections, out System.DateTimeOffset? StartedAt, out System.DateTimeOffset? CompletedAt, out string? Error) -> void
Weaviate.Client.Models.ExportCreateRequest.Deconstruct(out string! Id, out Weaviate.Client.Models.BackupBackend! Backend, out Weaviate.Client.Models.ExportFileFormat FileFormat, out Weaviate.Client.Internal.AutoArray<string!>? IncludeCollections, out Weaviate.Client.Internal.AutoArray<string!>? ExcludeCollections) -> void
Weaviate.Client.Models.Export.Deconstruct(out string! Id, out Weaviate.Client.Models.StorageBackend! Backend, out string? Path, out string! StatusRaw, out string![]? Collections, out System.DateTimeOffset? StartedAt, out System.DateTimeOffset? CompletedAt, out string? Error) -> void
Weaviate.Client.Models.ExportCreateRequest.Deconstruct(out string! Id, out Weaviate.Client.Models.StorageBackend! Backend, out Weaviate.Client.Models.ExportFileFormat FileFormat, out Weaviate.Client.Internal.AutoArray<string!>? IncludeCollections, out Weaviate.Client.Internal.AutoArray<string!>? ExcludeCollections) -> void
0 commit comments