mercari / grpc-federation

gRPC Federation generates a gRPC server by writing a custom option in Protocol Buffers
MIT License
318 stars 13 forks source link

Improve scheduler #227

Closed goccy closed 3 months ago

goccy commented 3 months ago

Make validation priority to the highest. If we write the following options, the order is validationA => ( callA , validationB ) => callB . (※ callA and validationB are called concurrently )

def { validation {} } // validationA
def { call {} } // callA
def { validation {} } // validationB
def { call {} } // callB

The important thing is that call block is executed after validation block.

github-actions[bot] commented 3 months ago

Code Metrics Report

main (4b71a55) #227 (e99efb6) +/-
Coverage 65.4% 65.5% +0.1%
Code to Test Ratio 1:0.4 1:0.4 -0.0
Test Execution Time 7m8s 7m9s +1s
Details ``` diff | | main (4b71a55) | #227 (e99efb6) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 65.4% | 65.5% | +0.1% | | Files | 71 | 71 | 0 | | Lines | 11718 | 11735 | +17 | + | Covered | 7669 | 7686 | +17 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.0 | | Code | 36608 | 36637 | +29 | | Test | 12836 | 12836 | 0 | - | Test Execution Time | 7m8s | 7m9s | +1s | ```

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

Files Coverage +/-
resolver/def.go 93.7% -0.4%
resolver/graph.go 87.9% +1.2%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (4b71a55) #227 (4fc6ea5) +/-
Coverage 65.4% 65.4% -0.0%
Code to Test Ratio 1:0.4 1:0.3 -0.0
Test Execution Time 7m8s 6m59s -9s
Details ``` diff | | main (4b71a55) | #227 (4fc6ea5) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 65.4% | 65.4% | -0.0% | | Files | 71 | 71 | 0 | | Lines | 11718 | 11752 | +34 | + | Covered | 7669 | 7686 | +17 | - | Code to Test Ratio | 1:0.4 | 1:0.3 | -0.0 | | Code | 36608 | 36678 | +70 | | Test | 12836 | 12836 | 0 | + | Test Execution Time | 7m8s | 6m59s | -9s | ```

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

Files Coverage +/-
grpc/federation/cel.go 0.0% 0.0%
resolver/def.go 93.7% -0.4%
resolver/graph.go 87.9% +1.2%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (4b71a55) #227 (dcbcba8) +/-
Coverage 65.4% 65.4% -0.0%
Code to Test Ratio 1:0.4 1:0.3 -0.0
Test Execution Time 7m8s 7m6s -2s
Details ``` diff | | main (4b71a55) | #227 (dcbcba8) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 65.4% | 65.4% | -0.0% | | Files | 71 | 71 | 0 | | Lines | 11718 | 11752 | +34 | + | Covered | 7669 | 7686 | +17 | - | Code to Test Ratio | 1:0.4 | 1:0.3 | -0.0 | | Code | 36608 | 36678 | +70 | | Test | 12836 | 12836 | 0 | + | Test Execution Time | 7m8s | 7m6s | -2s | ```

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

Files Coverage +/-
grpc/federation/cel.go 0.0% 0.0%
resolver/def.go 93.7% -0.4%
resolver/graph.go 87.9% +1.2%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (4b71a55) #227 (dcc9842) +/-
Coverage 65.4% 65.4% -0.1%
Code to Test Ratio 1:0.4 1:0.3 -0.0
Test Execution Time 7m8s 6m56s -12s
Details ``` diff | | main (4b71a55) | #227 (dcc9842) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 65.4% | 65.4% | -0.1% | | Files | 71 | 71 | 0 | | Lines | 11718 | 11760 | +42 | + | Covered | 7669 | 7690 | +21 | - | Code to Test Ratio | 1:0.4 | 1:0.3 | -0.0 | | Code | 36608 | 36690 | +82 | | Test | 12836 | 12836 | 0 | + | Test Execution Time | 7m8s | 6m56s | -12s | ```

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

Files Coverage +/-
grpc/federation/cel.go 0.0% 0.0%
resolver/def.go 93.7% -0.4%
resolver/graph.go 87.9% +1.2%
resolver/resolver.go 81.7% -0.1%

Reported by octocov

github-actions[bot] commented 3 months ago

Code Metrics Report

main (4b71a55) #227 (959f33b) +/-
Coverage 65.4% 65.5% +0.1%
Code to Test Ratio 1:0.4 1:0.3 -0.0
Test Execution Time 7m8s 7m5s -3s
Details ``` diff | | main (4b71a55) | #227 (959f33b) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 65.4% | 65.5% | +0.1% | | Files | 71 | 71 | 0 | | Lines | 11718 | 11799 | +81 | + | Covered | 7669 | 7730 | +61 | - | Code to Test Ratio | 1:0.4 | 1:0.3 | -0.0 | | Code | 36608 | 36764 | +156 | + | Test | 12836 | 12853 | +17 | + | Test Execution Time | 7m8s | 7m5s | -3s | ```

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

Files Coverage +/-
grpc/federation/cel.go 0.0% 0.0%
resolver/def.go 93.7% -0.4%
resolver/graph.go 87.9% +1.2%
resolver/resolver.go 82.0% +0.1%
source/file.go 64.8% +0.3%

Reported by octocov