Skip to content

feat(wfctl): add infra logs alias#747

Merged
intel352 merged 1 commit into
mainfrom
feat/wfctl-infra-logs
May 21, 2026
Merged

feat(wfctl): add infra logs alias#747
intel352 merged 1 commit into
mainfrom
feat/wfctl-infra-logs

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented May 21, 2026

Summary

  • adds wfctl infra logs as an alias for provider log capture
  • keeps wfctl logs capture unchanged
  • documents the infra action and covers the alias with wfctl tests

Validation

  • GOWORK=off go test ./cmd/wfctl -run 'TestInfraLogsAliasUsesProviderLogCapture|TestInfraUsageDocumentsConfigAwareImportFlags' -count=1
  • GOWORK=off go test ./cmd/wfctl ./interfaces ./plugin/external/proto ./plugin/external/sdk
  • GOWORK=off go build -o /tmp/wfctl-infra-logs ./cmd/wfctl
  • BMW local dry invocation reaches the DigitalOcean provider, then stops because no local DIGITALOCEAN_TOKEN is set: digitalocean: missing required config key 'token'

Copilot AI review requested due to automatic review settings May 21, 2026 02:49
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 adds wfctl infra logs as a convenience alias for the existing provider log capture functionality (wfctl logs capture), making log capture discoverable under the infra command group while keeping the original logs command behavior unchanged.

Changes:

  • Add wfctl infra logs dispatcher wiring and help text entry.
  • Implement runInfraLogs to route infra logs [capture] ... to the existing runLogsCapture behavior.
  • Add wfctl tests to cover the new alias and update infra usage expectations.

Reviewed changes

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

File Description
cmd/wfctl/logs.go Adds runInfraLogs alias handler that forwards to runLogsCapture.
cmd/wfctl/infra.go Wires new infra logs action into infra subcommand dispatch and usage output.
cmd/wfctl/logs_test.go Adds a test ensuring wfctl infra logs uses provider log capture and forwards key request fields.
cmd/wfctl/infra_env_integration_test.go Updates infra usage test to expect the new logs action to be documented.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/logs.go 50.00% 1 Missing and 1 partial ⚠️

📢 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:276: parsing iteration count: invalid syntax
baseline-bench.txt:359791: parsing iteration count: invalid syntax
baseline-bench.txt:773597: parsing iteration count: invalid syntax
baseline-bench.txt:1103016: parsing iteration count: invalid syntax
baseline-bench.txt:1738582: parsing iteration count: invalid syntax
baseline-bench.txt:2079227: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:333619: parsing iteration count: invalid syntax
benchmark-results.txt:620321: parsing iteration count: invalid syntax
benchmark-results.txt:934503: parsing iteration count: invalid syntax
benchmark-results.txt:1259776: parsing iteration count: invalid syntax
benchmark-results.txt:1550870: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │         benchmark-results.txt         │
                            │       sec/op       │     sec/op      vs base               │
InterpreterCreation-4              2.317m ± 266%    3.706m ± 199%        ~ (p=0.132 n=6)
ComponentLoad-4                    2.674m ±   5%    3.477m ±   7%  +30.03% (p=0.002 n=6)
ComponentExecute-4                 1.399µ ±   0%    1.830µ ±   1%  +30.82% (p=0.002 n=6)
PoolContention/workers-1-4         779.6n ±   2%   1030.0n ±   2%  +32.12% (p=0.002 n=6)
PoolContention/workers-2-4         776.4n ±   1%   1019.5n ±   2%  +31.32% (p=0.002 n=6)
PoolContention/workers-4-4         778.7n ±   1%   1011.0n ±   0%  +29.83% (p=0.002 n=6)
PoolContention/workers-8-4         781.4n ±   1%   1008.5n ±   1%  +29.07% (p=0.002 n=6)
PoolContention/workers-16-4        794.9n ±   1%   1011.5n ±   2%  +27.25% (p=0.002 n=6)
ComponentLifecycle-4               2.689m ±   1%    3.518m ±   0%  +30.84% (p=0.002 n=6)
SourceValidation-4                 1.613µ ±   1%    2.082µ ±   0%  +29.05% (p=0.002 n=6)
RegistryConcurrent-4               569.9n ±   5%    730.5n ±   5%  +28.19% (p=0.002 n=6)
LoaderLoadFromString-4             2.703m ±   0%    3.547m ±   1%  +31.21% (p=0.002 n=6)
geomean                            12.66µ           16.74µ         +32.24%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.853 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.851 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.288 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.310 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                 230.9n ± 13%   301.7n ± 2%  +30.66% (p=0.002 n=6)
CircuitBreakerExecution_Success-4         17.61n ±  2%   22.68n ± 0%  +28.83% (p=0.002 n=6)
CircuitBreakerExecution_Failure-4         55.21n ±  1%   70.99n ± 1%  +28.57% (p=0.002 n=6)
geomean                                   60.77n         78.61n       +29.35%

                                  │ 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              224.7n ± 26%    294.5n ± 24%  +31.06% (p=0.002 n=6)
