k1LoW / runn

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

Add a cleanup operation because connections were left behind when defining a DB/gRPC/SSH/CDP Runner in Include runner. #955

Closed k1LoW closed 3 months ago

k1LoW commented 3 months ago

SSIA.

github-actions[bot] commented 3 months ago

BenchmarkManyRunbooks-4

main (-) #955 (9608431) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,766,534,873 ns/op 3,792,685,703 ns/op 26,150,830 ns/op
Bytes allocated per iteration 1,793,586,408 B/op 1,793,677,672 B/op 91,264 B/op
Allocs per iteration 21,426,605 allocs/op 21,426,862 allocs/op 257 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([9608431](https://github.com/k1LoW/runn/commit/96084317269b88db88da2b04e06c5cfd0155b300)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (9608431) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,485,003,039 ns/op 5,240,095,237 ns/op -244,907,802 ns/op
Bytes allocated per iteration 2,952,267,352 B/op 2,951,857,120 B/op -410,232 B/op
Allocs per iteration 29,378,334 allocs/op 29,376,178 allocs/op -2,156 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([9608431](https://github.com/k1LoW/runn/commit/96084317269b88db88da2b04e06c5cfd0155b300)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (9608431) +/-
Number of iterations 19 16 -3
Nanoseconds per iteration 63,831,065 ns/op 66,282,903 ns/op 2,451,838 ns/op
Bytes allocated per iteration 60,309,111 B/op 60,318,401 B/op 9,290 B/op
Allocs per iteration 205,894 allocs/op 205,893 allocs/op -1 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([9608431](https://github.com/k1LoW/runn/commit/96084317269b88db88da2b04e06c5cfd0155b300)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 3 months ago

Code Metrics Report

main (de6e6ed) #955 (9608431) +/-
Coverage 64.2% 64.2% -0.1%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Test Execution Time 6m2s 5m38s -24s
Details ``` diff | | main (de6e6ed) | #955 (9608431) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 64.2% | 64.2% | -0.1% | | Files | 76 | 76 | 0 | | Lines | 8410 | 8418 | +8 | + | Covered | 5405 | 5408 | +3 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.1 | | Code | 23963 | 23979 | +16 | | Test | 11448 | 11448 | 0 | + | Test Execution Time | 6m2s | 5m38s | -24s | ```

Code coverage of files in pull request scope (75.2% → 75.0%)

Files Coverage +/-
cdp.go 77.3% 0.0%
db.go 76.5% +0.4%
grpc.go 77.5% +0.0%
ssh.go 66.5% -1.7%

Reported by octocov

github-actions[bot] commented 3 months ago

BenchmarkManyRunbooks-4

main (-) #955 (bb06a9b) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,714,235,864 ns/op 3,963,034,634 ns/op 248,798,770 ns/op
Bytes allocated per iteration 1,793,176,416 B/op 1,793,824,856 B/op 648,440 B/op
Allocs per iteration 21,425,773 allocs/op 21,426,415 allocs/op 642 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([bb06a9b](https://github.com/k1LoW/runn/commit/bb06a9b7670776eca7e9663b7ac29ab990fe0e86)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (bb06a9b) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,258,374,035 ns/op 5,033,352,402 ns/op -225,021,633 ns/op
Bytes allocated per iteration 2,951,778,080 B/op 2,951,599,480 B/op -178,600 B/op
Allocs per iteration 29,376,147 allocs/op 29,373,314 allocs/op -2,833 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([bb06a9b](https://github.com/k1LoW/runn/commit/bb06a9b7670776eca7e9663b7ac29ab990fe0e86)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (bb06a9b) +/-
Number of iterations 18 16 -2
Nanoseconds per iteration 65,972,818 ns/op 64,964,713 ns/op -1,008,105 ns/op
Bytes allocated per iteration 60,303,779 B/op 60,303,629 B/op -150 B/op
Allocs per iteration 205,875 allocs/op 205,885 allocs/op 10 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([bb06a9b](https://github.com/k1LoW/runn/commit/bb06a9b7670776eca7e9663b7ac29ab990fe0e86)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 3 months ago

Code Metrics Report

main (de6e6ed) #955 (bb06a9b) +/-
Coverage 64.2% 64.2% -0.1%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Test Execution Time 6m2s 5m35s -27s
Details ``` diff | | main (de6e6ed) | #955 (bb06a9b) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 64.2% | 64.2% | -0.1% | | Files | 76 | 76 | 0 | | Lines | 8410 | 8424 | +14 | + | Covered | 5405 | 5411 | +6 | + | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 | | Code | 23963 | 23990 | +27 | + | Test | 11448 | 11464 | +16 | + | Test Execution Time | 6m2s | 5m35s | -27s | ```

Code coverage of files in pull request scope (76.6% → 76.2%)

Files Coverage +/-
cdp.go 77.0% -0.3%
db.go 76.1% +0.0%
grpc.go 77.3% -0.1%
include.go 89.9% 0.0%
ssh.go 66.1% -2.0%

Reported by octocov

github-actions[bot] commented 3 months ago

BenchmarkManyRunbooks-4

main (-) #955 (8ca0c3f) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,761,624,688 ns/op 3,992,099,819 ns/op 230,475,131 ns/op
Bytes allocated per iteration 1,793,938,464 B/op 1,793,759,208 B/op -179,256 B/op
Allocs per iteration 21,438,440 allocs/op 21,437,700 allocs/op -740 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([8ca0c3f](https://github.com/k1LoW/runn/commit/8ca0c3f3089dcb7526a1cd925613fa16697d1efa)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (8ca0c3f) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,249,950,083 ns/op 5,181,665,518 ns/op -68,284,565 ns/op
Bytes allocated per iteration 2,951,586,576 B/op 2,951,771,080 B/op 184,504 B/op
Allocs per iteration 29,374,758 allocs/op 29,375,137 allocs/op 379 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([8ca0c3f](https://github.com/k1LoW/runn/commit/8ca0c3f3089dcb7526a1cd925613fa16697d1efa)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (8ca0c3f) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 64,899,645 ns/op 64,405,600 ns/op -494,045 ns/op
Bytes allocated per iteration 60,323,426 B/op 60,308,974 B/op -14,452 B/op
Allocs per iteration 206,008 allocs/op 205,986 allocs/op -22 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([8ca0c3f](https://github.com/k1LoW/runn/commit/8ca0c3f3089dcb7526a1cd925613fa16697d1efa)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 3 months ago

Code Metrics Report

main (de6e6ed) #955 (8ca0c3f) +/-
Coverage 64.2% 64.3% +0.0%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Test Execution Time 6m2s 5m31s -31s
Details ``` diff | | main (de6e6ed) | #955 (8ca0c3f) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 64.2% | 64.3% | +0.0% | | Files | 76 | 76 | 0 | | Lines | 8410 | 8441 | +31 | + | Covered | 5405 | 5428 | +23 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.1 | | Code | 23963 | 24021 | +58 | + | Test | 11448 | 11465 | +17 | + | Test Execution Time | 6m2s | 5m31s | -31s | ```

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

Files Coverage +/-
cdp.go 77.4% +0.0%
db.go 76.2% +0.2%
grpc.go 77.5% +0.0%
include.go 89.9% 0.0%
operator.go 80.4% +0.2%
option.go 59.9% 0.0%
ssh.go 66.1% -2.0%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (de6e6ed) #955 (f72a6b3) +/-
Coverage 64.2% 64.2% +0.0%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Test Execution Time 6m2s 6m15s +13s
Details ``` diff | | main (de6e6ed) | #955 (f72a6b3) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 64.2% | 64.2% | +0.0% | | Files | 76 | 76 | 0 | | Lines | 8410 | 8441 | +31 | + | Covered | 5405 | 5426 | +21 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.1 | | Code | 23963 | 24021 | +58 | + | Test | 11448 | 11465 | +17 | - | Test Execution Time | 6m2s | 6m15s | +13s | ```

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

Files Coverage +/-
cdp.go 77.4% +0.0%
db.go 76.2% +0.2%
grpc.go 77.5% +0.0%
include.go 89.9% 0.0%
operator.go 80.3% +0.1%
option.go 59.9% 0.0%
path.go 61.8% 0.0%
ssh.go 66.1% -2.0%
testutil/runbook.go 0.0% 0.0%

Reported by octocov

github-actions[bot] commented 3 months ago

BenchmarkManyRunbooks-4

main (-) #955 (f72a6b3) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 4,127,797,278 ns/op 3,806,663,061 ns/op -321,134,217 ns/op
Bytes allocated per iteration 1,793,888,768 B/op 1,793,817,248 B/op -71,520 B/op
Allocs per iteration 21,426,497 allocs/op 21,426,768 allocs/op 271 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([f72a6b3](https://github.com/k1LoW/runn/commit/f72a6b36a0bd489c2e032114cda93d438bcf42e2)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (f72a6b3) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,169,569,258 ns/op 5,367,647,974 ns/op 198,078,716 ns/op
Bytes allocated per iteration 2,951,910,160 B/op 2,951,889,024 B/op -21,136 B/op
Allocs per iteration 29,375,415 allocs/op 29,375,237 allocs/op -178 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([f72a6b3](https://github.com/k1LoW/runn/commit/f72a6b36a0bd489c2e032114cda93d438bcf42e2)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (f72a6b3) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 66,651,860 ns/op 67,029,823 ns/op 377,963 ns/op
Bytes allocated per iteration 60,300,436 B/op 60,306,952 B/op 6,516 B/op
Allocs per iteration 205,893 allocs/op 205,894 allocs/op 1 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([f72a6b3](https://github.com/k1LoW/runn/commit/f72a6b36a0bd489c2e032114cda93d438bcf42e2)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 3 months ago

BenchmarkManyRunbooks-4

main (-) #955 (873d269) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,850,159,283 ns/op 3,854,020,314 ns/op 3,861,031 ns/op
Bytes allocated per iteration 1,794,188,480 B/op 1,793,921,344 B/op -267,136 B/op
Allocs per iteration 21,438,686 allocs/op 21,438,404 allocs/op -282 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([873d269](https://github.com/k1LoW/runn/commit/873d26910478c41c8ab7eedfdc748d6b875e90ef)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (873d269) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,250,572,333 ns/op 5,323,768,183 ns/op 73,195,850 ns/op
Bytes allocated per iteration 2,952,056,544 B/op 2,951,855,096 B/op -201,448 B/op
Allocs per iteration 29,376,115 allocs/op 29,375,744 allocs/op -371 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([873d269](https://github.com/k1LoW/runn/commit/873d26910478c41c8ab7eedfdc748d6b875e90ef)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #955 (873d269) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 66,483,092 ns/op 66,654,069 ns/op 170,977 ns/op
Bytes allocated per iteration 60,309,302 B/op 60,303,909 B/op -5,393 B/op
Allocs per iteration 205,995 allocs/op 205,985 allocs/op -10 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#955](https://github.com/k1LoW/runn/pull/955) ([873d269](https://github.com/k1LoW/runn/commit/873d26910478c41c8ab7eedfdc748d6b875e90ef)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 3 months ago

Code Metrics Report

main (de6e6ed) #955 (873d269) +/-
Coverage 64.2% 64.3% +0.0%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Test Execution Time 6m2s 5m33s -29s
Details ``` diff | | main (de6e6ed) | #955 (873d269) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 64.2% | 64.3% | +0.0% | | Files | 76 | 76 | 0 | | Lines | 8410 | 8441 | +31 | + | Covered | 5405 | 5428 | +23 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.1 | | Code | 23963 | 24021 | +58 | + | Test | 11448 | 11470 | +22 | + | Test Execution Time | 6m2s | 5m33s | -29s | ```

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

Files Coverage +/-
cdp.go 77.4% +0.0%
db.go 76.2% +0.2%
grpc.go 77.5% +0.0%
include.go 89.9% 0.0%
operator.go 80.4% +0.2%
option.go 59.9% 0.0%
path.go 61.8% 0.0%
ssh.go 66.1% -2.0%
testutil/runbook.go 0.0% 0.0%

Reported by octocov