feat: add missing database operation kinds to filter#3860
feat: add missing database operation kinds to filter#3860
Conversation
|
@copilot actually, consult with this PR: ydb-platform/ydb#39161 and add all missing pieces (not just compaction). btw, "incbackup" means "Incremental Backup". |
|
@copilot and name the PR properly - according to commitlint |
Added the remaining kinds from ydb#39161: |
I don't have permissions to rename the PR title from here. Could you rename it to something like |
|
@copilot look for other metadata descriptions for new operation types in protobufs here: https://github.com/ydb-platform/ydb/tree/main/ydb/public/api/protos |
Added metadata interfaces for the remaining new kinds in e7aa073, sourced from the YDB protos:
FS variants reuse the items_progress-based percentage logic alongside the S3/YT cases. |
The Operations list supports filtering by
kind, but several kinds exposed by the YDB API (e.g./operation/list?kind=compaction) were missing from the UI, leaving those operations unviewable. This PR adds all kinds enumerated in ydb#39161 that were previously absent, along with the corresponding metadata interfaces from the YDB protobufs.Type layer (
src/types/api/operations.ts)OperationKindunion with'compaction','export','export/nfs','import/nfs','incbackup', and'restore'OPERATION_METADATA_TYPE_URLS:Compact→type.googleapis.com/Ydb.Table.CompactMetadataImportFromFs→type.googleapis.com/Ydb.Import.ImportFromFsMetadataExportToFs→type.googleapis.com/Ydb.Export.ExportToFsMetadataIncrementalBackup→type.googleapis.com/Ydb.Backup.IncrementalBackupMetadataRestore→type.googleapis.com/Ydb.Backup.RestoreMetadataTOperationMetadata:CompactMetadata(path,cascade,state, numericprogress,shards_done/total,max_shards_in_flight)ImportFromFsMetadata/ExportToFsMetadata— settings withbase_path+items[], plusprogressenum anditems_progress[](analogous to the S3/YT variants)IncrementalBackupMetadata/RestoreMetadata—progress(BackupProgressenum) and numericprogress_percent(0–100)BackupProgressenum mirroringYdb.Backup.BackupProgressOperations UI (
src/containers/Operations/)OPERATION_KINDS, theuseOperationsQueryParamsZod enum, and i18n (kind_compaction,kind_export,kind_export_nfs,kind_import_nfs,kind_incbackuprendered as "Incremental Backup",kind_restore)isCompactMetadata,isImportFromFsMetadata,isExportToFsMetadata,isIncrementalBackupMetadata,isRestoreMetadataisImportExportMetadatanow also covers the FS variants, so the existingitems_progress-based percentage calculation applies toimport/nfsandexport/nfsgetOperationProgress:progressfor compaction (folded into the existing buildindex branch since the shape matches)progress_percentforincbackup/restore, falling back to theBackupProgressenum via the existing i18n keysstatecolumn forcompactionalongsidebuildindex