{"record":{"id":"10a930be4183fb0a","repo":"pulumi/pulumi","slug":"the-provider-registry-is-not-invokable","errorCode":null,"errorMessage":"the provider registry is not invokable","messagePattern":"the provider registry is not invokable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resource/deploy/providers/registry.go","lineNumber":1047,"sourceCode":"}\n\nfunc (r *Registry) Read(context.Context, plugin.ReadRequest) (plugin.ReadResponse, error) {\n\treturn plugin.ReadResponse{}, errors.New(\"provider resources may not be read\")\n}\n\nfunc (r *Registry) List(context.Context, plugin.ListRequest) (*plugin.ListStream, error) {\n\treturn nil, errors.New(\"provider resources may not be listed\")\n}\n\nfunc (r *Registry) Construct(context.Context, plugin.ConstructRequest) (plugin.ConstructResponse, error) {\n\treturn plugin.ConstructResult{}, errors.New(\"provider resources may not be constructed\")\n}\n\nfunc (r *Registry) Invoke(context.Context, plugin.InvokeRequest) (plugin.InvokeResponse, error) {\n\t// It is the responsibility of the eval source to ensure that we never attempt an invoke using the provider\n\t// registry.\n\tcontract.Failf(\"Invoke must not be called on the provider registry\")\n\treturn plugin.InvokeResponse{}, errors.New(\"the provider registry is not invokable\")\n}\n\nfunc (r *Registry) Call(context.Context, plugin.CallRequest) (plugin.CallResponse, error) {\n\t// It is the responsibility of the eval source to ensure that we never attempt an call using the provider\n\t// registry.\n\tcontract.Failf(\"Call must not be called on the provider registry\")\n\treturn plugin.CallResult{}, errors.New(\"the provider registry is not callable\")\n}\n\nfunc (r *Registry) GetPluginInfo(context.Context) (plugin.PluginInfo, error) {\n\t// return an error: this should not be called for the provider registry\n\treturn plugin.PluginInfo{}, errors.New(\"the provider registry does not report plugin info\")\n}\n\nfunc (r *Registry) SignalCancellation(context.Context) error {\n\t// At the moment there isn't anything reasonable we can do here. In the future, it might be nice to plumb\n\t// cancellation through the plugin loader and cancel any outstanding load requests here.\n\treturn nil","sourceCodeStart":1029,"sourceCodeEnd":1065,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/resource/deploy/providers/registry.go#L1029-L1065","documentation":"Registry.Invoke both fails the process contract (contract.Failf) and returns this error as a defensive fallback, because invokes must never be routed through the provider registry. Reaching this line means the eval source violated its responsibility to select the right host for an invoke.","triggerScenarios":"An InvokeRequest (e.g. a data-source call like aws.getAmi) is routed to the Registry instead of the concrete provider instance.","commonSituations":"Engine dispatch bugs in eval source selection; custom tooling built on internal deploy packages calling Invoke on the registry.","solutions":["Dispatch invokes to the resolved provider for the resource's package, not the Registry","Update the Pulumi engine (this is an internal invariant violation)","File a bug with a reproduction if reached from standard Pulumi usage"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Resolve the provider for the invoke's package first\nprov, err := registry.GetProviderForPackage(pkg)\nif err != nil { return err }\n// invoke via prov, never via registry","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always resolve a concrete provider before Invoke","Note that contract.Failf aborts the process — never call this path","Add integration tests covering invoke dispatch"],"tags":["providers","registry","invoke"],"backgroundTag":"operation-not-supported","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}