Skip to content

fix: add unmark deployment #6505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions internal/tools/orchestrator/services/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,16 @@
return
}
oldestID := top[len(top)-1].ID

var unMarked = make(map[string]struct{})
for i, deployment := range top {
if i < keep {
unMarked[deployment.ReleaseId] = struct{}{}
continue

Check warning on line 2112 in internal/tools/orchestrator/services/runtime/runtime.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/orchestrator/services/runtime/runtime.go#L2107-L2112

Added lines #L2107 - L2112 were not covered by tests
}
break

Check warning on line 2114 in internal/tools/orchestrator/services/runtime/runtime.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/orchestrator/services/runtime/runtime.go#L2114

Added line #L2114 was not covered by tests
}

var hasSuccess bool
for _, deployment := range top {
if deployment.Status == apistructs.DeploymentStatusOK {
Expand All @@ -2120,6 +2130,9 @@
hasSuccess = true
continue
}
if _, ok := unMarked[deployments[i].ReleaseId]; ok {
continue

Check warning on line 2134 in internal/tools/orchestrator/services/runtime/runtime.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/orchestrator/services/runtime/runtime.go#L2133-L2134

Added lines #L2133 - L2134 were not covered by tests
}
r.markOutdated(&deployments[i])
}
}
Expand Down
Loading