Skip to content
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

OCTRL-954 Core got stuck while tearing down environment 2qzDsSFXRL8 #634

Merged
merged 1 commit into from
Nov 15, 2024
Merged
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
16 changes: 1 addition & 15 deletions core/environment/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,9 @@ func NewEnvManager(tm *task.Manager, incomingEventCh chan event.Event) *Manager
instance.mu.RLock()
thisEnvCh, ok := instance.pendingStateChangeCh[typedEvent.GetEnvironmentId()]
instance.mu.RUnlock()
// If environment is not in state transition message is being propagated through task/manager
if ok {
thisEnvCh <- typedEvent
} else {
// If there is no pending environment transition, it means that the changed task did so
// unexpectedly. In that case, the environment should transition only if the task
// is critical.
var changeCriticalTask = false
for _, v := range typedEvent.GetTaskIds() {
if tm.GetTask(v) != nil {
if tm.GetTask(v).GetTraits().Critical == true {
changeCriticalTask = true
}
}
}
if changeCriticalTask {
thisEnvCh <- typedEvent
}
}
default:
// noop
Expand Down
Loading