Load plugin step schemas during validation#601
Merged
Conversation
a4a84e6 to
a488c89
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR closes several integration gaps between wfctl compute/infra workflows and the external plugin ecosystem by improving trigger lifecycle handling, enriching schema loading during validation, and adding IaC interface/sentinel helpers (including new sensitive-output routing utilities).
Changes:
- Route external plugin trigger types through the plugin module lifecycle and delay remote trigger handle creation until
Configure. - Expand IaC interfaces/sentinels to support optional provider capabilities and clearer error classification.
- Load external plugin step schemas during
wfctl validate --plugin-dirand add theiac/sensitiverouting helpers.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/external/sdk/grpc_server.go | Treats trigger types as creatable “modules” and wires trigger callbacks to engine TriggerWorkflow. |
| plugin/external/sdk/grpc_server_test.go | Adds coverage ensuring trigger types are created and started/stopped via module lifecycle RPCs. |
| plugin/external/remote_trigger.go | Defers remote trigger handle creation to Configure; adds safeguards when starting before configured. |
| plugin/external/adapter.go | Updates trigger factories to return unconfigured RemoteTrigger instances (no early CreateModule). |
| plugin/external/adapter_test.go | Tests that remote trigger handle creation is delayed until Configure. |
| interfaces/iac_resource_driver.go | Adds new IaC sentinel errors for image-not-found and optional-method unimplemented handling. |
| interfaces/iac_provider.go | Adds optional EnumeratorAll interface for providers that can enumerate without tags. |
| iac/sensitive/route.go | Introduces sensitive-output routing (placeholders, revocation, diff masking). |
| cmd/wfctl/validate.go | Loads plugin step schemas from --plugin-dir to improve validation fidelity. |
| return fmt.Errorf("remote trigger %s config: %w", t.typeName, err) | ||
| } | ||
| if t.handleID != "" { | ||
| _ = t.Destroy() |
Comment on lines
+96
to
+97
| func (t *RemoteTrigger) Configure(_ modular.Application, triggerConfig any) error { | ||
| cfg, err := triggerConfigMap(triggerConfig) |
Comment on lines
+36
to
+41
| // Route stores sensitive output values in provider and replaces them with | ||
| // placeholders in the returned sanitized output map. Out is not mutated. | ||
| func Route(ctx context.Context, provider secrets.Provider, resourceName string, out *interfaces.ResourceOutput) (map[string]any, map[string]string, error) { | ||
| if out == nil { | ||
| return nil, nil, fmt.Errorf("sensitive.Route: out is nil") | ||
| } |
⏱ 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
stepSchemaswhenwfctl validate --plugin-diris usedVerification