IaCStateBackend_GRPC-4                   7.916m ±  2%   10.142m ±  7%  +28.11% (p=0.002 n=6)
JQTransform_Simple-4                     502.4n ± 15%    627.4n ± 35%  +24.88% (p=0.002 n=6)
JQTransform_ObjectConstruction-4         1.110µ ±  0%    1.438µ ±  1%  +29.61% (p=0.002 n=6)
JQTransform_ArraySelect-4                2.672µ ±  1%    3.470µ ±  2%  +29.89% (p=0.002 n=6)
JQTransform_Complex-4                    31.75µ ±  2%    41.60µ ±  1%  +31.05% (p=0.002 n=6)
JQTransform_Throughput-4                 1.358µ ±  1%    1.768µ ±  1%  +30.15% (p=0.002 n=6)
SSEPublishDelivery-4                     50.69n ±  1%    64.83n ±  1%  +27.90% (p=0.002 n=6)
geomean                                  2.953µ          3.812µ        +29.07%

                                 │ 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.626Mi ± 11%     5.833Mi ± 10%       ~ (p=0.180 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.45%               ²
¹ 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.858k ± 0%     6.859k ± 0%       ~ (p=0.909 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.00%               ²
¹ 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                   829.7n ± 15%   1096.5n ± 4%  +32.16% (p=0.002 n=6)
SchemaValidation_AllFields-4                1.241µ ±  2%    1.625µ ± 4%  +30.96% (p=0.002 n=6)
SchemaValidation_FormatValidation-4         1.220µ ±  2%    1.576µ ± 1%  +29.23% (p=0.002 n=6)
SchemaValidation_ManySchemas-4              1.242µ ±  1%    1.612µ ± 3%  +29.79% (p=0.002 n=6)
geomean                                     1.117µ          1.459µ       +30.53%

                                    │ 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                738.7n ± 10%   1021.5n ± 16%  +38.28% (p=0.002 n=6)
EventStoreAppend_SQLite-4                  1.560m ± 38%    1.016m ± 11%  -34.87% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4           9.606µ ±  2%   12.968µ ±  5%  +34.99% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           42.47µ ± 30%    69.73µ ± 17%  +64.17% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4          84.69µ ±  0%   117.32µ ±  1%  +38.52% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          431.9µ ±  1%    603.0µ ±  1%  +39.60% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         879.5µ ±  1%   1233.3µ ±  2%  +40.22% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             63.63µ ±  3%    91.35µ ±  6%  +43.58% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             167.3µ ±  0%    237.0µ ±  1%  +41.67% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            292.5µ ±  0%    413.0µ ±  1%  +41.18% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.278m ±  0%    1.746m ±  1%  +36.65% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           2.485m ±  1%    3.437m ±  2%  +38.31% (p=0.002 n=6)
geomean                                    151.8µ          201.2µ        +32.54%

                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │        B/op        │     B/op       vs base                │
EventStoreAppend_InMemory-4                 837.5 ± 11%     774.0 ± 11%       ~ (p=0.446 n=6)
EventStoreAppend_SQLite-4                 1.982Ki ±  1%   1.984Ki ±  1%       ~ (p=0.623 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%       ~ (p=0.545 n=6)
GetTimeline_InMemory/events-1000-4        944.3Ki ±  0%   944.3Ki ±  0%  -0.00% (p=0.043 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.013 n=6)
GetTimeline_SQLite/events-1000-4          1.639Mi ±  0%   1.639Mi ±  0%       ~ (p=0.405 n=6)
geomean                                   67.67Ki         67.23Ki        -0.65%
¹ 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 831cc86 into main May 21, 2026
28 checks passed
@intel352 intel352 deleted the feat/wfctl-infra-logs branch May 21, 2026 03:02
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