Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow absolute paths and enhance scopes detection #1080

Merged
merged 6 commits into from
Nov 26, 2024
Merged

Allow absolute paths and enhance scopes detection #1080

merged 6 commits into from
Nov 26, 2024

Conversation

k1LoW
Copy link
Owner

@k1LoW k1LoW commented Nov 26, 2024

ref: #1073

Enhanced scope determination for file paths containing runbooks.
In addition, absolute paths are now allowed everywhere.

It's a bug that in some sections it was reading files in directories higher than the runbook even though there was no read:parent scope.

@k1LoW k1LoW self-assigned this Nov 26, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@k1LoW k1LoW changed the title Allow absolute paths Allow absolute paths and enhance scopes detection Nov 26, 2024
@k1LoW k1LoW added minor bug Something isn't working labels Nov 26, 2024

This comment has been minimized.

This comment has been minimized.

@k1LoW k1LoW marked this pull request as ready for review November 26, 2024 12:20
Copy link
Contributor

BenchmarkManyRunbooks-4

main (-) #1080 (fe6b7da) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,552,499,031 ns/op 3,545,443,315 ns/op -7,055,716 ns/op
Bytes allocated per iteration 1,380,558,192 B/op 1,380,285,976 B/op -272,216 B/op
Allocs per iteration 19,132,129 allocs/op 19,133,880 allocs/op 1,751 allocs/op
Metadata
main (-) #1080 (fe6b7da)
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 (-) #1080 (fe6b7da) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 4,926,396,596 ns/op 4,829,392,596 ns/op -97,004,000 ns/op
Bytes allocated per iteration 2,270,006,984 B/op 2,270,228,016 B/op 221,032 B/op
Allocs per iteration 31,363,380 allocs/op 31,368,675 allocs/op 5,295 allocs/op
Metadata
main (-) #1080 (fe6b7da)
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 (-) #1080 (fe6b7da) +/-
Number of iterations 26 25 -1
Nanoseconds per iteration 46,363,292 ns/op 45,381,574 ns/op -981,718 ns/op
Bytes allocated per iteration 22,446,132 B/op 22,473,358 B/op 27,226 B/op
Allocs per iteration 184,523 allocs/op 184,559 allocs/op 36 allocs/op
Metadata
main (-) #1080 (fe6b7da)
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

Copy link
Contributor

Code Metrics Report

main (9990ad7) #1080 (fe6b7da) +/-
Coverage 64.5% 64.5% -0.1%
Code to Test Ratio 1:0.7 1:0.7 +0.0
Test Execution Time 5m54s 6m2s +8s
Details
  |                     | main (9990ad7) | #1080 (fe6b7da) |  +/-  |
  |---------------------|----------------|-----------------|-------|
- | Coverage            |          64.5% |           64.5% | -0.1% |
  |   Files             |             77 |              77 |     0 |
  |   Lines             |           8737 |            8832 |   +95 |
+ |   Covered           |           5640 |            5697 |   +57 |
+ | Code to Test Ratio  |          1:0.7 |           1:0.7 |  +0.0 |
  |   Code              |          16069 |           16194 |  +125 |
+ |   Test              |          12014 |           12133 |  +119 |
- | Test Execution Time |          5m54s |            6m2s |   +8s |

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

Files Coverage +/-
book.go 76.3% -2.9%
cache.go 48.0% +7.0%
cdp.go 76.8% -0.6%
http.go 77.9% -0.3%
include.go 90.5% -0.6%
operator.go 80.0% -0.2%
option.go 58.4% -0.9%
path.go 65.0% +3.3%
runbook.go 81.1% -0.2%

Reported by octocov

@k1LoW k1LoW merged commit ecf7547 into main Nov 26, 2024
8 checks passed
@k1LoW k1LoW deleted the use-fp branch November 26, 2024 21:24
@github-actions github-actions bot mentioned this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change bug Something isn't working minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant