Skip to content

feat(wfctl): wait for infra apply health#754

Merged
intel352 merged 2 commits into
mainfrom
fix/infra-apply-wait
May 22, 2026
Merged

feat(wfctl): wait for infra apply health#754
intel352 merged 2 commits into
mainfrom
fix/infra-apply-wait

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • add wfctl infra apply --wait
  • wait on infra.container_service health after successful apply
  • also health-check current container services when there are no plan changes

Verification

  • go test ./cmd/wfctl -run 'TestWaitForInfraHealth' -count=1
  • go test ./cmd/wfctl -run 'TestWaitForInfraHealth|TestApplyInfraModules_DirectPath|TestApplyInfraModules_ScopesCurrentStatePerProvider' -count=1
  • go test ./cmd/wfctl

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 57.37705% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/infra_apply.go 53.57% 18 Missing and 8 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:276: parsing iteration count: invalid syntax
baseline-bench.txt:263641: parsing iteration count: invalid syntax
baseline-bench.txt:539651: parsing iteration count: invalid syntax
baseline-bench.txt:1045110: parsing iteration count: invalid syntax
baseline-bench.txt:1380406: parsing iteration count: invalid syntax
baseline-bench.txt:1892126: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:300730: parsing iteration count: invalid syntax
benchmark-results.txt:542933: parsing iteration count: invalid syntax
benchmark-results.txt:868713: parsing iteration count: invalid syntax
benchmark-results.txt:1157875: parsing iteration count: invalid syntax
benchmark-results.txt:1464941: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ baseline-bench.txt │       benchmark-results.txt        │
                            │       sec/op       │    sec/op     vs base              │
InterpreterCreation-4               6.342m ± 86%   5.991m ± 85%       ~ (p=0.937 n=6)
ComponentLoad-4                     3.592m ±  5%   3.576m ±  1%       ~ (p=0.310 n=6)
ComponentExecute-4                  1.946µ ±  1%   1.946µ ±  1%       ~ (p=0.909 n=6)
PoolContention/workers-1-4          1.090µ ±  1%   1.082µ ±  3%       ~ (p=0.126 n=6)
PoolContention/workers-2-4          1.102µ ±  2%   1.091µ ±  3%       ~ (p=0.699 n=6)
PoolContention/workers-4-4          1.115µ ±  2%   1.105µ ±  1%       ~ (p=0.058 n=6)
PoolContention/workers-8-4          1.105µ ±  2%   1.101µ ±  1%       ~ (p=0.556 n=6)
PoolContention/workers-16-4         1.099µ ±  4%   1.093µ ±  1%  -0.55% (p=0.026 n=6)
ComponentLifecycle-4                3.700m ±  1%   3.636m ±  1%  -1.72% (p=0.002 n=6)
SourceValidation-4                  2.376µ ±  2%   2.313µ ±  1%  -2.67% (p=0.002 n=6)
RegistryConcurrent-4                866.9n ±  2%   782.4n ±  3%  -9.75% (p=0.002 n=6)
LoaderLoadFromString-4              3.666m ±  1%   3.630m ±  1%  -0.98% (p=0.004 n=6)
geomean                             18.85µ         18.46µ        -2.09%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.589 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.554 n=6)
ComponentExecute-4                  1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4         1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                2.183Mi ± 0%   2.183Mi ± 0%       ~ (p=0.665 n=6)
SourceValidation-4                  1.984Ki ± 0%   1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                1.133Ki ± 0%   1.133Ki ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4              2.182Mi ± 0%   2.182Mi ± 0%       ~ (p=0.513 n=6)
geomean                             15.25Ki        15.25Ki       -0.00%
¹ all samples are equal

                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │     allocs/op      │  allocs/op   vs base                │
InterpreterCreation-4                15.68k ± 0%   15.68k ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                      18.02k ± 0%   18.02k ± 0%       ~ (p=1.000 n=6)
ComponentExecute-4                    25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4           25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                 18.07k ± 0%   18.07k ± 0%       ~ (p=1.000 n=6) ¹
SourceValidation-4                    32.00 ± 0%    32.00 ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                  2.000 ± 0%    2.000 ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4               18.06k ± 0%   18.06k ± 0%       ~ (p=1.000 n=6) ¹
geomean                               183.3         183.3       +0.00%
¹ all samples are equal

pkg: github.com/GoCodeAlone/workflow/middleware
                                  │ baseline-bench.txt │       benchmark-results.txt       │
                                  │       sec/op       │   sec/op     vs base              │
CircuitBreakerDetection-4                 288.2n ± 11%   286.4n ± 4%  -0.66% (p=0.022 n=6)
CircuitBreakerExecution_Success-4         21.52n ±  0%   21.51n ± 2%       ~ (p=0.937 n=6)
CircuitBreakerExecution_Failure-4         66.31n ±  0%   66.33n ± 0%       ~ (p=0.665 n=6)
geomean                                   74.37n         74.20n       -0.22%

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │        B/op        │    B/op     vs base                │
CircuitBreakerDetection-4                 144.0 ± 0%     144.0 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │     allocs/op      │ allocs/op   vs base                │
CircuitBreakerDetection-4                 1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │       sec/op       │    sec/op     vs base              │
IaCStateBackend_InProcess-4              312.5n ± 17%   308.8n ± 29%       ~ (p=0.310 n=6)
IaCStateBackend_GRPC-4                   9.441m ±  7%   9.473m ±  6%       ~ (p=1.000 n=6)
JQTransform_Simple-4                     673.8n ± 36%   656.6n ± 40%       ~ (p=0.394 n=6)
JQTransform_ObjectConstruction-4         1.528µ ±  0%   1.526µ ±  1%       ~ (p=0.853 n=6)
JQTransform_ArraySelect-4                3.471µ ±  1%   3.466µ ±  1%       ~ (p=1.000 n=6)
JQTransform_Complex-4                    39.24µ ±  2%   38.87µ ±  1%       ~ (p=0.240 n=6)
JQTransform_Throughput-4                 1.864µ ±  1%   1.868µ ±  0%       ~ (p=0.669 n=6)
SSEPublishDelivery-4                     64.08n ±  4%   64.24n ±  1%       ~ (p=0.937 n=6)
geomean                                  3.861µ         3.841µ        -0.53%

                                 │ baseline-bench.txt │         benchmark-results.txt         │
                                 │        B/op        │     B/op       vs base                │
