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
5 changes: 4 additions & 1 deletion internal/controllers/v1beta2/build_qoshandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ func (r *LagoonBuildReconciler) processQueue(ctx context.Context, opLog logr.Log
} else {
// start the build pod immediately
var lagoonBuild lagooncrd.LagoonBuild
if err := r.Get(ctx, types.NamespacedName{Namespace: pBuild.Namespace, Name: startBuild}, &lagoonBuild); err != nil {
// Bypass controller-runtime read cache to avoid race condition where a build exists but
// has not been put in the cache yet.
if err := r.APIReader.Get(ctx, types.NamespacedName{Namespace: pBuild.Namespace, Name: startBuild}, &lagoonBuild); err != nil {
// An error here results in the build being stuck queued until remote-controller is restarted.
return err
}
if err := r.processBuild(ctx, opLog, lagoonBuild); err != nil {
Expand Down
Loading