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
19 changes: 6 additions & 13 deletions pkg/cvo/sync_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,11 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w
precreateObjects = true
}

// in specific modes, attempt to precreate a set of known types (currently ClusterOperator) without
// retries
if precreateObjects {
payload.RunGraph(ctx, graph, 8, func(ctx context.Context, tasks []*payload.Task) error {
// update each object
errs := payload.RunGraph(ctx, graph, maxWorkers, func(ctx context.Context, tasks []*payload.Task) error {
// in specific modes, attempt to precreate a set of known types (currently ClusterOperator) without
// retries
if precreateObjects {
for _, task := range tasks {
if err := ctx.Err(); err != nil {
return cr.ContextError(err)
Expand All @@ -742,22 +743,14 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w
klog.V(4).Infof("Skipping precreation of %s as unmanaged", task)
continue
}
if task.Manifest.Obj.GetName() == "baremetal" {
klog.V(4).Infof("Skipping precreation of %s, https://bugzilla.redhat.com/show_bug.cgi?id=1929917", task)
continue
}
if err := w.builder.Apply(ctx, task.Manifest, payload.PrecreatingPayload); err != nil {
klog.V(2).Infof("Unable to precreate resource %s: %v", task, err)
continue
}
klog.V(4).Infof("Precreated resource %s", task)
}
return nil
})
}
}

// update each object
errs := payload.RunGraph(ctx, graph, maxWorkers, func(ctx context.Context, tasks []*payload.Task) error {
for _, task := range tasks {
if err := ctx.Err(); err != nil {
return cr.ContextError(err)
Expand Down