Skip to content

fix(wfctl): forward gen.Name to provider_credential generator#733

Merged
intel352 merged 1 commit into
mainfrom
fix/forward-gen-name-1779260857
May 20, 2026
Merged

fix(wfctl): forward gen.Name to provider_credential generator#733
intel352 merged 1 commit into
mainfrom
fix/forward-gen-name-1779260857

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Regression: v0.60.4 added a hard 'name required' check to digitalocean.spaces provider_credential, but bootstrapSecrets never forwarded gen.Name into the generator config. Caught when gocodealone-multisite apply-prereq failed despite deploy.prereq.yaml having name set. One-liner fix + regression test.

SecretGen has a yaml `name:` field but bootstrapSecrets dropped it
when building genConfig. v0.60.4 made name required for
digitalocean.spaces, so every project's apply-prereq broke despite
their deploy.prereq.yaml correctly setting it.

Add gen.Name → genConfig["name"] propagation. Regression test
asserts the generator receives the configured name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 07:08
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

Fixes a wfctl infra bootstrap regression where secrets.generate[].name was not forwarded into the secret generator config, causing provider_credential generators (notably digitalocean.spaces) to fail after a “name required” validation was introduced.

Changes:

  • Forward SecretGen.Name into the genConfig passed to secrets.GenerateSecret.
  • Add a regression test asserting the generator receives name (and source) for provider_credential.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/wfctl/infra_bootstrap.go Forwards gen.Name into the generator config map used by bootstrapSecrets.
cmd/wfctl/infra_bootstrap_secrets_test.go Adds regression test to verify name is propagated into the generator config.

}
if _, _, err := bootstrapSecrets(context.Background(), p, cfg, nil); err != nil {
t.Fatalf("bootstrapSecrets: %v", err)
}
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 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:333041: parsing iteration count: invalid syntax
baseline-bench.txt:627396: parsing iteration count: invalid syntax
baseline-bench.txt:958006: parsing iteration count: invalid syntax
baseline-bench.txt:1255259: parsing iteration count: invalid syntax
baseline-bench.txt:1579101: parsing iteration count: invalid syntax
benchmark-results.txt:274: parsing iteration count: invalid syntax
benchmark-results.txt:310808: parsing iteration count: invalid syntax
benchmark-results.txt:643983: parsing iteration count: invalid syntax
benchmark-results.txt:952825: parsing iteration count: invalid syntax
benchmark-results.txt:1259129: parsing iteration count: invalid syntax
benchmark-results.txt:1526070: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  8.931m ± 65%
ComponentLoad-4                        3.574m ±  2%
ComponentExecute-4                     1.958µ ±  1%
PoolContention/workers-1-4             1.113µ ±  1%
PoolContention/workers-2-4             1.084µ ±  4%
PoolContention/workers-4-4             1.088µ ±  1%
PoolContention/workers-8-4             1.101µ ±  1%
PoolContention/workers-16-4            1.093µ ±  2%
ComponentLifecycle-4                   3.603m ±  1%
SourceValidation-4                     2.298µ ±  1%
RegistryConcurrent-4                   804.6n ±  2%
LoaderLoadFromString-4                 3.636m ±  2%
geomean                                19.12µ

                            │ 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               9.065m ± 67%
ComponentLoad-4                     3.462m ±  1%
ComponentExecute-4                  1.847µ ±  1%
PoolContention/workers-1-4          1.185µ ±  1%
PoolContention/workers-2-4          1.188µ ±  2%
PoolContention/workers-4-4          1.183µ ±  2%
PoolContention/workers-8-4          1.200µ ±  1%
PoolContention/workers-16-4         1.237µ ±  4%
ComponentLifecycle-4                3.653m ±  2%
SourceValidation-4                  2.317µ ±  0%
RegistryConcurrent-4                959.2n ±  5%
LoaderLoadFromString-4              3.625m ±  2%
geomean                             20.05µ

                            │ 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 7763 64-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     283.5n ± 0%
CircuitBreakerExecution_Success-4             21.46n ± 1%
CircuitBreakerExecution_Failure-4             66.20n ± 0%
geomean                                       73.85n

                                  │ 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                  453.1n ± 0%
