diff --git a/go.mod b/go.mod index 33b9e0e..d22c6e3 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( cloud.google.com/go/redis v1.18.3 cloud.google.com/go/run v1.15.0 cloud.google.com/go/storage v1.61.3 - github.com/GoCodeAlone/workflow v0.53.0 + github.com/GoCodeAlone/workflow v0.54.0 google.golang.org/api v0.272.0 google.golang.org/grpc v1.80.0 google.golang.org/protobuf v1.36.11 diff --git a/go.sum b/go.sum index b41d2da..0b6ac71 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/GoCodeAlone/modular/modules/jsonschema v1.15.0 h1:xb1mI4NZkzvNKQ2F6nk github.com/GoCodeAlone/modular/modules/jsonschema v1.15.0/go.mod h1:hhGouwAVsonmJ4Lain4jINZ9nZCoc9l9eF3BHbmR8eE= github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.8.0 h1:cvdLHbM/vzvygQTcAWSJsy+dAPzzwWyjzKMmTBFcFIo= github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.8.0/go.mod h1:/9ipMG4qM2CHQ14BfXKdVlYRJelef6M8MFI5TbZv67M= -github.com/GoCodeAlone/workflow v0.53.0 h1:+UjoWNHRB1aPiQfWJUltsXnZfupsqbGmItv9xZto4kY= -github.com/GoCodeAlone/workflow v0.53.0/go.mod h1:L1kIOZqebO1WPriHXcqT7bg/uS7pExR8pOrWvurqhR4= +github.com/GoCodeAlone/workflow v0.54.0 h1:8x5iVQ8di2BAAyr/uAD/PllTa1Sw9OFElMkje0onKB8= +github.com/GoCodeAlone/workflow v0.54.0/go.mod h1:RrmHdww6gAIUfyjJ7stz0fegxRmVGZvQ1FsuJ2F0C+U= github.com/GoCodeAlone/yaegi v0.17.2 h1:WK6Y6e0t1a6U7r+S2dN3CGWW1PizYD3zO0zneToZPxM= github.com/GoCodeAlone/yaegi v0.17.2/go.mod h1:z5Pr6Wse6QJcQvpgxTxzMAevFarH0N37TG88Y9dprx0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= @@ -689,8 +689,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bT go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 h1:TC+BewnDpeiAmcscXbGMfxkO+mwYUwE/VySwvw88PfA= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0/go.mod h1:J/ZyF4vfPwsSr9xJSPyQ4LqtcTPULFR64KwTikGLe+A= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0 h1:ZrPRak/kS4xI3AVXy8F7pipuDXmDsrO8Lg+yQjBLjw0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0/go.mod h1:3y6kQCWztq6hyW8Z9YxQDDm0Je9AJoFar2G0yDcmhRk= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= diff --git a/internal/iacserver.go b/internal/iacserver.go index a7b508d..c522903 100644 --- a/internal/iacserver.go +++ b/internal/iacserver.go @@ -122,7 +122,7 @@ func (s *gcpIaCServer) Capabilities(_ context.Context, _ *pb.CapabilitiesRequest Operations: append([]string(nil), c.Operations...), }) } - return &pb.CapabilitiesResponse{Capabilities: out}, nil + return &pb.CapabilitiesResponse{Capabilities: out, ComputePlanVersion: "v2"}, nil } func (s *gcpIaCServer) Plan(ctx context.Context, req *pb.PlanRequest) (*pb.PlanResponse, error) { diff --git a/internal/iacserver_test.go b/internal/iacserver_test.go index 6f1b325..13ab8d5 100644 --- a/internal/iacserver_test.go +++ b/internal/iacserver_test.go @@ -59,6 +59,22 @@ func TestGCPIaCServer_Capabilities_HasContainerService(t *testing.T) { } } +// TestGCPIaCServer_Capabilities_ComputePlanVersionV2 pins the Phase 2 +// contract signal: the plugin MUST declare ComputePlanVersion="v2" so +// wfctl v0.54.0+ knows to expect populated ApplyResult.Actions. Per +// workflow#640 Phase 2 + ADR 0040. A typo or accidental drop in +// internal/iacserver.go Capabilities() return literal fails this test. +func TestGCPIaCServer_Capabilities_ComputePlanVersionV2(t *testing.T) { + s := NewIaCServer() + resp, err := s.Capabilities(context.Background(), &pb.CapabilitiesRequest{}) + if err != nil { + t.Fatalf("Capabilities: %v", err) + } + if got, want := resp.GetComputePlanVersion(), "v2"; got != want { + t.Errorf("ComputePlanVersion: got %q, want %q", got, want) + } +} + func TestGCPIaCServer_Initialize_MissingProjectID(t *testing.T) { s := NewIaCServer() _, err := s.Initialize(context.Background(), &pb.InitializeRequest{ConfigJson: []byte(`{}`)}) diff --git a/plugin.json b/plugin.json index 1f1ecc1..7fb66c9 100644 --- a/plugin.json +++ b/plugin.json @@ -6,7 +6,7 @@ "type": "external", "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"], "capabilities": {