Skip to content

Update pkgs #1210

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

Merged
merged 6 commits into from
Apr 8, 2025
Merged

Update pkgs #1210

merged 6 commits into from
Apr 8, 2025

Conversation

k1LoW
Copy link
Owner

@k1LoW k1LoW commented Apr 8, 2025

This pull request includes updates to dependencies and improvements to the tracing functionality in the internal/exprtrace/tracer.go file, as well as enhancements to the test suite.

Dependency updates:

  • Updated github.com/expr-lang/expr to version v1.17.2 and github.com/goccy/go-json to version v0.10.5 in go.mod.

Tracing improvements:

  • Enhanced the traceInteger, traceFloat, traceCall, tracePredicate, traceBuiltin, traceBinary, traceConditional, traceIdentifier, tracePointer, traceVariableDeclarator, traceMember, traceArray, traceSlice, traceMap, and tracePairValue methods in internal/exprtrace/tracer.go to handle cases where trace entries do not exist, ensuring new entries are created and added to the trace store if necessary. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Test suite enhancements:

  • Added a new test Test_ExprOfficialGeneratedExamplesV1_17_1 to verify the behavior of the tracer with examples from version v1.17.1 of expr.
  • Improved error handling and reporting in Test_ExprOfficialGeneratedExamples by capturing and reporting compile, run, and equality errors separately. [1] [2] [3] [4]

Additional changes:

  • Added the expr.AllowUndefinedVariables option in Patches to handle undefined variables gracefully.
  • Skipped patching ChainNode in the secondPhasePatcher to avoid errors with certain identifier usages.

@k1LoW k1LoW self-assigned this Apr 8, 2025

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Apr 8, 2025

BenchmarkManyRunbooks-4

main (-) #1210 (f617e0d) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 4,007,321,946 ns/op 3,755,823,887 ns/op -251,498,059 ns/op
Bytes allocated per iteration 1,396,720,704 B/op 1,388,576,768 B/op -8,143,936 B/op
Allocs per iteration 19,581,074 allocs/op 19,567,453 allocs/op -13,621 allocs/op
Metadata
main (-) #1210 (f617e0d)
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 (-) #1210 (f617e0d) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 2,991,918,246 ns/op 2,960,404,183 ns/op -31,514,063 ns/op
Bytes allocated per iteration 1,265,075,040 B/op 1,264,910,680 B/op -164,360 B/op
Allocs per iteration 21,232,205 allocs/op 21,233,630 allocs/op 1,425 allocs/op
Metadata
main (-) #1210 (f617e0d)
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 (-) #1210 (f617e0d) +/-
Number of iterations 22 21 -1
Nanoseconds per iteration 48,241,826 ns/op 48,667,298 ns/op 425,472 ns/op
Bytes allocated per iteration 23,285,618 B/op 23,265,825 B/op -19,793 B/op
Allocs per iteration 189,132 allocs/op 189,110 allocs/op -22 allocs/op
Metadata
main (-) #1210 (f617e0d)
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

github-actions bot commented Apr 8, 2025

Code Metrics Report

main (0ad4940) #1210 (f617e0d) +/-
Coverage 63.3% 63.3% +0.0%
Code to Test Ratio 1:0.7 1:0.7 -0.1
Test Execution Time 6m31s 4m25s -2m6s
Details
  |                     | main (0ad4940) | #1210 (f617e0d) |  +/-  |
  |---------------------|----------------|-----------------|-------|
+ | Coverage            |          63.3% |           63.3% | +0.0% |
  |   Files             |             78 |              78 |     0 |
  |   Lines             |           9021 |            9069 |   +48 |
+ |   Covered           |           5714 |            5745 |   +31 |
- | Code to Test Ratio  |          1:0.7 |           1:0.7 |  -0.1 |
  |   Code              |          16580 |           16694 |  +114 |
+ |   Test              |          12732 |           12816 |   +84 |
+ | Test Execution Time |          6m31s |           4m25s | -2m6s |

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

Files Coverage +/-
internal/exprtrace/tracer.go 81.0% -4.8%

Reported by octocov

@k1LoW k1LoW merged commit b97c57e into main Apr 8, 2025
9 checks passed
@k1LoW k1LoW deleted the update-pkgs branch April 8, 2025 02:42
@github-actions github-actions bot mentioned this pull request Apr 8, 2025
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