Skip to content
Merged
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
14 changes: 7 additions & 7 deletions cmd/ateapi/internal/controlapi/workflow_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ func (w *ActorWorkflow) ensureAteletTerminated(ctx context.Context, actorRef res
}

req := &ateletpb.TerminateRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorUid: actor.GetMetadata().GetUid(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
Spec: workloadSpec,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorUid: actor.GetMetadata().GetUid(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
Spec: workloadSpec,
}

if _, err := client.Terminate(ctx, req); err != nil {
Expand Down
14 changes: 7 additions & 7 deletions cmd/ateapi/internal/controlapi/workflow_pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ func (w *ActorWorkflow) ensureAteletPaused(ctx context.Context, actorRef resourc
// actor is currently running (recorded on-node at Run/Restore) and pins it
// into the snapshot manifest.
req := &ateletpb.CheckpointRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
Config: &ateletpb.CheckpointRequest_LocalConfig{
LocalConfig: &ateletpb.LocalCheckpointConfiguration{
SnapshotName: actor.GetStatus().GetInProgressLocalSnapshotName(),
Expand Down
56 changes: 28 additions & 28 deletions cmd/ateapi/internal/controlapi/workflow_resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,16 +683,16 @@ func (w *ActorWorkflow) ensureAteletRestored(ctx context.Context, actorRef resou
tele.SnapshotKind = ateattr.SnapshotKindLocal

req := &ateletpb.RestoreRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
Spec: workloadSpec,
ActorUid: actor.GetMetadata().Uid,
EgressGateway: egressGateway,
CpuMilli: cpuMilli,
MemoryBytes: memBytes,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
Spec: workloadSpec,
ActorUid: actor.GetMetadata().Uid,
EgressGateway: egressGateway,
CpuMilli: cpuMilli,
MemoryBytes: memBytes,
}
req.Type = ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL
req.Config = &ateletpb.RestoreRequest_LocalConfig{
Expand Down Expand Up @@ -731,13 +731,13 @@ func (w *ActorWorkflow) ensureAteletRestored(ctx context.Context, actorRef resou
}
tele.WireSnapshotScope = ateattr.SnapshotScopeValue(scope)
req := &ateletpb.RestoreRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
Config: &ateletpb.RestoreRequest_ExternalConfig{
ExternalConfig: &ateletpb.ExternalCheckpointConfiguration{
SnapshotUri: src.SnapshotURI.String(),
Expand Down Expand Up @@ -766,17 +766,17 @@ func (w *ActorWorkflow) ensureAteletRestored(ctx context.Context, actorRef resou
}

req := &ateletpb.RunRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
SandboxAssets: sandboxAssets,
Spec: workloadSpec,
ActorUid: actor.GetMetadata().Uid,
EgressGateway: egressGateway,
CpuMilli: cpuMilli,
MemoryBytes: memBytes,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
SandboxAssets: sandboxAssets,
Spec: workloadSpec,
ActorUid: actor.GetMetadata().Uid,
EgressGateway: egressGateway,
CpuMilli: cpuMilli,
MemoryBytes: memBytes,
}
_, err = client.Run(ctx, req)
return tele, maybeCrashActor(ctx, w.store, actorRef, err, "while creating workload from spec", ateattr.OperationResume)
Expand Down
18 changes: 9 additions & 9 deletions cmd/ateapi/internal/controlapi/workflow_suspend.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ func (w *ActorWorkflow) ensureAteletSuspended(ctx context.Context, actorRef reso
// actor is currently running (recorded on-node at Run/Restore) and pins it
// into the snapshot manifest.
req := &ateletpb.CheckpointRequest{
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
TargetAteomUid: assignment.GetWorkerPodUid(),
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
Spec: workloadSpec,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_EXTERNAL,
Config: &ateletpb.CheckpointRequest_ExternalConfig{
ExternalConfig: &ateletpb.ExternalCheckpointConfiguration{
SnapshotUri: snapshotURI.String(),
Expand Down Expand Up @@ -303,8 +303,8 @@ func (w *ActorWorkflow) ensurePausedSnapshotUploaded(ctx context.Context, actorR
Atespace: actor.GetMetadata().GetAtespace(),
ActorName: actor.GetMetadata().GetName(),
ActorUid: actor.GetMetadata().GetUid(),
ActorTemplateNamespace: actor.GetActorTemplateNamespace(),
ActorTemplateName: actor.GetActorTemplateName(),
ActorTemplateAtespace: actorTemplate.GetMetadata().GetAtespace(),
ActorTemplateName: actorTemplate.GetMetadata().GetName(),
LocalSnapshotName: local.GetSnapshotName(),
DestinationSnapshotUri: snapshotURI.String(),
// The commit scope, like a running-origin suspend; atelet converts
Expand Down
66 changes: 33 additions & 33 deletions cmd/atelet/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,29 +162,29 @@ func TestLocalSnapshotGC(t *testing.T) {
}

if _, err := s.Run(ctx, &ateletpb.RunRequest{
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateNamespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
SandboxAssets: sandboxAssets,
Spec: spec,
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateAtespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
SandboxAssets: sandboxAssets,
Spec: spec,
}); err != nil {
t.Fatalf("Run: %v", err)
}

// Pause: a local checkpoint, which leaves the snapshot on this node.
if _, err := s.Checkpoint(ctx, &ateletpb.CheckpointRequest{
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateNamespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
Scope: ateletpb.SnapshotScope_SNAPSHOT_SCOPE_FULL,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateAtespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
Scope: ateletpb.SnapshotScope_SNAPSHOT_SCOPE_FULL,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
Config: &ateletpb.CheckpointRequest_LocalConfig{
LocalConfig: &ateletpb.LocalCheckpointConfiguration{SnapshotName: snapshotName},
},
Expand All @@ -198,15 +198,15 @@ func TestLocalSnapshotGC(t *testing.T) {

// Resume: restores from that local snapshot.
if _, err := s.Restore(ctx, &ateletpb.RestoreRequest{
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateNamespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
Scope: ateletpb.SnapshotScope_SNAPSHOT_SCOPE_FULL,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateAtespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
Scope: ateletpb.SnapshotScope_SNAPSHOT_SCOPE_FULL,
Type: ateletpb.CheckpointType_CHECKPOINT_TYPE_LOCAL,
Config: &ateletpb.RestoreRequest_LocalConfig{
LocalConfig: &ateletpb.LocalCheckpointConfiguration{SnapshotName: snapshotName},
},
Expand All @@ -219,13 +219,13 @@ func TestLocalSnapshotGC(t *testing.T) {

// Terminate: the actor is gone, and so should its snapshot be.
if _, err := s.Terminate(ctx, &ateletpb.TerminateRequest{
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateNamespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
Atespace: atespace,
ActorName: actorName,
ActorUid: actorUID,
ActorTemplateAtespace: "default",
ActorTemplateName: "counter",
TargetAteomUid: ateomUID,
Spec: spec,
}); err != nil {
t.Fatalf("Terminate: %v", err)
}
Expand Down
Loading
Loading