Skip to content

feat: add wfctl migrations up#755

Merged
intel352 merged 1 commit into
mainfrom
fix/migrations-up
May 22, 2026
Merged

feat: add wfctl migrations up#755
intel352 merged 1 commit into
mainfrom
fix/migrations-up

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Adds a first-class wfctl migrations up command for deploy-time application database migrations.\n\nVerification:\n- go test ./cmd/wfctl -run 'TestRunMigrationsUp|TestRunMigrationsRepairDirtyUpIfClean|TestRunMigrationsStatus|TestRunMigrationsCICheck' -count=1\n- go test ./cmd/wfctl

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 60.25641% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/migrations.go 59.21% 23 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:331075: parsing iteration count: invalid syntax
baseline-bench.txt:641231: parsing iteration count: invalid syntax
baseline-bench.txt:975975: parsing iteration count: invalid syntax
baseline-bench.txt:1304971: parsing iteration count: invalid syntax
baseline-bench.txt:1788680: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:575125: parsing iteration count: invalid syntax
benchmark-results.txt:899630: parsing iteration count: invalid syntax
benchmark-results.txt:1245498: parsing iteration count: invalid syntax
benchmark-results.txt:1549414: parsing iteration count: invalid syntax
benchmark-results.txt:1841027: 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 │
                            │       sec/op       │
InterpreterCreation-4               6.681m ± 73%
ComponentLoad-4                     3.548m ±  0%
ComponentExecute-4                  1.926µ ±  0%
PoolContention/workers-1-4          1.071µ ±  1%
PoolContention/workers-2-4          1.062µ ±  2%
PoolContention/workers-4-4          1.071µ ±  1%
PoolContention/workers-8-4          1.076µ ±  1%
PoolContention/workers-16-4         1.080µ ±  4%
ComponentLifecycle-4                3.562m ±  1%
SourceValidation-4                  2.309µ ±  1%
RegistryConcurrent-4                779.7n ±  3%
LoaderLoadFromString-4              3.569m ±  1%
geomean                             18.37µ

                            │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                 3.763m ± 154%
ComponentLoad-4                       3.472m ±   1%
ComponentExecute-4                    1.834µ ±   0%
PoolContention/workers-1-4            1.012µ ±   2%
PoolContention/workers-2-4            1.009µ ±   3%
PoolContention/workers-4-4            1.027µ ±   1%
PoolContention/workers-8-4            1.012µ ±   2%
PoolContention/workers-16-4           1.010µ ±   2%
ComponentLifecycle-4                  3.506m ±  11%
SourceValidation-4                    2.111µ ±   1%
RegistryConcurrent-4                  732.1n ±   4%
LoaderLoadFromString-4                3.539m ±   1%
geomean                               16.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

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  282.2n ± 1%
CircuitBreakerExecution_Success-4          21.52n ± 1%
CircuitBreakerExecution_Failure-4          66.08n ± 0%
geomean                                    73.76n

                                  │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     297.2n ± 2%
CircuitBreakerExecution_Success-4             22.66n ± 1%
CircuitBreakerExecution_Failure-4             70.97n ± 0%
geomean                                       78.19n

                                  │ 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

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              308.9n ± 29%
IaCStateBackend_GRPC-4                   9.366m ±  2%
JQTransform_Simple-4                     660.6n ± 49%
JQTransform_ObjectConstruction-4         1.601µ ±  0%
JQTransform_ArraySelect-4                3.552µ ±  1%
JQTransform_Complex-4                    39.12µ ±  1%
JQTransform_Throughput-4                 1.946µ ±  1%
SSEPublishDelivery-4                     64.52n ±  1%
geomean                                  3.898µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4              416.0 ± 0%
IaCStateBackend_GRPC-4                 5.965Mi ± 5%
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.835k ± 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: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 301.4n ± 25%
IaCStateBackend_GRPC-4                      10.21m ±  1%
JQTransform_Simple-4                        642.4n ± 33%
JQTransform_ObjectConstruction-4            1.420µ ±  0%
JQTransform_ArraySelect-4                   3.488µ ±  3%
JQTransform_Complex-4                       42.19µ ±  3%
JQTransform_Throughput-4                    1.769µ ±  1%
SSEPublishDelivery-4                        63.88n ±  2%
geomean                                     3.834µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.740Mi ± 10%
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.864k ± 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                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                    1.102µ ± 8%
SchemaValidation_AllFields-4                 1.674µ ± 8%
SchemaValidation_FormatValidation-4          1.586µ ± 4%
SchemaValidation_ManySchemas-4               1.818µ ± 3%
geomean                                      1.519µ

                                    │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.086µ ±  2%
SchemaValidation_AllFields-4                   1.650µ ± 13%
SchemaValidation_FormatValidation-4            1.575µ ±  4%
SchemaValidation_ManySchemas-4                 1.588µ ±  3%
geomean                                        1.455µ

                                    │ 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

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.207µ ± 15%
EventStoreAppend_SQLite-4                  2.002m ±  6%
GetTimeline_InMemory/events-10-4           13.38µ ±  3%
GetTimeline_InMemory/events-50-4           74.66µ ±  2%
GetTimeline_InMemory/events-100-4          150.5µ ±  4%
GetTimeline_InMemory/events-500-4          773.0µ ±  5%
GetTimeline_InMemory/events-1000-4         1.399m ± 10%
GetTimeline_SQLite/events-10-4             104.9µ ±  0%
GetTimeline_SQLite/events-50-4             245.6µ ±  1%
GetTimeline_SQLite/events-100-4            418.3µ ±  1%
GetTimeline_SQLite/events-500-4            1.796m ±  1%
GetTimeline_SQLite/events-1000-4           3.555m ±  4%
geomean                                    234.1µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  761.5 ± 2%
EventStoreAppend_SQLite-4                  1.988Ki ± 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.15Ki

                                   │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.104µ ± 18%
EventStoreAppend_SQLite-4                     1.052m ±  3%
GetTimeline_InMemory/events-10-4              12.48µ ±  3%
GetTimeline_InMemory/events-50-4              68.42µ ±  1%
GetTimeline_InMemory/events-100-4             139.0µ ± 21%
GetTimeline_InMemory/events-500-4             560.6µ ±  1%
GetTimeline_InMemory/events-1000-4            1.142m ±  0%
GetTimeline_SQLite/events-10-4                85.39µ ±  4%
GetTimeline_SQLite/events-50-4                223.8µ ±  5%
GetTimeline_SQLite/events-100-4               389.7µ ±  1%
GetTimeline_SQLite/events-500-4               1.679m ±  1%
GetTimeline_SQLite/events-1000-4              3.264m ±  1%
geomean                                       197.9µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    754.5 ± 15%
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.09Ki

                                   │ 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

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

@intel352 intel352 force-pushed the fix/migrations-up branch from f8dbcb0 to fb703c8 Compare May 22, 2026 09:31
@intel352 intel352 force-pushed the fix/migrations-up branch from fb703c8 to 9246b2b Compare May 22, 2026 09:45
@intel352 intel352 merged commit 8a82340 into main May 22, 2026
22 checks passed
@intel352 intel352 deleted the fix/migrations-up branch May 22, 2026 10:00
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