CloudMigrations: Bulk update local resources (#96002)

* wip

* make tests pass

* get all tests passing

* fixes

* some small cleanup

* fix test

* convert delimiter keys to struct keys

* dont execute empty sql statement

* remove printlns

* fix unit test

* a bit more cleanup

* whoops
This commit is contained in:
Michael Mandrus
2025-01-10 14:42:18 -05:00
committed by GitHub
parent 99a0eb825d
commit c9d22f06c3
9 changed files with 139 additions and 63 deletions

View File

@ -612,10 +612,10 @@ func (s *Service) GetSnapshot(ctx context.Context, query cloudmigration.GetSnaps
// We need to update the snapshot in our db before reporting anything
if err := s.store.UpdateSnapshot(ctx, cloudmigration.UpdateSnapshotCmd{
UID: snapshot.UID,
SessionID: sessionUid,
Status: localStatus,
Resources: resources,
UID: snapshot.UID,
SessionID: sessionUid,
Status: localStatus,
CloudResourcesToUpdate: resources,
}); err != nil {
return nil, fmt.Errorf("error updating snapshot status: %w", err)
}