k1LoW / runn

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

Fix problem with validators behaving incorrectly when running concurrently #902

Closed k1LoW closed 4 months ago

k1LoW commented 4 months ago

ref: #882

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #902 (89076e7) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 4,048,290,753 ns/op 4,008,356,049 ns/op -39,934,704 ns/op
Bytes allocated per iteration 1,792,010,296 B/op 1,792,218,488 B/op 208,192 B/op
Allocs per iteration 21,406,810 allocs/op 21,406,900 allocs/op 90 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([89076e7](https://github.com/k1LoW/runn/commit/89076e782d74baa4bcbbababf43c9a7e72b2d0a6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (89076e7) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,095,339,606 ns/op 5,152,049,118 ns/op 56,709,512 ns/op
Bytes allocated per iteration 2,945,079,184 B/op 2,944,851,144 B/op -228,040 B/op
Allocs per iteration 29,263,663 allocs/op 29,262,542 allocs/op -1,121 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([89076e7](https://github.com/k1LoW/runn/commit/89076e782d74baa4bcbbababf43c9a7e72b2d0a6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (89076e7) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 66,616,772 ns/op 67,057,204 ns/op 440,432 ns/op
Bytes allocated per iteration 60,300,489 B/op 60,305,880 B/op 5,391 B/op
Allocs per iteration 205,785 allocs/op 205,764 allocs/op -21 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([89076e7](https://github.com/k1LoW/runn/commit/89076e782d74baa4bcbbababf43c9a7e72b2d0a6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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

k1LoW commented 4 months ago

OK

--- FAIL: TestOpenAPI3Validator (0.01s)
    --- FAIL: TestOpenAPI3Validator/16 (0.00s)
        http_validator_test.go:546: got error: openapi3 validation error: Error: GET operation request content type 'GET' does not exist, Reason: The path was found, but there was no 'GET' method found in the spec, Line: 7, Column: 3
            -----START HTTP REQUEST-----
            GET /users5 HTTP/0.0
            Accept: application/json

            -----END HTTP REQUEST-----
    --- FAIL: TestOpenAPI3Validator/15 (0.00s)
        http_validator_test.go:546: got error: openapi3 validation error: Error: GET operation request content type 'GET' does not exist, Reason: The path was found, but there was no 'GET' method found in the spec, Line: 7, Column: 3
            -----START HTTP REQUEST-----
            GET /users6/3 HTTP/0.0
            Accept: application/json

            -----END HTTP REQUEST-----
github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #902 (4832503) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,971,726,256 ns/op 3,731,570,038 ns/op -240,156,218 ns/op
Bytes allocated per iteration 1,792,665,960 B/op 1,792,679,704 B/op 13,744 B/op
Allocs per iteration 21,418,822 allocs/op 21,419,483 allocs/op 661 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4832503](https://github.com/k1LoW/runn/commit/4832503f9e7c8e6be95d90258655bb6bf97e3ebc)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (4832503) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,027,894,156 ns/op 5,253,240,512 ns/op 225,346,356 ns/op
Bytes allocated per iteration 2,947,102,464 B/op 2,944,784,696 B/op -2,317,768 B/op
Allocs per iteration 29,360,376 allocs/op 29,264,216 allocs/op -96,160 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4832503](https://github.com/k1LoW/runn/commit/4832503f9e7c8e6be95d90258655bb6bf97e3ebc)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (4832503) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 67,446,181 ns/op 64,388,120 ns/op -3,058,061 ns/op
Bytes allocated per iteration 60,287,016 B/op 60,323,380 B/op 36,364 B/op
Allocs per iteration 205,871 allocs/op 205,900 allocs/op 29 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4832503](https://github.com/k1LoW/runn/commit/4832503f9e7c8e6be95d90258655bb6bf97e3ebc)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 4 months ago

BenchmarkManyRunbooks-4

main (-) #902 (08d2987) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,734,795,921 ns/op 3,908,520,531 ns/op 173,724,610 ns/op
Bytes allocated per iteration 1,792,286,584 B/op 1,792,548,744 B/op 262,160 B/op
Allocs per iteration 21,407,188 allocs/op 21,407,405 allocs/op 217 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([08d2987](https://github.com/k1LoW/runn/commit/08d29875657960daf42a998bc7fbab5fdd1c562c)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (08d2987) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,074,652,524 ns/op 5,077,730,062 ns/op 3,077,538 ns/op
Bytes allocated per iteration 2,944,777,104 B/op 2,944,664,632 B/op -112,472 B/op
Allocs per iteration 29,263,164 allocs/op 29,261,929 allocs/op -1,235 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([08d2987](https://github.com/k1LoW/runn/commit/08d29875657960daf42a998bc7fbab5fdd1c562c)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (08d2987) +/-
Number of iterations 18 18 0
Nanoseconds per iteration 64,929,226 ns/op 68,878,439 ns/op 3,949,213 ns/op
Bytes allocated per iteration 60,339,426 B/op 60,302,236 B/op -37,190 B/op
Allocs per iteration 205,797 allocs/op 205,784 allocs/op -13 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([08d2987](https://github.com/k1LoW/runn/commit/08d29875657960daf42a998bc7fbab5fdd1c562c)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 4 months ago

Code Metrics Report

main (3f5d523) #902 (08d2987) +/-
Coverage 65.6% 65.6% +0.0%
Code to Test Ratio 1:0.5 1:0.5 +0.0
Details ``` diff | | main (3f5d523) | #902 (08d2987) | +/- | |--------------------|----------------|----------------|-------| + | Coverage | 65.6% | 65.6% | +0.0% | | Files | 71 | 71 | 0 | | Lines | 7679 | 7686 | +7 | + | Covered | 5037 | 5042 | +5 | + | Code to Test Ratio | 1:0.5 | 1:0.5 | +0.0 | | Code | 22362 | 22371 | +9 | + | Test | 10252 | 10262 | +10 | ```

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

Files Coverage +/-
coverage.go 79.5% 0.0%
http_validator.go 81.5% -0.5%
runner_option.go 37.5% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (3f5d523) #902 (08d2987) +/-
Coverage 65.6% 65.6% +0.0%
Code to Test Ratio 1:0.5 1:0.5 +0.0
Details ``` diff | | main (3f5d523) | #902 (08d2987) | +/- | |--------------------|----------------|----------------|-------| + | Coverage | 65.6% | 65.6% | +0.0% | | Files | 71 | 71 | 0 | | Lines | 7679 | 7686 | +7 | + | Covered | 5037 | 5044 | +7 | + | Code to Test Ratio | 1:0.5 | 1:0.5 | +0.0 | | Code | 22362 | 22371 | +9 | + | Test | 10252 | 10262 | +10 | ```

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

Files Coverage +/-
coverage.go 79.5% 0.0%
http_validator.go 81.5% -0.5%
runner_option.go 37.5% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (3f5d523) #902 (08d2987) +/-
Coverage 65.6% 65.6% +0.0%
Code to Test Ratio 1:0.5 1:0.5 +0.0
Details ``` diff | | main (3f5d523) | #902 (08d2987) | +/- | |--------------------|----------------|----------------|-------| + | Coverage | 65.6% | 65.6% | +0.0% | | Files | 71 | 71 | 0 | | Lines | 7679 | 7686 | +7 | + | Covered | 5037 | 5042 | +5 | + | Code to Test Ratio | 1:0.5 | 1:0.5 | +0.0 | | Code | 22362 | 22371 | +9 | + | Test | 10252 | 10262 | +10 | ```

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

Files Coverage +/-
coverage.go 79.5% 0.0%
http_validator.go 81.5% -0.5%
runner_option.go 37.5% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #902 (4201ae2) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,972,719,444 ns/op 3,716,096,257 ns/op -256,623,187 ns/op
Bytes allocated per iteration 1,793,307,720 B/op 1,792,836,048 B/op -471,672 B/op
Allocs per iteration 21,420,030 allocs/op 21,419,434 allocs/op -596 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4201ae2](https://github.com/k1LoW/runn/commit/4201ae235e3de849e67cc93e928493d0692ad0b6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (4201ae2) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 4,952,425,519 ns/op 5,214,406,663 ns/op 261,981,144 ns/op
Bytes allocated per iteration 2,944,918,064 B/op 2,944,799,288 B/op -118,776 B/op
Allocs per iteration 29,262,818 allocs/op 29,263,802 allocs/op 984 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4201ae2](https://github.com/k1LoW/runn/commit/4201ae235e3de849e67cc93e928493d0692ad0b6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 (-) #902 (4201ae2) +/-
Number of iterations 19 18 -1
Nanoseconds per iteration 64,227,825 ns/op 63,787,709 ns/op -440,116 ns/op
Bytes allocated per iteration 60,332,720 B/op 60,298,845 B/op -33,875 B/op
Allocs per iteration 205,909 allocs/op 205,859 allocs/op -50 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#902](https://github.com/k1LoW/runn/pull/902) ([4201ae2](https://github.com/k1LoW/runn/commit/4201ae235e3de849e67cc93e928493d0692ad0b6)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **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 4 months ago

Code Metrics Report

main (3f5d523) #902 (4201ae2) +/-
Coverage 65.6% 65.6% +0.0%
Code to Test Ratio 1:0.5 1:0.5 +0.0
Details ``` diff | | main (3f5d523) | #902 (4201ae2) | +/- | |--------------------|----------------|----------------|-------| + | Coverage | 65.6% | 65.6% | +0.0% | | Files | 71 | 71 | 0 | | Lines | 7679 | 7686 | +7 | + | Covered | 5037 | 5042 | +5 | + | Code to Test Ratio | 1:0.5 | 1:0.5 | +0.0 | | Code | 22362 | 22371 | +9 | + | Test | 10252 | 10262 | +10 | ```

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

Files Coverage +/-
coverage.go 79.5% 0.0%
http_validator.go 81.5% -0.5%
runner_option.go 37.5% 0.0%

Reported by octocov