quarkusio/quarkus · error · IllegalStateException

Build:%s has no status!

Error message

Build:%s has no status!

What it means

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.

Source

Thrown at extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java:528

                } else {
                    throw openshiftException(e);
                }
            }
        }
    }

    static Build waitForOpenshiftBuild(Build build, ContainerImageOpenshiftConfig openshiftConfig,
            KubernetesClientBuilder kubernetesClientBuilder) {

        while (isNew(build) || isPending(build) || isRunning(build)) {
            final String buildName = build.getMetadata().getName();
            try (KubernetesClient kubernetesClient = kubernetesClientBuilder.build()) {
                OpenShiftClient client = toOpenshiftClient(kubernetesClient);
                Build updated = client.builds().withName(buildName).get();
                if (updated == null) {
                    throw new IllegalStateException("Build:" + build.getMetadata().getName() + " is no longer present!");
                } else if (updated.getStatus() == null) {
                    throw new IllegalStateException("Build:" + build.getMetadata().getName() + " has no status!");
                } else if (isNew(updated) || isPending(updated) || isRunning(updated)) {
                    build = updated;
                    try (LogWatch w = client.builds().withName(buildName).withPrettyOutput().watchLog();
                            Reader reader = new InputStreamReader(w.getOutput())) {
                        display(reader, openshiftConfig.buildLogLevel());
                    } catch (IOException | KubernetesClientException ex) {
                        // This may happen if the LogWatch is closed while we are still reading.
                        // We shouldn't let the build fail, so let's log a warning and display last few lines of the log
                        LOG.warn("Log stream closed, redisplaying last " + LOG_TAIL_SIZE + " entries:");
                        try {
                            display(client.builds().withName(buildName).tailingLines(LOG_TAIL_SIZE).getLogReader(),
                                    Logger.Level.WARN);
                        } catch (IOException | KubernetesClientException ignored) {
                            // Let's ignore this.
                        }
                    }
                } else if (isComplete(updated)) {
                    return updated;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Retry the build; a transient controller delay is the usual cause and a fresh run reconciles the status.
  2. Check that the OpenShift build controller is healthy: oc get pods -n openshift-apiserver / openshift-controller-manager, and cluster events (oc get events).
  3. Verify no webhook or custom controller is stripping/mutating the Build status field.
  4. Inspect the Build resource directly (oc get build <name> -o yaml) to confirm the missing status before reporting a cluster issue.
Defensive patterns

Strategy: retry

Validate before calling

oc get build <buildName> -o jsonpath='{.status.phase}' // status should exist once the controller reconciles

Try / catch

try {
    // quarkus openshift build
} catch (IllegalStateException e) {
    if (e.getMessage() != null && e.getMessage().contains("has no status")) {
        // transient controller lag/cluster issue: verify cluster health and retry
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/05a1d2a1f32491f6. Report an issue: GitHub.