{"record":{"id":"be47b1e1ca8799ae","repo":"dbt-labs/dbt-core","slug":"manifest-injection-is-not-yet-supported-reuse-th","errorCode":null,"errorMessage":"manifest= injection is not yet supported. Reuse the runner instance across invocations to avoid re-parsing.","messagePattern":"manifest= injection is not yet supported\\. Reuse the runner instance across invocations to avoid re-parsing\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"crates/dbt-sa-python/python/dbt/runner.py","lineNumber":106,"sourceCode":"            argv.append(flag if value else \"--no-\" + key.replace(\"_\", \"-\"))\n        elif isinstance(value, (list, tuple)):\n            for item in value:\n                argv += [flag, str(item)]\n        else:\n            argv += [flag, str(value)]\n    return argv\n\n\nclass dbtRunner:\n    \"\"\"In-process dbt runner. Reuse one instance across calls.\"\"\"\n\n    # Each invoke() gets its own log file, verbosity and warn-error options. Concurrent\n    # invokes are serialized, since a run's log layers are installed process-wide.\n    # `--log-level trace` acts as `debug`: the subscriber's cap is fixed per process.\n\n    def __init__(self, manifest: Any = None, callbacks: Any = None):\n        if manifest is not None:\n            raise NotImplementedError(\n                \"manifest= injection is not yet supported. Reuse the runner \"\n                \"instance across invocations to avoid re-parsing.\"\n            )\n        if callbacks is not None:\n            raise NotImplementedError(\"callbacks= (EventManager hooks) are not yet supported.\")\n        self._runner = _DbtRunner()\n\n    def invoke(self, args: List[str], **kwargs) -> dbtRunnerResult:\n        argv = list(args) + _kwargs_to_cli(kwargs)\n        try:\n            core = self._runner.invoke(argv)\n        except (KeyboardInterrupt, SystemExit):\n            raise\n        except BaseException as exc:\n            # Parse errors and caught panics: hand back on the result, don't\n            # kill the interpreter.\n            return dbtRunnerResult(success=False, result=None, exception=exc)\n        # Engine reports errors on the result, not by raising; surface the message.","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-sa-python/python/dbt/runner.py#L88-L124","documentation":"NotImplementedError raised in DbtRunner.__init__ when a caller passes manifest= to the constructor. This Python runner port does not yet support injecting a pre-parsed manifest object; runs must parse the manifest themselves. The error message directs users to reuse a single runner instance across invocations instead.","triggerScenarios":"Calling DbtRunner(manifest=my_manifest) — any non-None manifest argument to __init__.","commonSituations":"Porting code from the official dbt-core dbtRunner (which supports manifest=) to this Rust-backed runner; trying to cache a parsed manifest across invocations for performance; copying example code from dbt-core docs.","solutions":["Remove the manifest= argument and let the runner parse the manifest from the project on each invoke.","Reuse a single DbtRunner instance across invocations so the parsed manifest is cached internally, avoiding re-parsing.","If manifest injection is essential, use the official dbt-core dbtRunner instead of this port.","File/request feature support for manifest= injection in this runner."],"exampleFix":"// before\nrunner = DbtRunner(manifest=manifest)\n// after\nrunner = DbtRunner()  # reuse this instance across invoke() calls to avoid re-parsing\nrunner.invoke([\"run\"])","handlingStrategy":"try-catch","validationCode":"import inspect\nsig = inspect.signature(DbtRunner.__init__)\nif 'manifest' in sig.parameters:\n    print('manifest param exists but raises NotImplementedError in this runner')","typeGuard":"def runner_supports_manifest_injection(runner_cls) -> bool:\n    import inspect\n    src = inspect.getsource(runner_cls.__init__)\n    return 'manifest= injection is not yet supported' not in src","tryCatchPattern":"try:\n    runner = DbtRunner(manifest=manifest)\nexcept NotImplementedError:\n    runner = DbtRunner()  # fall back: let runner parse and cache internally","preventionTips":["Do not copy dbt-core dbtRunner(manifest=...) examples to this runner verbatim.","Construct DbtRunner() once at module/session level and reuse it across invoke() calls.","Check this runner's docstring/docs for the supported constructor surface before porting code.","Guard constructor kwargs with inspect.signature if writing shared wrapper code."],"tags":["python","dbt-runner","not-implemented","api-portability"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}