{"record":{"id":"05a1d2a1f32491f6","repo":"quarkusio/quarkus","slug":"build-s-has-no-status","errorCode":null,"errorMessage":"Build:%s has no status!","messagePattern":"Build:(.+?) has no status!","errorType":"console","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java","lineNumber":528,"sourceCode":"                } else {\n                    throw openshiftException(e);\n                }\n            }\n        }\n    }\n\n    static Build waitForOpenshiftBuild(Build build, ContainerImageOpenshiftConfig openshiftConfig,\n            KubernetesClientBuilder kubernetesClientBuilder) {\n\n        while (isNew(build) || isPending(build) || isRunning(build)) {\n            final String buildName = build.getMetadata().getName();\n            try (KubernetesClient kubernetesClient = kubernetesClientBuilder.build()) {\n                OpenShiftClient client = toOpenshiftClient(kubernetesClient);\n                Build updated = client.builds().withName(buildName).get();\n                if (updated == null) {\n                    throw new IllegalStateException(\"Build:\" + build.getMetadata().getName() + \" is no longer present!\");\n                } else if (updated.getStatus() == null) {\n                    throw new IllegalStateException(\"Build:\" + build.getMetadata().getName() + \" has no status!\");\n                } else if (isNew(updated) || isPending(updated) || isRunning(updated)) {\n                    build = updated;\n                    try (LogWatch w = client.builds().withName(buildName).withPrettyOutput().watchLog();\n                            Reader reader = new InputStreamReader(w.getOutput())) {\n                        display(reader, openshiftConfig.buildLogLevel());\n                    } catch (IOException | KubernetesClientException ex) {\n                        // This may happen if the LogWatch is closed while we are still reading.\n                        // We shouldn't let the build fail, so let's log a warning and display last few lines of the log\n                        LOG.warn(\"Log stream closed, redisplaying last \" + LOG_TAIL_SIZE + \" entries:\");\n                        try {\n                            display(client.builds().withName(buildName).tailingLines(LOG_TAIL_SIZE).getLogReader(),\n                                    Logger.Level.WARN);\n                        } catch (IOException | KubernetesClientException ignored) {\n                            // Let's ignore this.\n                        }\n                    }\n                } else if (isComplete(updated)) {\n                    return updated;","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java#L510-L546","documentation":"waitForOpenshiftBuild polls the OpenShift Build resource until it reaches a terminal state. If the fetched Build has no Status object (status is null), Quarkus throws IllegalStateException because it cannot determine progress or completion.","triggerScenarios":"During a Quarkus-triggered OpenShift binary build, an update of the Build resource is fetched whose .status field is null — typically immediately after creation before the OpenShift build controller has reconciled and written the status.","commonSituations":"API server/controller slowness under heavy cluster load; an apiserver outage right after build creation leaving the resource in a status-less state; custom webhooks/mutating controllers interfering with Build status population.","solutions":["Retry the build; a transient controller delay is the usual cause and a fresh run reconciles the status.","Check that the OpenShift build controller is healthy: oc get pods -n openshift-apiserver / openshift-controller-manager, and cluster events (oc get events).","Verify no webhook or custom controller is stripping/mutating the Build status field.","Inspect the Build resource directly (oc get build <name> -o yaml) to confirm the missing status before reporting a cluster issue."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"oc get build <buildName> -o jsonpath='{.status.phase}' // status should exist once the controller reconciles","typeGuard":null,"tryCatchPattern":"try {\n    // quarkus openshift build\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"has no status\")) {\n        // transient controller lag/cluster issue: verify cluster health and retry\n    }\n    throw e;\n}","preventionTips":["Ensure the OpenShift build controller (openshift-controller-manager) is healthy before CI runs.","Avoid triggering builds during control-plane maintenance windows.","Do not install mutating webhooks that interfere with Build resources.","Retry the build once before deep investigation; missing status is often transient."],"tags":["openshift","kubernetes","build","status","cluster"],"backgroundTag":"openshift-build-no-status","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}