Skip to content

feat: allow infra apply to skip bootstrap#713

Merged
intel352 merged 1 commit into
mainfrom
fix/wfctl-apply-skip-bootstrap
May 19, 2026
Merged

feat: allow infra apply to skip bootstrap#713
intel352 merged 1 commit into
mainfrom
fix/wfctl-apply-skip-bootstrap

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • add wfctl infra apply --skip-bootstrap for scoped/operator applies where required secrets and state already exist
  • keep default auto-bootstrap behavior unchanged
  • add a regression covering --plan apply with infra.auto_bootstrap: true and skipped bootstrap
  • document the flag in WFCTL docs and embedded DSL reference

Validation

  • GOWORK=off go test ./cmd/wfctl -run 'TestInfraApply|TestParseInfraConfig_AutoBootstrap|TestInfraApplyPlanSkipBootstrap|TestInfraApplyConsumesPlan' -count=1
  • GOWORK=off go test ./config -run 'Test.*AutoBootstrap|TestRoundTrip' -count=1
  • GOWORK=off go build ./cmd/wfctl
  • git diff --check

Copilot AI review requested due to automatic review settings May 19, 2026 14:37
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a --skip-bootstrap flag to wfctl infra apply to allow operators to skip the auto-bootstrap step when required secrets/state already exist, while preserving the default auto-bootstrap behavior.

Changes:

  • New --skip-bootstrap boolean flag wired into runInfraApply, which gates the autoBootstrap decision.
  • Documentation updates in docs/WFCTL.md and the embedded DSL reference describing the flag and its intended use.
  • New regression test TestInfraApplyPlanSkipBootstrap verifying the --plan + --skip-bootstrap path with infra.auto_bootstrap: true.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
cmd/wfctl/infra.go Adds --skip-bootstrap flag and incorporates it into the autoBootstrap predicate.
cmd/wfctl/infra_apply_plan_test.go New test ensuring --skip-bootstrap bypasses bootstrap on the --plan apply path.
docs/WFCTL.md Documents the new flag in the apply usage and options table.
cmd/wfctl/dsl-reference-embedded.md Adds guidance on appropriate usage of --skip-bootstrap.

@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:398378: parsing iteration count: invalid syntax
baseline-bench.txt:986313: parsing iteration count: invalid syntax
baseline-bench.txt:1414537: parsing iteration count: invalid syntax
baseline-bench.txt:1732703: parsing iteration count: invalid syntax
baseline-bench.txt:2050443: parsing iteration count: invalid syntax
benchmark-results.txt:274: parsing iteration count: invalid syntax
benchmark-results.txt:265262: parsing iteration count: invalid syntax
benchmark-results.txt:602364: parsing iteration count: invalid syntax
benchmark-results.txt:922822: parsing iteration count: invalid syntax
benchmark-results.txt:1215338: parsing iteration count: invalid syntax
benchmark-results.txt:1556181: 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                  6.658m ± 55%
ComponentLoad-4                        3.555m ± 11%
ComponentExecute-4                     1.842µ ±  2%
PoolContention/workers-1-4             1.022µ ±  4%
PoolContention/workers-2-4             1.042µ ±  1%
PoolContention/workers-4-4             1.032µ ±  3%
PoolContention/workers-8-4             1.031µ ±  1%
PoolContention/workers-16-4            1.027µ ±  1%
ComponentLifecycle-4                   3.560m ±  1%
SourceValidation-4                     2.090µ ±  1%
RegistryConcurrent-4                   737.1n ±  0%
LoaderLoadFromString-4                 3.545m ±  1%
geomean                                17.76µ

                            │ 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.178m ± 59%
ComponentLoad-4                     3.378m ±  9%
ComponentExecute-4                  1.822µ ±  1%
PoolContention/workers-1-4          1.170µ ±  2%
PoolContention/workers-2-4          1.164µ ±  2%
PoolContention/workers-4-4          1.183µ ±  0%
PoolContention/workers-8-4          1.179µ ±  3%
PoolContention/workers-16-4         1.169µ ±  1%
ComponentLifecycle-4                3.444m ±  0%
SourceValidation-4                  2.266µ ±  1%
RegistryConcurrent-4                956.1n ±  3%
LoaderLoadFromString-4              3.487m ±  3%
geomean                             19.23µ

                            │ 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                     296.5n ± 5%
