fix(plugin/external): tolerate Unimplemented GetManifest for strict-cutover IaC plugins#627
Merged
Merged
Conversation
…utover IaC plugins NewExternalPluginAdapter currently fails outright when GetManifest returns codes.Unimplemented. PR #623 added the iacPluginServiceBridge that wires GetContractRegistry for strict-cutover IaC plugins (DO v1.0.0+), but the bridge intentionally leaves GetManifest unimplemented (per the bridge's inline comment). Loader-side adapter.go didn't get a matching relaxation, so DO v1.0.1 loads its gRPC server, then immediately fails: rpc error: code = Unimplemented desc = method GetManifest not implemented load plugin "digitalocean": get manifest from plugin digitalocean This blocks every consumer running typed-IaC dispatch against a strict-cutover plugin. Observed end-to-end via core-dump strict-contracts-smoke run 25642339926 against staging. Fix: when GetManifest returns codes.Unimplemented, synthesize a minimal Manifest{Name: name} from the param-passed plugin name. Downstream accessors (Name/Version/Description/etc.) return sensible values; the loader already keys off the param-passed name everywhere meaningful (adapter.go:111). Non-Unimplemented errors still fail as before. Tests: - TestNewExternalPluginAdapter_GetManifestUnimplemented_SynthesizesFromName - TestNewExternalPluginAdapter_GetManifestNonUnimplementedError_Fails Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the external plugin loader to tolerate strict-cutover IaC plugins that intentionally do not implement PluginService.GetManifest, allowing typed-IaC dispatch consumers to load such plugins successfully.
Changes:
- Treat
GetManifestreturningcodes.Unimplementedas non-fatal and synthesize a minimalpb.Manifest{Name: <plugin name>}. - Add regression tests covering both the tolerated
Unimplementedcase and the still-fatal non-Unimplementederror case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugin/external/adapter.go | Relaxes adapter initialization by tolerating GetManifest being unimplemented and synthesizing a minimal manifest from the passed plugin name. |
| plugin/external/adapter_test.go | Adds tests ensuring Unimplemented is tolerated (manifest synthesized) while other errors still fail adapter creation. |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetContractRegistryfor strict-cutover IaC plugins via theiacPluginServiceBridge, but intentionally leftGetManifestunimplemented.NewExternalPluginAdapterstill fails hard on UnimplementedGetManifest, blocking every consumer running typed-IaC dispatch against a strict-cutover plugin (DO v1.0.0+).codes.Unimplemented, synthesize a minimalManifest{Name: name}from the param-passed plugin name.Why
Observed end-to-end via core-dump strict-contracts-smoke run 25642339926 against staging:
The bridge's inline doc explicitly states
GetManifeststays Unimplemented; the missing piece is the loader-side relaxation that mirrors the existingGetContractRegistryUnimplemented tolerance (adapter.go:118).Test plan
TestNewExternalPluginAdapter_GetManifestUnimplemented_SynthesizesFromName— passesTestNewExternalPluginAdapter_GetManifestNonUnimplementedError_Fails— passes (non-Unimplemented errors still surface)go test ./plugin/external/...clean🤖 Generated with Claude Code