k1LoW / runn

runn is a package/tool for running operations following a scenario.
https://runn.run
MIT License
433 stars 32 forks source link

Support for the combined use of Include Runner and `needs:` #1002

Closed k1LoW closed 2 months ago

k1LoW commented 2 months ago

Previously, when the needs: section was specified in the included runbook, execution was blocked in some cases.

This fix resolves the needs: section of the included runbook.

This resulted in the Include runner running multiple runbooks. So we also modified the structure of the results.

github-actions[bot] commented 2 months ago

BenchmarkManyRunbooks-4

main (-) #1002 (125b53b) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,957,812,749 ns/op 3,830,419,581 ns/op -127,393,168 ns/op
Bytes allocated per iteration 1,786,549,680 B/op 1,786,185,840 B/op -363,840 B/op
Allocs per iteration 21,145,012 allocs/op 21,145,170 allocs/op 158 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#1002](https://github.com/k1LoW/runn/pull/1002) ([125b53b](https://github.com/k1LoW/runn/commit/125b53b388976221ef978992674b1c1f38db646e)) | |------------|----------------------------------------------------:|--------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #1002 (125b53b) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,406,799,502 ns/op 5,639,193,918 ns/op 232,394,416 ns/op
Bytes allocated per iteration 3,176,620,040 B/op 3,176,442,360 B/op -177,680 B/op
Allocs per iteration 32,664,740 allocs/op 32,664,064 allocs/op -676 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#1002](https://github.com/k1LoW/runn/pull/1002) ([125b53b](https://github.com/k1LoW/runn/commit/125b53b388976221ef978992674b1c1f38db646e)) | |------------|----------------------------------------------------:|--------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #1002 (125b53b) +/-
Number of iterations 18 18 0
Nanoseconds per iteration 68,152,654 ns/op 67,172,023 ns/op -980,631 ns/op
Bytes allocated per iteration 60,139,672 B/op 60,125,968 B/op -13,704 B/op
Allocs per iteration 205,517 allocs/op 205,511 allocs/op -6 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#1002](https://github.com/k1LoW/runn/pull/1002) ([125b53b](https://github.com/k1LoW/runn/commit/125b53b388976221ef978992674b1c1f38db646e)) | |------------|----------------------------------------------------:|--------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 2 months ago

Code Metrics Report

main (8e34cb5) #1002 (125b53b) +/-
Coverage 64.4% 64.4% +0.0%
Code to Test Ratio 1:0.7 1:0.7 -0.1
Test Execution Time 5m29s 5m28s -1s
Details ``` diff | | main (8e34cb5) | #1002 (125b53b) | +/- | |---------------------|----------------|-----------------|-------| + | Coverage | 64.4% | 64.4% | +0.0% | | Files | 78 | 78 | 0 | | Lines | 8645 | 8664 | +19 | + | Covered | 5573 | 5586 | +13 | - | Code to Test Ratio | 1:0.7 | 1:0.7 | -0.1 | | Code | 15898 | 15930 | +32 | | Test | 11608 | 11608 | 0 | + | Test Execution Time | 5m29s | 5m28s | -1s | ```

Code coverage of files in pull request scope (79.7% → 79.6%)

Files Coverage +/-
cmdout.go 56.0% -1.1%
include.go 90.1% +0.1%
operator.go 80.7% +0.0%
result.go 69.5% -1.4%
step.go 91.3% 0.0%

Reported by octocov