Skip to content

feat(v2): ComputePlanVersion=v2 + workflow v0.54.0 + minEngine 0.54.0#10

Merged
intel352 merged 2 commits into
mainfrom
feat/v2-capabilities-v2
May 16, 2026
Merged

feat(v2): ComputePlanVersion=v2 + workflow v0.54.0 + minEngine 0.54.0#10
intel352 merged 2 commits into
mainfrom
feat/v2-capabilities-v2

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Phase 2 cascade per workflow#640 + ADR 0040. Opts this plugin into the v2 action lifecycle contract: declares ComputePlanVersion="v2" in CapabilitiesResponse so wfctl v0.54.0+ knows to expect populated ApplyResult.Actions (one ActionResult per planned action, no ACTION_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.0
  • go.sum: refreshed via go mod tidy
  • plugin.json: minEngineVersion 0.53.0 → 0.54.0
  • internal/iacserver.go: gcpIaCServer.Capabilities return-struct literal adds ComputePlanVersion: "v2" (no signature/receiver/parameter change)

Rollback (if downstream breaks)

Cut v1.2.1 re-pinning workflow → v0.53.0 and dropping ComputePlanVersion="v2". Per ADR 0040, v1.2.x tags 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 tidy clean
  • GOWORK=off go build ./... clean
  • GOWORK=off go test ./... -race -count=1 → all PASS
  • CI passes
  • Copilot review

Coordinated 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

…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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/workflow dependency from v0.53.0 to v0.54.0.
  • Raise plugin.json minEngineVersion from 0.53.0 to 0.54.0.
  • Advertise v2 planning/apply contract support by returning ComputePlanVersion: "v2" from Capabilities.

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.

Comment thread plugin.json
Comment on lines 7 to 11
"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"],
Comment thread internal/iacserver.go
})
}
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>
@intel352
Copy link
Copy Markdown
Contributor Author

Re Copilot's flag at plugin.json:11 (manifest internal-inconsistency — version: 1.1.0 + v1.1.0 download URLs alongside minEngineVersion: 0.54.0):

Acknowledged. The mismatch exists for a small post-merge / pre-tag window only. The repo has the sync-plugin-version.yml workflow (added in main commit f7128e7) which auto-bumps plugin.json's version field and rewrites all downloads[].url entries to the new tag at release time. Concretely the post-merge sequence is:

  1. Squash-merge this PR to main → main briefly has minEngineVersion: 0.54.0 + version: 1.1.0 + v1.1.0 download URLs.
  2. git tag v1.2.0 && git push origin v1.2.0 → triggers GoReleaser + the sync workflow.
  3. Sync workflow commits the version/download bump back to main → manifest becomes internally consistent within minutes of the tag.
  4. GoReleaser publishes the v1.2.0 binaries the download URLs now point at.

So the window of inconsistency is bounded to release time and self-heals automatically; pre-bumping version in this PR would conflict with the sync workflow's commit. Same pattern is used across the plugin cascade (aws / azure / digitalocean) for the v0.54.0 cutover.

Test for the v2 capability signal is added in commit e184d2a (Copilot's Finding 2).

Re Finding 2 (iacserver.go:125 — no test for ComputePlanVersion): addressed in commit e184d2a — new TestGCPIaCServer_Capabilities_ComputePlanVersionV2 pins resp.GetComputePlanVersion() == "v2".

@intel352 intel352 merged commit 09e59a4 into main May 16, 2026
5 checks passed
@intel352 intel352 deleted the feat/v2-capabilities-v2 branch May 16, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants