Skip to content
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
9 changes: 5 additions & 4 deletions services/core/internal/execution/runtime_initialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ func (w *Worker) runEnvironmentInitializations(ctx context.Context) error {
// Placement binds an agent host once the Environment serves;
// a later scan claims the preparation on it.
if _, err := w.place(ctx, owner.TenantID, owner.SessionID, owner.EnvironmentID, func(id string) bool {
// The Turn path's predicate: the host advertises the
// Harness as available.
// A host that knows the kind is ready even when its
// Harness is unavailable, so the initialization fails
// typed below instead of waiting for another host.
peer, err := w.dispatcher.authorizedPeer(ctx, id)
if err != nil {
return false
}
_, err = runtimeDeclaration(peer, owner.Engine)
return err == nil
_, _, known := peer.AgentKindStatus(owner.Engine)
return known
}); err != nil && !errors.Is(err, sessions.ErrNotFound) && !errors.Is(err, sessions.ErrDeviceBindingConflict) {
return err
}
Expand Down