theonedev/onedev · error · ExplicitException
Specified workspace provisioner '${provisioner}' is not appl
Error message
Specified workspace provisioner '${provisioner}' is not applicable for current workspace What it means
DefaultWorkspaceService verifies that an explicitly named provisioner is applicable to the current workspace (isApplicable checks e.g. platform/arch/OS compatibility of existing workspace data). A provisioner that exists and is enabled but not applicable to this workspace throws this error.
Source
Thrown at server-core/src/main/java/io/onedev/server/workspace/DefaultWorkspaceService.java:744
if (provisioner != null) {
provisioner.setName(AUTO_DISCOVERED_PROVISIONER_NAME);
if (isApplicable(workspace, spec, provisioner))
return provisioner;
}
}
return null;
}
private WorkspaceProvisioner getProvisioner(Workspace workspace, WorkspaceSpec spec, TaskLogger logger) {
if (spec.getProvisioner() != null) {
var provisioner = settingService.getWorkspaceProvisioners().stream()
.filter(it -> it.getName().equals(spec.getProvisioner()))
.findFirst()
.orElseThrow(() -> new ExplicitException("Unable to find specified workspace provisioner '" + spec.getProvisioner() + "'"));
if (!provisioner.isEnabled())
throw new ExplicitException("Specified workspace provisioner '" + spec.getProvisioner() + "' is disabled");
else if (!isApplicable(workspace, spec, provisioner))
throw new ExplicitException("Specified workspace provisioner '" + spec.getProvisioner() + "' is not applicable for current workspace");
else
return provisioner;
} else if (!settingService.getWorkspaceProvisioners().isEmpty()) {
return settingService.getWorkspaceProvisioners().stream()
.filter(it -> it.isEnabled() && isApplicable(workspace, spec, it))
.findFirst()
.orElseThrow(() -> new ExplicitException("No applicable workspace provisioner"));
} else {
logger.log("No workspace provisioner defined, auto-discovering...");
var provisioner = discoverProvisioner(workspace, spec);
if (provisioner != null) {
logger.log("Discovered " + EditableUtils.getDisplayName(provisioner.getClass()).toLowerCase());
return provisioner;
}
if (spec.isRunInContainer()) {
throw new ExplicitException("""
No applicable provisioner discovered for current workspace. \View on GitHub (pinned to d44925c47c)
Solutions
- Delete the old workspace cache so a fresh workspace matching the new provisioner is created.
- Choose a provisioner applicable to the workspace's current platform.
- Align the spec's runInContainer/platform requirements with the named provisioner.
Example fix
// before provisioner: kubernetes-pool # workspace previously shell-provisioned on Linux host // after # clear workspace cache first, then: provisioner: kubernetes-pool
Defensive patterns
Strategy: fallback
Validate before calling
// verify workspace platform (OS/arch) is supported by the target provisioner before assigning
Try / catch
try { provision(...); } catch (ExplicitException e) { if (e.getMessage().contains("not applicable")) { clearWorkspaceCache(); retry(); } } Prevention
- Clear workspace caches when changing provisioner or platform.
- Match provisioner OS/arch constraints to job requirements.
- Test provisioning on a scratch project after changing provisioners.
When it happens
Trigger: Workspace spec names provisioner P, P is enabled, but isApplicable(workspace, spec, P) returns false — e.g. the workspace was created on a different OS/architecture than P supports, or the spec's requirements don't match P.
Common situations: Switching a workspace from shell-provisioned (server host OS) to kubernetes/docker (container) or vice versa; moving jobs between agents with different platforms while reusing the workspace; provisioner OS/arch constraints vs cached workspace image.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Specified workspace provisioner '${provisioner}' is disabled
- No applicable provisioner discovered for current workspace.
- This workspace is provisioned on agent previously, and canno
- Unrecognized interpolation variable: ${t}
- Not authorized
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/8c0de0c51b604a03.
Report an issue: GitHub.