CloudMigrations: Query Grafana Migration Status for status while the snapshot is in the cloud (#90314)

* implement querying gms for snapshot status

* add some documentation

* provide snapshot resources after snapshot is created

* add rate limiting to backend

* fix compilation error

* fix typo

* add unit tests

* finish merge

* lint

* swagger gen

* more testing

* remove duplicate test

* address a couple PR comments

* update switch statement to a map

* add timeouts to gms client through the http client

* remove extra whitespace

* put method back where it was so the PR is less confusing

* fix tests

* add todo

* fix final unit test
This commit is contained in:
Michael Mandrus
2024-07-15 09:22:57 -04:00
committed by GitHub
parent 5beaae8561
commit 542a1bf3ac
19 changed files with 532 additions and 125 deletions
@@ -137,7 +137,7 @@ func (m FakeServiceImpl) CreateSnapshot(ctx context.Context, user *user.SignedIn
return &cloudmigration.CloudMigrationSnapshot{
UID: "fake_uid",
SessionUID: sessionUid,
Status: cloudmigration.SnapshotStatusUnknown,
Status: cloudmigration.SnapshotStatusCreating,
}, nil
}
@@ -148,7 +148,7 @@ func (m FakeServiceImpl) GetSnapshot(ctx context.Context, query cloudmigration.G
return &cloudmigration.CloudMigrationSnapshot{
UID: "fake_uid",
SessionUID: "fake_uid",
Status: cloudmigration.SnapshotStatusUnknown,
Status: cloudmigration.SnapshotStatusCreating,
}, nil
}
@@ -160,12 +160,12 @@ func (m FakeServiceImpl) GetSnapshotList(ctx context.Context, query cloudmigrati
{
UID: "fake_uid",
SessionUID: query.SessionUID,
Status: cloudmigration.SnapshotStatusUnknown,
Status: cloudmigration.SnapshotStatusCreating,
},
{
UID: "fake_uid",
SessionUID: query.SessionUID,
Status: cloudmigration.SnapshotStatusUnknown,
Status: cloudmigration.SnapshotStatusCreating,
},
}, nil
}