Skip to content
Closed
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
9 changes: 1 addition & 8 deletions packages/platform/backend/src/orchestrator/operation-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,18 +656,11 @@ function findGhostCleanup(
): OperationPhaseInstance[] {
const ghosts: OperationPhaseInstance[] = []

// find ghost instances and their parent composites that need cleanup
// find ghost instances that need cleanup
for (const instanceId of compositesNeedingGhostCleanup) {
const instance = context.getInstance(instanceId)
if (instance.kind !== "composite") continue

// add the composite itself for destroy if needed
ghosts.push({
id: instanceId,
parentId: instance.parentId,
message: "included in operation",
})

// find ghost children
const children = context.getInstanceChildren(instanceId)
for (const child of children) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,6 @@ describe("OperationPlan - Update Operations", () => {
[
{
"instances": [
{
"id": "composite.v1:Parent",
"message": "explicitly requested",
"parentId": undefined,
},
{
"id": "component.v1:GhostChild",
"message": "ghost cleanup",
Expand Down Expand Up @@ -360,11 +355,6 @@ describe("OperationPlan - Update Operations", () => {
[
{
"instances": [
{
"id": "composite.v1:Parent",
"message": "explicitly requested",
"parentId": undefined,
},
{
"id": "component.v1:GhostChild",
"message": "ghost cleanup",
Expand Down Expand Up @@ -986,11 +976,6 @@ describe("OperationPlan - Update Operations", () => {
},
{
"instances": [
{
"id": "composite.v1:Parent",
"message": "explicitly requested",
"parentId": undefined,
},
{
"id": "component.v1:GhostChild",
"message": "ghost cleanup",
Expand Down