Skip to content

Add --dry-run support for wfctl infra apply and ci run --phase deploy#544

Merged
intel352 merged 4 commits intomainfrom
copilot/add-dry-run-support-infra-apply-ci-deploy
May 6, 2026
Merged

Add --dry-run support for wfctl infra apply and ci run --phase deploy#544
intel352 merged 4 commits intomainfrom
copilot/add-dry-run-support-infra-apply-ci-deploy

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

wfctl infra apply and wfctl ci run --phase deploy had no way to preview operations without executing provider mutations. This made it impossible to safely validate the exact apply/deploy path locally before committing to real cloud changes.

Changes

  • cmd/wfctl/infra.go — Add --dry-run and --format flags to runInfraApply; early-exit to dry-run path before confirmation/bootstrap
  • cmd/wfctl/infra_apply_dryrun.go — Dry-run implementation reusing parseInfraResourceSpecsForEnv + computePlanForInfraSpecs (same planning logic as real apply), outputs provider groups, plan actions, and required secret keys (never values)
  • cmd/wfctl/ci_run.go — Add --dry-run and --format flags; route deploy phase to dry-run when set
  • cmd/wfctl/ci_run_dryrun.go — Deploy dry-run showing environment, provider, strategy, deploy target, image ref/source, pre-deploy steps, health-check plan, and secret keys
  • cmd/wfctl/dryrun_test.go — 7 tests: table/JSON output for both commands, env-resolved naming (bmw-staging), secret value non-leakage, planning logic equivalence
  • docs/WFCTL.md — Updated flag tables and examples

Usage

# Preview infra apply operations
wfctl infra apply --dry-run --env staging -c infra.yaml

# JSON output for CI automation
wfctl ci run --phase deploy --dry-run --format json --env staging

JSON output includes structured actions, providers, secrets (keys only), and summary fields suitable for parsing in GitHub Actions / GitLab / Jenkins pipelines.

Copilot AI requested review from Copilot and removed request for Copilot May 5, 2026 07:39
Copilot AI linked an issue May 5, 2026 that may be closed by this pull request
@intel352 intel352 marked this pull request as ready for review May 5, 2026 08:16
Copilot AI review requested due to automatic review settings May 5, 2026 08:16
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.

Copilot wasn't able to review any files in this pull request.

- Add --dry-run and --format flags to `wfctl infra apply`
- Add --dry-run and --format flags to `wfctl ci run` (deploy phase)
- Dry-run uses same planning logic (parseInfraResourceSpecsForEnv,
  computePlanForInfraSpecs) as real apply path
- Structured JSON output format for CI automation
- Security-aware: shows secret keys but never prints values
- Prints provider groups, resource actions, health-check plan,
  pre-deploy steps, and deploy target naming
- Add 7 new tests covering table/JSON output, env resolution,
  secret safety, and planning logic equivalence
- Update docs/WFCTL.md with new flags and examples

Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/abd214b9-ada7-4c1c-ae4b-4a8e8c10421d

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dry-run support for wfctl infra apply and CI deploy Add --dry-run support for wfctl infra apply and ci run --phase deploy May 5, 2026
Copilot AI requested a review from intel352 May 5, 2026 08:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:260: parsing iteration count: invalid syntax
baseline-bench.txt:352806: parsing iteration count: invalid syntax
baseline-bench.txt:638425: parsing iteration count: invalid syntax
baseline-bench.txt:927143: parsing iteration count: invalid syntax
baseline-bench.txt:1271610: parsing iteration count: invalid syntax
baseline-bench.txt:1580716: parsing iteration count: invalid syntax
benchmark-results.txt:260: parsing iteration count: invalid syntax
benchmark-results.txt:342705: parsing iteration count: invalid syntax
benchmark-results.txt:684913: parsing iteration count: invalid syntax
benchmark-results.txt:958367: parsing iteration count: invalid syntax
benchmark-results.txt:1296207: parsing iteration count: invalid syntax
benchmark-results.txt:1662058: 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              3.289m ± 190%   5.678m ± 78%       ~ (p=0.937 n=6)
ComponentLoad-4                    3.472m ±   1%   3.492m ± 11%       ~ (p=0.180 n=6)
ComponentExecute-4                 1.827µ ±   1%   1.824µ ±  1%       ~ (p=0.658 n=6)
PoolContention/workers-1-4         1.028µ ±   1%   1.025µ ±  1%       ~ (p=0.368 n=6)
PoolContention/workers-2-4         1.012µ ±   2%   1.022µ ±  2%       ~ (p=0.258 n=6)
PoolContention/workers-4-4         1.016µ ±   1%   1.025µ ±  1%       ~ (p=0.465 n=6)
PoolContention/workers-8-4         1.018µ ±   2%   1.028µ ±  2%       ~ (p=0.121 n=6)
PoolContention/workers-16-4        1.016µ ±   1%   1.088µ ±  5%  +7.04% (p=0.002 n=6)
ComponentLifecycle-4               3.506m ±   1%   3.616m ±  1%  +3.15% (p=0.002 n=6)
SourceValidation-4                 2.068µ ±   2%   2.141µ ±  1%  +3.51% (p=0.002 n=6)
RegistryConcurrent-4               757.6n ±   6%   825.9n ±  5%  +9.01% (p=0.002 n=6)
LoaderLoadFromString-4             3.549m ±   1%   3.652m ±  1%  +2.90% (p=0.002 n=6)
geomean                            16.62µ          17.80µ        +7.11%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.790 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.788 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.898 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.976 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                  297.0n ± 3%   297.8n ± 6%       ~ (p=0.251 n=6)
CircuitBreakerExecution_Success-4          22.66n ± 1%   22.68n ± 0%       ~ (p=0.593 n=6)
CircuitBreakerExecution_Failure-4          70.96n ± 0%   71.17n ± 0%  +0.29% (p=0.002 n=6)
geomean                                    78.17n        78.32n       +0.20%

                                  │ 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              │
