Skip to content

fix(wfctl): preserve iac provider plan metadata#710

Merged
intel352 merged 1 commit into
mainfrom
fix/iac-v2-installed-manifest
May 18, 2026
Merged

fix(wfctl): preserve iac provider plan metadata#710
intel352 merged 1 commit into
mainfrom
fix/iac-v2-installed-manifest

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • Preserve top-level iacProvider metadata when wfctl rewrites installed plugin.json files
  • Add computePlanVersion to the registry manifest model so v2 declarations survive install
  • Cover the DigitalOcean/BMW warning path with a regression test

Verification

  • GOWORK=off go test ./cmd/wfctl -run 'TestInstalledManifestPreservesIaCProviderComputePlanVersion|TestFindIaCPluginDir_ComputePlanVersionValidation|TestInstalledManifestPreservesCLICommandsAndBuildHooks|TestInstalledManifestEngineValidation' -count=1\n- GOWORK=off go test ./cmd/wfctl\n- git diff --check\n\n## Context\nBMW deploy logs showed wfctl warning that digitalocean had empty manifest iacProvider.computePlanVersion even though the plugin runtime CapabilitiesResponse advertises v2. The installer was overwriting the archive plugin.json from registry data and dropping that top-level metadata.

Copilot AI review requested due to automatic review settings May 18, 2026 17:54
Copy link
Copy Markdown
Contributor

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 wfctl plugin installation so registry-provided IaC provider metadata survives the plugin.json rewrite performed during install, addressing missing iacProvider.computePlanVersion warnings for v2 IaC plugins.

Changes:

  • Adds top-level iacProvider support to registry and installed manifest models.
  • Persists registry iacProvider metadata into installed plugin.json.
  • Adds a regression test for preserving computePlanVersion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cmd/wfctl/plugin_registry.go Extends registry manifest structs for top-level IaC provider metadata.
cmd/wfctl/plugin_install.go Writes top-level IaC provider metadata into installed plugin.json.
cmd/wfctl/plugin_install_e2e_test.go Adds regression coverage for preserving computePlanVersion.

Keywords []string `json:"keywords,omitempty"`
Homepage string `json:"homepage,omitempty"`
Capabilities *RegistryCapabilities `json:"capabilities,omitempty"`
IaCProvider *RegistryIaCProvider `json:"iacProvider,omitempty"`
ResourceTypes []string `json:"resourceTypes,omitempty"`
ComputePlanVersion string `json:"computePlanVersion,omitempty"`
}

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:274: parsing iteration count: invalid syntax
baseline-bench.txt:333617: parsing iteration count: invalid syntax
baseline-bench.txt:648465: parsing iteration count: invalid syntax
baseline-bench.txt:948553: parsing iteration count: invalid syntax
baseline-bench.txt:1312691: parsing iteration count: invalid syntax
baseline-bench.txt:1729782: parsing iteration count: invalid syntax
benchmark-results.txt:274: parsing iteration count: invalid syntax
benchmark-results.txt:566054: parsing iteration count: invalid syntax
benchmark-results.txt:894996: parsing iteration count: invalid syntax
benchmark-results.txt:1227118: parsing iteration count: invalid syntax
benchmark-results.txt:1553165: parsing iteration count: invalid syntax
benchmark-results.txt:1859466: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  7.739m ± 60%
ComponentLoad-4                        3.604m ±  1%
ComponentExecute-4                     1.853µ ±  1%
PoolContention/workers-1-4             1.026µ ±  4%
PoolContention/workers-2-4             1.020µ ±  2%
PoolContention/workers-4-4             1.025µ ±  1%
PoolContention/workers-8-4             1.027µ ±  1%
PoolContention/workers-16-4            1.020µ ±  2%
ComponentLifecycle-4                   3.603m ±  2%
SourceValidation-4                     2.104µ ±  1%
RegistryConcurrent-4                   776.4n ±  5%
LoaderLoadFromString-4                 3.702m ±  2%
geomean                                18.13µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               7.736m ± 61%
ComponentLoad-4                     3.477m ±  5%
ComponentExecute-4                  1.864µ ±  1%
PoolContention/workers-1-4          1.168µ ±  1%
PoolContention/workers-2-4          1.171µ ±  1%
PoolContention/workers-4-4          1.173µ ±  3%
PoolContention/workers-8-4          1.173µ ±  0%
PoolContention/workers-16-4         1.205µ ±  3%
ComponentLifecycle-4                3.562m ±  1%
SourceValidation-4                  2.280µ ±  2%
RegistryConcurrent-4                925.4n ±  4%
LoaderLoadFromString-4              3.514m ±  1%
geomean                             19.49µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     298.7n ± 3%
CircuitBreakerExecution_Success-4             22.67n ± 0%
CircuitBreakerExecution_Failure-4             70.93n ± 0%
geomean                                       78.31n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  449.4n ± 1%
CircuitBreakerExecution_Success-4          59.74n ± 0%
CircuitBreakerExecution_Failure-4          65.06n ± 2%
geomean                                    120.4n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 301.6n ± 28%
IaCStateBackend_GRPC-4                      10.51m ±  2%
JQTransform_Simple-4                        657.7n ± 31%
JQTransform_ObjectConstruction-4            1.451µ ±  0%
JQTransform_ArraySelect-4                   3.516µ ±  2%
JQTransform_Complex-4                       41.49µ ±  0%
JQTransform_Throughput-4                    1.744µ ±  1%
SSEPublishDelivery-4                        64.27n ±  0%
geomean                                     3.862µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.806Mi ± 10%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.22Ki ±  0%
JQTransform_Throughput-4                 1.984Ki ±  0%
SSEPublishDelivery-4                       0.000 ±  0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
IaCStateBackend_InProcess-4                 2.000 ± 0%
IaCStateBackend_GRPC-4                     6.861k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              341.2n ± 13%
IaCStateBackend_GRPC-4                   9.755m ± 25%
JQTransform_Simple-4                     718.9n ± 32%
JQTransform_ObjectConstruction-4         1.563µ ±  2%
JQTransform_ArraySelect-4                3.346µ ±  1%
JQTransform_Complex-4                    38.03µ ±  4%
JQTransform_Throughput-4                 1.993µ ±  3%
SSEPublishDelivery-4                     76.30n ±  1%
geomean                                  4.050µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.710Mi ± 16%
JQTransform_Simple-4                  1.273Ki ±  0%
JQTransform_ObjectConstruction-4      1.773Ki ±  0%
JQTransform_ArraySelect-4             2.625Ki ±  0%
JQTransform_Complex-4                 16.22Ki ±  0%
JQTransform_Throughput-4              1.984Ki ±  0%
SSEPublishDelivery-4                    0.000 ±  0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
IaCStateBackend_InProcess-4              2.000 ± 0%
IaCStateBackend_GRPC-4                  6.870k ± 0%
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                       1.087µ ± 8%
SchemaValidation_AllFields-4                    1.618µ ± 2%
SchemaValidation_FormatValidation-4             1.581µ ± 2%
SchemaValidation_ManySchemas-4                  1.604µ ± 1%
geomean                                         1.453µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.022µ ±  3%
SchemaValidation_AllFields-4                1.537µ ± 36%
SchemaValidation_FormatValidation-4         1.498µ ±  1%
SchemaValidation_ManySchemas-4              1.489µ ±  4%
geomean                                     1.368µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.072µ ± 20%
EventStoreAppend_SQLite-4                     1.026m ±  5%
GetTimeline_InMemory/events-10-4              12.36µ ±  3%
GetTimeline_InMemory/events-50-4              68.50µ ±  1%
GetTimeline_InMemory/events-100-4             138.1µ ± 20%
GetTimeline_InMemory/events-500-4             560.4µ ±  0%
GetTimeline_InMemory/events-1000-4            1.139m ±  1%
GetTimeline_SQLite/events-10-4                83.69µ ±  2%
GetTimeline_SQLite/events-50-4                218.9µ ±  1%
GetTimeline_SQLite/events-100-4               391.1µ ±  0%
GetTimeline_SQLite/events-500-4               1.662m ±  1%
GetTimeline_SQLite/events-1000-4              3.237m ±  0%
geomean                                       195.7µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     787.0 ± 8%
EventStoreAppend_SQLite-4                     1.986Ki ± 2%
GetTimeline_InMemory/events-10-4              7.953Ki ± 0%
GetTimeline_InMemory/events-50-4              46.62Ki ± 0%
GetTimeline_InMemory/events-100-4             94.48Ki ± 0%
GetTimeline_InMemory/events-500-4             472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4            944.3Ki ± 0%
GetTimeline_SQLite/events-10-4                16.74Ki ± 0%
GetTimeline_SQLite/events-50-4                87.14Ki ± 0%
GetTimeline_SQLite/events-100-4               175.4Ki ± 0%
GetTimeline_SQLite/events-500-4               846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4              1.639Mi ± 0%
geomean                                       67.33Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.145µ ±  3%
EventStoreAppend_SQLite-4                  928.8µ ±  6%
GetTimeline_InMemory/events-10-4           14.07µ ±  3%
GetTimeline_InMemory/events-50-4           78.05µ ±  3%
GetTimeline_InMemory/events-100-4          154.7µ ±  4%
GetTimeline_InMemory/events-500-4          618.7µ ± 29%
GetTimeline_InMemory/events-1000-4         1.274m ±  2%
GetTimeline_SQLite/events-10-4             82.73µ ±  3%
GetTimeline_SQLite/events-50-4             236.9µ ±  1%
GetTimeline_SQLite/events-100-4            428.1µ ±  1%
GetTimeline_SQLite/events-500-4            1.943m ±  1%
GetTimeline_SQLite/events-1000-4           3.855m ±  2%
geomean                                    213.5µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  783.0 ± 7%
EventStoreAppend_SQLite-4                  1.985Ki ± 1%
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%
geomean                                    67.30Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

@intel352 intel352 merged commit 0a3ffdd into main May 18, 2026
26 checks passed
@intel352 intel352 deleted the fix/iac-v2-installed-manifest branch May 18, 2026 18:07
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