{"record":{"id":"007585cbd2a218cf","repo":"apache/pulsar","slug":"unsupported-runtime-s","errorCode":null,"errorMessage":"Unsupported Runtime %s","messagePattern":"Unsupported Runtime (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntimeFactory.java","lineNumber":286,"sourceCode":"\n    @Override\n    public KubernetesRuntime createContainer(InstanceConfig instanceConfig, String codePkgUrl,\n                                             String originalCodeFileName,\n                                             String transformFunctionPkgUrl,\n                                             String originalTransformFunctionFileName,\n                                             Long expectedHealthCheckInterval) throws Exception {\n        String instanceFile = null;\n        switch (instanceConfig.getFunctionDetails().getRuntime()) {\n            case JAVA:\n                instanceFile = javaInstanceJarFile;\n                break;\n            case PYTHON:\n                instanceFile = pythonInstanceFile;\n                break;\n            case GO:\n                break;\n            default:\n                throw new RuntimeException(\"Unsupported Runtime \" + instanceConfig.getFunctionDetails().getRuntime());\n        }\n\n        // adjust the auth config to support auth\n        if (authenticationEnabled) {\n            authProvider.ifPresent(kubernetesFunctionAuthProvider ->\n                    kubernetesFunctionAuthProvider.configureAuthenticationConfig(authConfig,\n                            Optional.ofNullable(getFunctionAuthData(\n                                    Optional.ofNullable(instanceConfig.getFunctionAuthenticationSpec())))));\n\n        }\n\n        Optional<KubernetesManifestCustomizer> manifestCustomizer = getRuntimeCustomizer();\n        String overriddenNamespace = manifestCustomizer\n                .map((customizer) -> customizer.customizeNamespace(instanceConfig.getFunctionDetails(), jobNamespace))\n                .orElse(jobNamespace);\n        String overriddenName = manifestCustomizer\n                .map((customizer) -> customizer.customizeName(instanceConfig.getFunctionDetails(), jobName))\n                .orElse(jobName);","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntimeFactory.java#L268-L304","documentation":"KubernetesRuntimeFactory.createContainer switches on the function's runtime type (JAVA, PYTHON, GO) to select the instance file to mount. Any runtime value other than these is unsupported on Kubernetes and produces a RuntimeException 'Unsupported Runtime <type>'.","triggerScenarios":"Submitting a FunctionDetails whose runtime (FunctionDetails.Runtime enum from the protobuf) resolves to an unhandled value in createContainer's switch — e.g. a proto runtime value added in a newer Pulsar version being processed by an older worker, or a corrupted/unset runtime field.","commonSituations":"Worker running an older Pulsar version than the client that submitted the function (new runtime enum value); manually crafted FunctionDetails via admin API with wrong runtime; submitter misusing the --runtime flag on a tool building function configs.","solutions":["Use a supported runtime: JAVA, PYTHON, or GO when submitting the function.","Upgrade the functions worker to a Pulsar version that recognizes the runtime value submitted by the client.","Re-submit the function via the admin API, explicitly specifying the correct --runtime flag.","Inspect FunctionDetails of the failing function (pulsar-admin functions get) to confirm the runtime field value."],"exampleFix":"// before\npulsar-admin functions create --runtime UNKNOWN ...\n// after\npulsar-admin functions create --runtime JAVA ...","handlingStrategy":"validation","validationCode":"FunctionDetails.Runtime rt = details.getRuntime();\nif (rt != FunctionDetails.Runtime.JAVA && rt != FunctionDetails.Runtime.PYTHON && rt != FunctionDetails.Runtime.GO) {\n    throw new IllegalArgumentException(\"Unsupported runtime for Kubernetes: \" + rt);\n}","typeGuard":"boolean isSupportedRuntime(FunctionDetails d) {\n  switch (d.getRuntime()) { case JAVA: case PYTHON: case GO: return true; default: return false; }\n}","tryCatchPattern":"try { submitFunction(details); } catch (RuntimeException e) { if (e.getMessage().startsWith(\"Unsupported Runtime\")) { /* re-submit with JAVA/PYTHON/GO */ } throw e; }","preventionTips":["Always set the --runtime flag explicitly when creating functions","Keep worker and client Pulsar versions compatible for runtime enum values","Inspect FunctionDetails via pulsar-admin functions get before deploying programmatically"],"tags":["kubernetes","runtime","unsupported","pulsar-functions"],"backgroundTag":"unsupported-runtime-type","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}