CircuitBreakerExecution_Success-4             22.67n ± 1%
CircuitBreakerExecution_Failure-4             71.00n ± 0%
geomean                                       78.15n

                                  │ 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.0n ± 1%
CircuitBreakerExecution_Success-4          59.72n ± 0%
CircuitBreakerExecution_Failure-4          64.90n ± 0%
geomean                                    120.3n

                                  │ 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                 295.1n ± 21%
IaCStateBackend_GRPC-4                      10.08m ±  3%
JQTransform_Simple-4                        625.6n ± 46%
JQTransform_ObjectConstruction-4            1.500µ ±  0%
JQTransform_ArraySelect-4                   3.538µ ±  2%
JQTransform_Complex-4                       42.39µ ±  2%
JQTransform_Throughput-4                    1.846µ ±  1%
SSEPublishDelivery-4                        65.17n ±  1%
geomean                                     3.871µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.830Mi ± 12%
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.862k ± 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              338.1n ±  1%
IaCStateBackend_GRPC-4                   9.558m ± 35%
JQTransform_Simple-4                     673.5n ± 33%
JQTransform_ObjectConstruction-4         1.494µ ±  1%
JQTransform_ArraySelect-4                3.209µ ±  0%
JQTransform_Complex-4                    35.10µ ±  0%
JQTransform_Throughput-4                 1.824µ ±  2%
SSEPublishDelivery-4                     76.41n ±  1%
geomean                                  3.877µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.721Mi ± 13%
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.869k ± 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.079µ ± 20%
SchemaValidation_AllFields-4                   1.649µ ±  4%
SchemaValidation_FormatValidation-4            1.565µ ±  3%
SchemaValidation_ManySchemas-4                 1.585µ ±  2%
geomean                                        1.449µ

                                    │ 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.042µ ±  1%
SchemaValidation_AllFields-4                1.533µ ± 31%
SchemaValidation_FormatValidation-4         1.497µ ±  2%
SchemaValidation_ManySchemas-4              1.489µ ±  4%
geomean                                     1.373µ

                                    │ 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.175µ ±  8%
EventStoreAppend_SQLite-4                     1.042m ±  8%
GetTimeline_InMemory/events-10-4              13.12µ ±  2%
GetTimeline_InMemory/events-50-4              74.24µ ±  3%
GetTimeline_InMemory/events-100-4             128.9µ ± 17%
GetTimeline_InMemory/events-500-4             598.7µ ±  1%
GetTimeline_InMemory/events-1000-4            1.221m ±  2%
GetTimeline_SQLite/events-10-4                89.86µ ±  1%
GetTimeline_SQLite/events-50-4                233.7µ ±  4%
GetTimeline_SQLite/events-100-4               409.2µ ±  1%
GetTimeline_SQLite/events-500-4               1.776m ±  1%
GetTimeline_SQLite/events-1000-4              3.424m ±  2%
geomean                                       206.1µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     802.0 ± 7%
EventStoreAppend_SQLite-4                     1.984Ki ± 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.43Ki

                                   │ 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.115µ ± 14%
EventStoreAppend_SQLite-4                  866.9µ ±  2%
GetTimeline_InMemory/events-10-4           13.10µ ±  2%
GetTimeline_InMemory/events-50-4           74.10µ ±  4%
GetTimeline_InMemory/events-100-4          148.6µ ±  2%
GetTimeline_InMemory/events-500-4          735.4µ ± 20%
GetTimeline_InMemory/events-1000-4         1.197m ±  1%
GetTimeline_SQLite/events-10-4             79.19µ ±  1%
GetTimeline_SQLite/events-50-4             226.6µ ±  2%
GetTimeline_SQLite/events-100-4            410.0µ ±  0%
GetTimeline_SQLite/events-500-4            1.850m ±  2%
GetTimeline_SQLite/events-1000-4           3.627m ±  1%
geomean                                    206.6µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  800.0 ± 7%
EventStoreAppend_SQLite-4                  1.984Ki ± 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.41Ki

                                   │ 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 07786a2 into main May 19, 2026
21 checks passed
@intel352 intel352 deleted the fix/wfctl-apply-skip-bootstrap branch May 19, 2026 14:50
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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