RemoteStep: resolve template expressions in step config before gRPC call#217
Merged
RemoteStep: resolve template expressions in step config before gRPC call#217
Conversation
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix RemoteStep to resolve template expressions in step config
RemoteStep: resolve template expressions in step config before gRPC call
Mar 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a functional gap in the external plugin step system by ensuring step config templates are resolved against the live PipelineContext on each execution (matching built-in step behavior), and delivering that resolved config to plugins over gRPC.
Changes:
- Extend
ExecuteStepRequestwith a newconfigfield to carry per-execution, template-resolved step config. - Update host
RemoteStep.Execute()to resolve templates in stored raw config before making the gRPC call. - Update the plugin SDK
StepInstance.Execute()signature and server wiring to pass the resolved config through to plugin implementations; add tests + docs + example updates.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/external/proto/plugin.proto | Adds ExecuteStepRequest.config protobuf field for resolved config. |
| plugin/external/proto/plugin.pb.go | Regenerated protobuf Go types reflecting the new config field. |
| plugin/external/proto/plugin_grpc.pb.go | Regenerated gRPC bindings reflecting the updated request message. |
| plugin/external/remote_step.go | Resolves step config templates per execution and sends resolved config via gRPC. |
| plugin/external/adapter.go | Passes raw step config into NewRemoteStep so it can be resolved at execution time. |
| plugin/external/remote_step_test.go | Adds unit tests validating resolved config behavior for RemoteStep. |
| plugin/external/sdk/interfaces.go | Breaking change: StepInstance.Execute() now accepts a config map[string]any param. |
| plugin/external/sdk/grpc_server.go | Passes req.Config through to StepInstance.Execute() on the plugin side. |
| examples/external-plugin/main.go | Updates example plugin step to match the new Execute() signature. |
| docs/PLUGIN_DEVELOPMENT_GUIDE.md | Documents the updated external-step execution flow including config resolution. |
| docs/PLUGIN_ARCHITECTURE.md | Updates architecture/proto documentation for the new request field. |
| go.mod | Promotes github.com/xdg-go/scram to a direct dependency (likely via tidy). |
Contributor
|
@copilot apply changes based on the comments in this thread |
… config test Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
plugin/external/remote_step.go:71
RemoteStep.Executeerrors from the gRPC call (err != nil) and from the plugin response (resp.Error) don’t include the step name/handle. This makes it hard to identify which remote step failed when multiple plugin steps are present in a pipeline. Consider includings.nameands.handleIDin these error messages (similar to the config-resolve error above).
if err != nil {
return nil, fmt.Errorf("remote step execute: %w", err)
}
if resp.Error != "" {
return nil, fmt.Errorf("remote step execute: %s", resp.Error)
}
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.
plugin/external/proto/plugin.prototo addconfigfield (field 6) toExecuteStepRequestplugin.pb.goandplugin_grpc.pb.gofrom updated protoRemoteStepstruct to store raw config map; updateNewRemoteStepto accept configRemoteStep.Execute()to resolve template expressions usingTemplateEngine.ResolveMap()and include resolved config in gRPC requestadapter.goto pass config toNewRemoteStepsdk/interfaces.goStepInstance.Execute()to includeconfig map[string]anyparametersdk/grpc_server.goExecuteStepto pass resolved config from request toinst.Execute()examples/external-plugin/main.goto match new interfaceRemoteStep.Execute()ResolveMapwhens.config == nilsoConfigproto field is nil (not empty struct) for steps with no configConfig == nilinTestRemoteStep_Execute_NilConfigOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.