Fix plugin conformance source build packages#630
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a --build-package flag to wfctl plugin conformance so conformance can build plugins whose main package isn’t at the repository root, while validating the flag to prevent unsafe/ambiguous go build invocations.
Changes:
- Introduces
--build-package(default.) and normalizes/rejects unsafe values before invokinggo build. - Plumbs the selected build package into the conformance build step and updates CLI help/usage output.
- Documents the new flag and adds tests covering safe usage, unsafe inputs, and artifact/source interactions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/WFCTL.md | Documents --build-package and adds an example invocation for non-root main packages. |
| cmd/wfctl/plugin_conformance.go | Adds flag parsing/validation (normalizeConformanceBuildPackage) and uses the selected package in the go build step. |
| cmd/wfctl/plugin_conformance_test.go | Adds coverage for building a non-root package and rejecting unsafe/unsupported --build-package usages. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
1b0f7fc to
63f5b53
Compare
63f5b53 to
8261219
Compare
This was referenced May 11, 2026
This was referenced May 13, 2026
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
wfctl plugin conformance --build-packagefor source trees whose executable package is not repo root.or a clean./...single package inside the staged plugin sourceVerification
GOWORK=off go test ./cmd/wfctl -run TestPluginConformance -count=1git diff --checkRegression proof
With fix reverted:
GOWORK=off go test ./cmd/wfctl -run TestPluginConformanceBuildsRequestedPackage -count=1flag provided but not defined: -build-packageWith fix restored:
GOWORK=off go test ./cmd/wfctl -run TestPluginConformanceBuildsRequestedPackage -count=1Review
-toolexec, module paths, artifact ambiguity); this PR rejects those beforego build.