IaCStateBackend_InProcess-4             416.0 ±  0%       416.0 ±  0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                5.908Mi ± 10%     5.898Mi ± 12%       ~ (p=0.699 n=6)
JQTransform_Simple-4                  1.273Ki ±  0%     1.273Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4      1.773Ki ±  0%     1.773Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4             2.625Ki ±  0%     2.625Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                 16.22Ki ±  0%     16.22Ki ±  0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4              1.984Ki ±  0%     1.984Ki ±  0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                    0.000 ±  0%       0.000 ±  0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                  -0.02%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │     allocs/op      │  allocs/op   vs base                │
IaCStateBackend_InProcess-4              2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                  6.830k ± 0%     6.833k ± 0%       ~ (p=0.390 n=6)
JQTransform_Simple-4                     10.00 ± 0%      10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%      15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%      30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    324.0 ± 0%      324.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%      17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                +0.01%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
                                    │ baseline-bench.txt │       benchmark-results.txt       │
                                    │       sec/op       │   sec/op     vs base              │
SchemaValidation_Simple-4                    1.113µ ± 3%   1.127µ ± 3%       ~ (p=0.240 n=6)
SchemaValidation_AllFields-4                 1.653µ ± 3%   1.707µ ± 4%       ~ (p=0.065 n=6)
SchemaValidation_FormatValidation-4          1.587µ ± 2%   1.604µ ± 2%       ~ (p=0.145 n=6)
SchemaValidation_ManySchemas-4               1.849µ ± 2%   1.814µ ± 3%  -1.87% (p=0.028 n=6)
geomean                                      1.524µ        1.538µ       +0.93%

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │        B/op        │    B/op     vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │     allocs/op      │ allocs/op   vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │       sec/op       │    sec/op     vs base               │
EventStoreAppend_InMemory-4                1.220µ ± 19%   1.222µ ± 17%        ~ (p=0.818 n=6)
EventStoreAppend_SQLite-4                  1.418m ±  8%   1.350m ±  3%   -4.78% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4           14.15µ ±  3%   13.80µ ±  3%        ~ (p=0.065 n=6)
GetTimeline_InMemory/events-50-4           80.46µ ±  4%   61.12µ ± 24%  -24.04% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4          158.2µ ±  4%   122.6µ ±  0%  -22.55% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          821.2µ ±  3%   631.6µ ±  2%  -23.10% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.359m ± 18%   1.293m ±  1%   -4.81% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             117.9µ ±  1%   106.8µ ±  1%   -9.42% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             265.1µ ±  1%   248.6µ ±  1%   -6.22% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            432.2µ ±  1%   420.1µ ±  0%   -2.79% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.846m ±  3%   1.792m ±  0%   -2.90% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.619m ±  2%   3.490m ±  5%   -3.57% (p=0.041 n=6)
geomean                                    237.0µ         214.9µ         -9.30%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                  799.5 ± 7%     770.0 ± 5%       ~ (p=0.190 n=6)
EventStoreAppend_SQLite-4                  1.985Ki ± 2%   1.985Ki ± 2%       ~ (p=0.734 n=6)
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%   7.953Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%   46.62Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%   94.48Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%   472.8Ki ± 0%  +0.00% (p=0.015 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ± 0%       ~ (p=0.141 n=6)
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%   16.74Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%   87.14Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%   175.4Ki ± 0%       ~ (p=1.000 n=6)
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%   846.1Ki ± 0%  -0.00% (p=0.015 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ± 0%       ~ (p=0.188 n=6)
geomean                                    67.41Ki        67.20Ki       -0.31%
¹ all samples are equal

                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │     allocs/op      │  allocs/op   vs base                │
EventStoreAppend_InMemory-4                  7.000 ± 0%    7.000 ± 0%       ~ (p=1.000 n=6) ¹
EventStoreAppend_SQLite-4                    53.00 ± 0%    53.00 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-10-4             125.0 ± 0%    125.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4             653.0 ± 0%    653.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4           1.306k ± 0%   1.306k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4           6.514k ± 0%   6.514k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-1000-4          13.02k ± 0%   13.02k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-10-4               382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4              1.852k ± 0%   1.852k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4             3.681k ± 0%   3.681k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4             18.54k ± 0%   18.54k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-1000-4            37.29k ± 0%   37.29k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                     1.162k        1.162k       +0.00%
¹ all samples are equal

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

@intel352 intel352 merged commit 940e5de into main May 22, 2026
24 checks passed
@intel352 intel352 deleted the fix/infra-apply-wait branch May 22, 2026 07:48
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.

1 participant