feat(v2): ComputePlanVersion=v2 + workflow v0.54.0 + minEngine 0.54.0#10
Conversation
…e 0.54.0 Phase 2 cascade per workflow#640 + ADR 0040: opt this plugin into the v2 action lifecycle contract. wfctl v0.54.0+ expects plugins declaring ComputePlanVersion="v2" to populate ApplyResult.Actions with one ActionResult per planned action and to never emit ACTION_STATUS_UNSPECIFIED or unknown wire tags. Per ADR 0024 + ADR 0040, plugins NOT declaring v2 are permanently incompatible with workflow v0.54.0+; there is no compat shim. Surface changes (4 files; minimal): - go.mod: pin workflow v0.53.0 → v0.54.0; go.sum refreshed via tidy - plugin.json: minEngineVersion 0.53.0 → 0.54.0 - internal/iacserver.go: gcpIaCServer.Capabilities return-struct literal adds ComputePlanVersion: "v2" (no signature, receiver, or parameter change) Rollback: cut v1.2.1 re-pinning workflow → v0.53.0 + dropping ComputePlanVersion="v2". Verification: - go mod tidy clean - GOWORK=off go build ./... clean - GOWORK=off go test ./... -race -count=1 → all PASS Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the GCP plugin to be compatible with workflow engine v0.54.0+ by opting into the v2 action lifecycle contract and updating the engine/dependency pins accordingly.
Changes:
- Bump
github.com/GoCodeAlone/workflowdependency fromv0.53.0tov0.54.0. - Raise
plugin.jsonminEngineVersionfrom0.53.0to0.54.0. - Advertise v2 planning/apply contract support by returning
ComputePlanVersion: "v2"fromCapabilities.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugin.json | Raises required workflow engine version to 0.54.0. |
| internal/iacserver.go | Declares ComputePlanVersion: "v2" in CapabilitiesResponse. |
| go.mod | Upgrades workflow module dependency to v0.54.0. |
| go.sum | Refreshes module checksums after dependency update/tidy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "tier": "community", | ||
| "license": "MIT", | ||
| "minEngineVersion": "0.53.0", | ||
| "minEngineVersion": "0.54.0", | ||
| "repository": "https://github.com/GoCodeAlone/workflow-plugin-gcp", | ||
| "keywords": ["gcp", "google-cloud", "iac", "provider", "infrastructure"], |
| }) | ||
| } | ||
| return &pb.CapabilitiesResponse{Capabilities: out}, nil | ||
| return &pb.CapabilitiesResponse{Capabilities: out, ComputePlanVersion: "v2"}, nil |
Copilot's flag on PR #10 inline iacserver.go:125: the v2 contract signal isn't asserted in the existing Capabilities test coverage. Add TestGCPIaCServer_Capabilities_ComputePlanVersionV2 so a typo or accidental drop in internal/iacserver.go's return literal fails the test rather than slipping through. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Re Copilot's flag at Acknowledged. The mismatch exists for a small post-merge / pre-tag window only. The repo has the
So the window of inconsistency is bounded to release time and self-heals automatically; pre-bumping Test for the v2 capability signal is added in commit e184d2a (Copilot's Finding 2). Re Finding 2 ( |
Summary
Phase 2 cascade per workflow#640 + ADR 0040. Opts this plugin into the v2 action lifecycle contract: declares
ComputePlanVersion="v2"inCapabilitiesResponseso wfctl v0.54.0+ knows to expect populatedApplyResult.Actions(oneActionResultper planned action, noACTION_STATUS_UNSPECIFIED, no unknown tags).Per ADR 0024 + ADR 0040, plugins NOT declaring v2 are permanently incompatible with workflow v0.54.0+; there is no compat shim. This PR makes the GCP plugin v0.54.0-compatible.
Surface changes (minimal — 4 files)
go.mod: workflow v0.53.0 → v0.54.0go.sum: refreshed viago mod tidyplugin.json:minEngineVersion0.53.0 → 0.54.0internal/iacserver.go:gcpIaCServer.Capabilitiesreturn-struct literal addsComputePlanVersion: "v2"(no signature/receiver/parameter change)Rollback (if downstream breaks)
Cut
v1.2.1re-pinningworkflow → v0.53.0and droppingComputePlanVersion="v2". Per ADR 0040,v1.2.xtags can only target workflow v0.54.0+, so a true rollback to v0.53.x users requires the v1.2.1 with the v0.53.x pin restored.Test plan
go mod tidycleanGOWORK=off go build ./...cleanGOWORK=off go test ./... -race -count=1→ all PASSCoordinated cascade
This is PR 3 of 5 in the v2-phase2 plugin cascade (PR 1 was the workflow engine PR #694, merged at v0.54.0; PR 2 is GoCodeAlone/workflow-plugin-aws#16). Sibling PRs: aws (sibling), azure, digitalocean. All five plugins must declare v2 to maintain ecosystem compatibility with workflow v0.54.0+.
🤖 Generated with Claude Code