CircuitBreakerExecution_Success-4          59.82n ± 1%
CircuitBreakerExecution_Failure-4          65.51n ± 0%
geomean                                    121.1n

                                  │ 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 7763 64-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 309.6n ± 30%
IaCStateBackend_GRPC-4                      9.586m ±  3%
JQTransform_Simple-4                        698.9n ± 33%
JQTransform_ObjectConstruction-4            1.515µ ±  2%
JQTransform_ArraySelect-4                   3.478µ ±  2%
JQTransform_Complex-4                       39.13µ ±  1%
JQTransform_Throughput-4                    1.892µ ±  3%
SSEPublishDelivery-4                        63.72n ±  0%
geomean                                     3.881µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                 416.0 ± 0%
IaCStateBackend_GRPC-4                    5.842Mi ± 7%
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.837k ± 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              343.8n ± 34%
IaCStateBackend_GRPC-4                   9.904m ±  4%
JQTransform_Simple-4                     719.2n ± 28%
JQTransform_ObjectConstruction-4         1.532µ ±  1%
JQTransform_ArraySelect-4                3.352µ ±  1%
JQTransform_Complex-4                    36.84µ ±  3%
JQTransform_Throughput-4                 1.883µ ±  1%
SSEPublishDelivery-4                     76.30n ±  1%
geomean                                  4.008µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.649Mi ± 14%
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.873k ± 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 7763 64-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.116µ ± 15%
SchemaValidation_AllFields-4                   1.663µ ±  4%
SchemaValidation_FormatValidation-4            1.571µ ±  1%
SchemaValidation_ManySchemas-4                 1.802µ ±  2%
geomean                                        1.514µ

                                    │ 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.016µ ± 36%
SchemaValidation_AllFields-4                1.518µ ±  3%
SchemaValidation_FormatValidation-4         1.492µ ±  1%
SchemaValidation_ManySchemas-4              1.528µ ±  3%
geomean                                     1.369µ

                                    │ 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 7763 64-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.228µ ± 15%
EventStoreAppend_SQLite-4                     1.472m ±  5%
GetTimeline_InMemory/events-10-4              13.77µ ±  3%
GetTimeline_InMemory/events-50-4              75.43µ ± 18%
GetTimeline_InMemory/events-100-4             122.9µ ±  1%
GetTimeline_InMemory/events-500-4             631.4µ ±  1%
GetTimeline_InMemory/events-1000-4            1.302m ±  1%
GetTimeline_SQLite/events-10-4                107.0µ ±  1%
GetTimeline_SQLite/events-50-4                248.3µ ±  1%
GetTimeline_SQLite/events-100-4               421.2µ ±  1%
GetTimeline_SQLite/events-500-4               1.798m ±  1%
GetTimeline_SQLite/events-1000-4              3.518m ±  1%
geomean                                       220.8µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     790.5 ± 7%
EventStoreAppend_SQLite-4                     1.985Ki ± 3%
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.35Ki

                                   │ 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.126µ ± 18%
EventStoreAppend_SQLite-4                  968.9µ ±  6%
GetTimeline_InMemory/events-10-4           13.75µ ±  2%
GetTimeline_InMemory/events-50-4           75.05µ ±  4%
GetTimeline_InMemory/events-100-4          150.4µ ±  4%
GetTimeline_InMemory/events-500-4          625.3µ ± 20%
GetTimeline_InMemory/events-1000-4         1.285m ±  1%
GetTimeline_SQLite/events-10-4             84.59µ ±  1%
GetTimeline_SQLite/events-50-4             241.6µ ±  1%
GetTimeline_SQLite/events-100-4            433.7µ ±  1%
GetTimeline_SQLite/events-500-4            1.946m ±  2%
GetTimeline_SQLite/events-1000-4           3.821m ±  1%
geomean                                    213.5µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  776.5 ± 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.25Ki

                                   │ 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 4316674 into main May 20, 2026
28 checks passed
@intel352 intel352 deleted the fix/forward-gen-name-1779260857 branch May 20, 2026 07:20
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