Skip to content

Commit

Permalink
PMM-12913 merge ArtifactService with BackupService
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Jun 21, 2024
1 parent aeb0119 commit 74e1f9a
Show file tree
Hide file tree
Showing 33 changed files with 1,535 additions and 1,834 deletions.
2 changes: 0 additions & 2 deletions api/MIGRATION_EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,3 @@ curl -X POST -d '{"queryid": "32b9a8dbf71f9d7b202fe117ebc72ce060bf304b504dbeae74

### POST /v0/qan/ObjectDetails/ExplainFingerprintByQueryId -> POST /v1/qan:explainFingerprint
curl -X POST -d '{"queryid": "32b9a8dbf71f9d7b202fe117ebc72ce060bf304b504dbeae74da8782a5d27edf","period_start_from":"2024-05-29T23:32:25+03:00","period_start_to":"2024-05-30T11:32:25+03:00"}' http://admin:admin@127.0.0.1:8080/v1/qan:explainFingerprint

curl -X POST -d '{}' http://admin:admin@127.0.0.1:8080/v1/backups/restores:start
8 changes: 3 additions & 5 deletions api/MIGRATION_TO_V3.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@
POST /v1/management/SecurityChecks/GetCheckResults N/A ❌ Deprecated in v2 and removed in v3
POST /v1/management/SecurityChecks/ToggleCheckAlert N/A ❌ Deprecated in v2 and removed in v3

**Backups:: Artifacts** TODO: merge to BackupService
POST /v1/backup/Artifacts/List GET /v1/backups/artifacts ✅
POST /v1/backup/Artifacts/Delete DELETE /v1/backups/artifacts/{artifact_id} ✅ ?remove_files=true
POST /v1/backup/Artifacts/PITRTimeranges GET /v1/backups/artifacts/{artifact_id}/pitr-timeranges ✅

**Backups**
POST /v1/backup/Backups/ChangeScheduled PUT /v1/backups:changeScheduled
POST /v1/backup/Backups/GetLogs GET /v1/backups/{artifact_id}/logs ✅
Expand All @@ -147,6 +142,9 @@
POST /v1/backup/Backups/RemoveScheduled DELETE /v1/backups/scheduled/{scheduled_backup_id} ✅
POST /v1/backup/Backups/Schedule POST /v1/backups:schedule
POST /v1/backup/Backups/Start POST /v1/backups:start
POST /v1/backup/Artifacts/List GET /v1/backups/artifacts ✅
POST /v1/backup/Artifacts/Delete DELETE /v1/backups/artifacts/{artifact_id} ✅ ?remove_files=true
POST /v1/backup/Artifacts/PITRTimeranges GET /v1/backups/artifacts/{artifact_id}/pitr-timeranges ✅

**Backups:: Locations**
POST /v1/backup/Locations/Add POST /v1/backups/locations ✅
Expand Down
258 changes: 103 additions & 155 deletions api/backup/v1/artifacts.pb.go

Large diffs are not rendered by default.

365 changes: 0 additions & 365 deletions api/backup/v1/artifacts.pb.gw.go

This file was deleted.

31 changes: 0 additions & 31 deletions api/backup/v1/artifacts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ syntax = "proto3";
package backup.v1;

import "backup/v1/common.proto";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";

// BackupStatus shows the current status of execution of backup.
Expand Down Expand Up @@ -83,32 +81,3 @@ message ListPitrTimerangesRequest {
message ListPitrTimerangesResponse {
repeated PitrTimerange timeranges = 1;
}

// Artifacts service provides public methods for managing backup artifacts.
service ArtifactsService {
// ListArtifacts returns a list of all backup artifacts.
rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) {
option (google.api.http) = {get: "/v1/backups/artifacts"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List artifacts"
description: "Return a list of backup artifacts."
};
}
// DeleteArtifact deletes specified artifact.
rpc DeleteArtifact(DeleteArtifactRequest) returns (DeleteArtifactResponse) {
option (google.api.http) = {delete: "/v1/backups/artifacts/{artifact_id}"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Delete Artifact"
description: "Deletes an artifact."
};
}

// ListPitrTimeranges list the available MongoDB PITR timeranges in a given backup location
rpc ListPitrTimeranges(ListPitrTimerangesRequest) returns (ListPitrTimerangesResponse) {
option (google.api.http) = {get: "/v1/backups/artifacts/{artifact_id}/pitr-timeranges"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List PITR Timeranges"
description: "Return a list of available MongoDB point-in-time-recovery timeranges."
};
}
}
191 changes: 0 additions & 191 deletions api/backup/v1/artifacts_grpc.pb.go

This file was deleted.

Loading

0 comments on commit 74e1f9a

Please sign in to comment.