JQTransform_Simple-4                     814.1n ± 30%   914.6n ± 19%       ~ (p=0.132 n=6)
JQTransform_ObjectConstruction-4         1.422µ ±  1%   1.453µ ±  2%  +2.14% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.398µ ±  4%   3.509µ ±  1%  +3.28% (p=0.041 n=6)
JQTransform_Complex-4                    41.09µ ±  1%   42.08µ ±  4%  +2.40% (p=0.002 n=6)
JQTransform_Throughput-4                 1.743µ ±  0%   1.751µ ±  3%  +0.46% (p=0.019 n=6)
SSEPublishDelivery-4                     64.55n ±  2%   64.21n ±  1%       ~ (p=0.180 n=6)
geomean                                  1.622µ         1.675µ        +3.27%

                                 │ baseline-bench.txt │        benchmark-results.txt         │
                                 │        B/op        │     B/op      vs base                │
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.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │     allocs/op      │ allocs/op   vs base                │
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                    1.119µ ± 4%   1.115µ ± 13%       ~ (p=0.855 n=6)
SchemaValidation_AllFields-4                 1.645µ ± 1%   1.666µ ±  2%       ~ (p=0.071 n=6)
SchemaValidation_FormatValidation-4          1.600µ ± 1%   1.647µ ±  9%       ~ (p=0.515 n=6)
SchemaValidation_ManySchemas-4               1.608µ ± 2%   1.622µ ±  2%       ~ (p=0.165 n=6)
geomean                                      1.475µ        1.492µ        +1.17%

                                    │ 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.089µ ±  9%   1.097µ ± 13%       ~ (p=1.000 n=6)
