{"record":{"id":"fa42184113d17686","repo":"apache/pulsar","slug":"the-supplied-go-file-does-not-exist","errorCode":null,"errorMessage":"The supplied go file does not exist","messagePattern":"The supplied go file does not exist","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java","lineNumber":911,"sourceCode":"            String filename = functionConfig.getPy();\n            if (filename.contains(\"..\")) {\n                throw new IllegalArgumentException(\"Invalid filename: \" + filename);\n            }\n\n            if (!new File(filename).exists()) {\n                throw new IllegalArgumentException(\"The supplied python file does not exist\");\n            }\n        }\n        if (!isEmpty(functionConfig.getGo()) && !org.apache.pulsar.common.functions.Utils\n                .isFunctionPackageUrlSupported(functionConfig.getGo())\n                && functionConfig.getGo().startsWith(BUILTIN)) {\n            String filename = functionConfig.getGo();\n            if (filename.contains(\"..\")) {\n                throw new IllegalArgumentException(\"Invalid filename: \" + filename);\n            }\n\n            if (!new File(filename).exists()) {\n                throw new IllegalArgumentException(\"The supplied go file does not exist\");\n            }\n        }\n\n        if (functionConfig.getInputSpecs() != null) {\n            functionConfig.getInputSpecs().forEach((topicName, conf) -> {\n                // receiver queue size should be >= 0\n                if (conf.getReceiverQueueSize() != null && conf.getReceiverQueueSize() < 0) {\n                    throw new IllegalArgumentException(\n                        \"Receiver queue size should be >= zero\");\n                }\n\n                if (conf.getCryptoConfig() != null && isBlank(conf.getCryptoConfig().getCryptoKeyReaderClassName())) {\n                    throw new IllegalArgumentException(\n                            \"CryptoKeyReader class name required\");\n                }\n                if (conf.getMessagePayloadProcessorConfig() != null && isBlank(\n                        conf.getMessagePayloadProcessorConfig().getClassName())) {\n                    throw new IllegalArgumentException(","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java#L893-L929","documentation":"For built-in Go functions (go starts with 'builtin://' and is not a supported package URL), the validator requires that a file with the supplied name exists locally; otherwise it throws IllegalArgumentException('The supplied go file does not exist'). Built-ins resolve from the worker's functions directory, so a name that is not deployed fails validation.","triggerScenarios":"Calling createFunction/updateFunction with setGo(\"builtin://name\") where no matching file exists on the validating/broker host; the Go built-ins were never installed on the cluster workers.","commonSituations":"Missing native built-ins distribution on workers; name mismatch between registered built-in and config (case or suffix errors); cluster where only Java/Python built-ins were installed; validating on a machine different from the cluster.","solutions":["List installed built-ins (`pulsar-admin functions builtins list`) and use an exact existing name","Deploy the Go built-in functions archive to the brokers/workers","Submit the Go function via a package URL (http(s):// or file://) pointing to your own compiled artifact instead of builtin://","Verify which cluster/host performs validation and that its filesystem contains the file"],"exampleFix":"// before\nconf.setGo(\"builtin://my_go_fn\"); // not installed\n// after\nconf.setGo(\"builtin://api_examples_native\"); // shipped with the distribution","handlingStrategy":"validation","validationCode":"String go = conf.getGo();\nif (go != null && go.startsWith(\"builtin://\")) {\n    String name = go.substring(\"builtin://\".length());\n    if (!new java.io.File(\"/pulsar/functions/\" + name).exists()) { // adjust path\n        throw new IllegalStateException(\"Built-in go function not found: \" + name);\n    }\n}","typeGuard":"boolean builtinGoExists(String s) {\n    return s != null && s.startsWith(\"builtin://\")\n        && new java.io.File(s.substring(\"builtin://\".length())).exists();\n}","tryCatchPattern":"try {\n    admin.functions().createFunction(conf);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().equals(\"The supplied go file does not exist\")) {\n        conf.setGo(\"https://example.com/functions/mygo\"); // fall back to package URL\n        admin.functions().createFunction(conf);\n    } else throw e;\n}","preventionTips":["Verify built-in availability per cluster before submitting Go functions","Keep the native built-ins distribution installed and version-matched across workers","Track built-in names in CI to catch renames/removals early"],"tags":["pulsar-functions","config-validation","filesystem","builtin"],"backgroundTag":"builtin-function-not-found","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"}