Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions cmd/ateapi/internal/controlapi/workflow_pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ func (s *CallAteletPauseStep) Execute(ctx context.Context, input *PauseInput, st
}

req := &ateletpb.CheckpointRequest{
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorTemplateNamespace: state.Actor.GetActorTemplateNamespace(),
ActorTemplateName: state.Actor.GetActorTemplateName(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: &ateletpb.WorkloadSpec{
PauseImage: state.ActorTemplate.Spec.PauseImage,
},
Expand Down
32 changes: 13 additions & 19 deletions cmd/ateapi/internal/controlapi/workflow_resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,10 @@ func (s *CallAteletRestoreStep) Execute(ctx context.Context, input *ResumeInput,
slog.InfoContext(ctx, "Actor has snapshot; Restoring from snapshot")

req := &ateletpb.RestoreRequest{
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorTemplateNamespace: state.Actor.GetActorTemplateNamespace(),
ActorTemplateName: state.Actor.GetActorTemplateName(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
}
switch state.Actor.GetLatestSnapshotInfo().GetType() {
case ateapipb.SnapshotType_SNAPSHOT_TYPE_LOCAL:
Expand Down Expand Up @@ -243,13 +241,11 @@ func (s *CallAteletRestoreStep) Execute(ctx context.Context, input *ResumeInput,
snapshot := state.ActorTemplate.Status.GoldenSnapshot

req := &ateletpb.RestoreRequest{
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorTemplateNamespace: state.Actor.GetActorTemplateNamespace(),
ActorTemplateName: state.Actor.GetActorTemplateName(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
Config: &ateletpb.RestoreRequest_ExternalConfig{
ExternalConfig: &ateletpb.ExternalCheckpointConfiguration{
SnapshotUriPrefix: snapshot,
Expand All @@ -264,12 +260,10 @@ func (s *CallAteletRestoreStep) Execute(ctx context.Context, input *ResumeInput,
} else {
slog.InfoContext(ctx, "Actor has no snapshot; ActorTemplate has no golden snapshot; Booting from ActorTemplate spec")
req := &ateletpb.RunRequest{
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorTemplateNamespace: state.Actor.GetActorTemplateNamespace(),
ActorTemplateName: state.Actor.GetActorTemplateName(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: workloadSpec,
}
_, err = client.Run(ctx, req)
if err != nil {
Expand Down
8 changes: 3 additions & 5 deletions cmd/ateapi/internal/controlapi/workflow_suspend.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,9 @@ func (s *CallAteletSuspendStep) Execute(ctx context.Context, input *SuspendInput
}

req := &ateletpb.CheckpointRequest{
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorTemplateNamespace: state.Actor.GetActorTemplateNamespace(),
ActorTemplateName: state.Actor.GetActorTemplateName(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
TargetAteomUid: state.Actor.GetAteomPodUid(),
ActorId: state.Actor.GetActorId(),
Runsc: runscCfg,
Spec: &ateletpb.WorkloadSpec{
PauseImage: state.ActorTemplate.Spec.PauseImage,
},
Expand Down
Loading
Loading