EventStoreAppend_SQLite-4                  1.091m ±  5%   1.096m ±  5%       ~ (p=0.937 n=6)
GetTimeline_InMemory/events-10-4           12.53µ ±  2%   13.27µ ±  3%  +5.93% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           70.02µ ±  2%   74.80µ ±  3%  +6.82% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4          142.3µ ±  1%   116.3µ ± 27%       ~ (p=0.065 n=6)
GetTimeline_InMemory/events-500-4          594.5µ ± 23%   597.6µ ±  1%       ~ (p=1.000 n=6)
GetTimeline_InMemory/events-1000-4         1.115m ±  1%   1.224m ±  1%  +9.82% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             83.96µ ±  1%   90.19µ ±  2%  +7.42% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             219.4µ ±  2%   233.7µ ±  1%  +6.52% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            384.1µ ± 18%   404.1µ ±  5%       ~ (p=0.065 n=6)
GetTimeline_SQLite/events-500-4            1.663m ±  1%   1.793m ±  2%  +7.78% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.262m ±  3%   3.445m ±  1%  +5.61% (p=0.002 n=6)
geomean                                    198.6µ         204.5µ        +2.94%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                 772.5 ± 11%     747.0 ± 9%       ~ (p=0.074 n=6)
EventStoreAppend_SQLite-4                 1.983Ki ±  1%   1.983Ki ± 2%       ~ (p=0.496 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=1.000 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%       ~ (p=0.076 n=6)
GetTimeline_SQLite/events-1000-4          1.639Mi ±  0%   1.639Mi ± 0%  -0.00% (p=0.024 n=6)
geomean                                   67.21Ki         67.03Ki       -0.28%
¹ 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.

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Comment thread cmd/wfctl/infra.go
Comment on lines +1090 to +1091
// --dry-run: compute and display the plan without executing any mutations.
if dryRun {
Comment on lines +241 to +249
for _, entry := range cfg.Secrets.Entries {
store := ""
if entry.Store != "" {
store = entry.Store
}
refs = append(refs, DryRunSecretRef{
Key: entry.Name,
Store: store,
Required: true,
Comment thread cmd/wfctl/ci_run_dryrun.go Outdated
Comment thread cmd/wfctl/ci_run_dryrun.go Outdated
Comment on lines +108 to +109
fmt.Print(formatPlanTable(plan, showSensitive))
fmt.Println()
Comment on lines +83 to +87
switch format {
case "json":
return printDryRunJSON(cfgFile, envName, plan, providerGroups, secretRefs)
default:
return printDryRunTable(cfgFile, envName, plan, providerGroups, secretRefs, showSensitive)
Comment thread cmd/wfctl/ci_run_dryrun.go Outdated
Comment on lines +209 to +217
for _, entry := range cfg.Secrets.Entries {
store := ""
if entry.Store != "" {
store = entry.Store
}
refs = append(refs, DryRunSecretRef{
Key: entry.Name,
Store: store,
Required: true,
Comment thread cmd/wfctl/ci_run.go Outdated
Comment thread cmd/wfctl/ci_run_dryrun.go Outdated
@intel352
Copy link
Copy Markdown
Contributor

intel352 commented May 5, 2026

@copilot apply changes based on the comments in this thread

- Gracefully handle state-load failure in infra apply dry-run (treat
  missing/inaccessible backend as empty rather than aborting)
- Use ResolveSecretStore for both infra and CI deploy secret collection
  so env secretsStoreOverride / defaultStore / legacy provider are honored
- Resolve deploy target via env-resolved wfCfg infra module names,
  mirroring newPluginDeployProvider's lookup logic (fixes bmw-staging)
- Fall back to module config image field when IMAGE_TAG is unset,
  matching pluginDeployProvider.Deploy behavior
- Fix countActions to include 'replace' and add ± symbol for replace
  actions; update formatPlanTable and formatPlanMarkdown summaries
- Reject unknown --format values with an explicit error (no silent fallback)
- Use config.LoadFromFile in ci run deploy dry-run path to honor imports:
- Include --config path in follow-up command hint

Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/b7c35821-d464-4ebb-93e4-5f9eb8f5ab40

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 5, 2026

@copilot apply changes based on the comments in this thread

All 10 review issues addressed in commit 5ac0199:

  1. State-load failure — dry-run now prints a note to stderr and treats missing state as empty instead of aborting (fresh configs bootstrap correctly on real apply)
  2. Secret store resolution — both collectSecretRefs and collectDeploySecretRefs now use ResolveSecretStore, honoring secretsStoreOverride, defaultStore, and legacy provider in priority order
  3. Deploy target — added resolveDeployInfoFromConfig that mirrors newPluginDeployProvider's lookup (iac.provider match → deploy-target module → env-resolved resolved.Name); env-lifted names like bmw-staging are now correct
  4. Image from module config — when IMAGE_TAG is unset, falls back to the resolved module's image field, matching pluginDeployProvider.Deploy behavior; reports source in output
  5. Replace in plan summarycountActions now returns 4 values; formatPlanTable and formatPlanMarkdown summaries include "N to replace"
  6. Unknown --format fails fast — both runInfraApplyDryRun and runDeployPhaseDryRun return an error on unrecognised format values
  7. imports: supportrunCIRun deploy dry-run path now loads config via config.LoadFromFile (not raw yaml.Unmarshal) before calling runDeployPhaseDryRun
  8. Follow-up command--config <path> is included in the printed hint so it points at the file the user just reviewed

@intel352 intel352 merged commit 02bba3f into main May 6, 2026
19 of 20 checks passed
@intel352 intel352 deleted the copilot/add-dry-run-support-infra-apply-ci-deploy branch May 6, 2026 04:40
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.

Design wfctl dry-run support for infra apply and CI deploy

3 participants