-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat: OpenAPI spec to tailcall config #2156
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2156 +/- ##
==========================================
- Coverage 86.02% 86.00% -0.03%
==========================================
Files 234 236 +2
Lines 22405 22644 +239
==========================================
+ Hits 19274 19475 +201
- Misses 3131 3169 +38 ☔ View full report in Codecov by Sentry. |
|
Report | Mon, July 8, 2024 at 09:23:48 UTC |
Project | tailcall |
Branch | 2156/merge |
Testbed | benchmarking-runner |
Click to view all benchmark results
Benchmark | Latency | Latency Results nanoseconds (ns) | (Δ%) | Latency Upper Boundary nanoseconds (ns) | (%) |
---|---|---|---|
from_json_bench | ✅ (view plot) | 6,097,100.00 (-12.12%) | 7,769,919.24 (78.47%) |
group_by | ✅ (view plot) | 481.57 (-13.23%) | 626.76 (76.83%) |
input/args.missing | ✅ (view plot) | 25.52 (+5.53%) | 27.72 (92.04%) |
input/args.nested.existing | ✅ (view plot) | 54.86 (+15.42%) | 61.37 (89.39%) |
input/args.nested.missing | ✅ (view plot) | 38.93 (+2.34%) | 40.82 (95.37%) |
input/args.root | ✅ (view plot) | 51.56 (+17.49%) | 58.33 (88.39%) |
input/headers.existing | ✅ (view plot) | 30.66 (-3.01%) | 33.96 (90.30%) |
input/headers.missing | ✅ (view plot) | 29.31 (-4.53%) | 33.77 (86.79%) |
input/value.missing | ✅ (view plot) | 23.35 (-0.28%) | 24.96 (93.53%) |
input/value.nested.existing | ✅ (view plot) | 41.28 (-0.80%) | 45.10 (91.53%) |
input/value.nested.missing | ✅ (view plot) | 36.56 (-0.72%) | 38.62 (94.65%) |
input/value.root | ✅ (view plot) | 37.76 (-0.45%) | 41.46 (91.08%) |
input/vars.existing | ✅ (view plot) | 7.49 (-2.76%) | 8.96 (83.57%) |
input/vars.missing | ✅ (view plot) | 8.11 (-19.31%) | 13.41 (60.44%) |
synth_nested | ✅ (view plot) | 153,590.00 (+231.60%) | 162,761.79 (94.36%) |
test_batched_body | ✅ (view plot) | 1,983.40 (-98.01%) | 930,672.53 (0.21%) |
test_batched_body #2 | ✅ (view plot) | 1,590,200.00 (-6.19%) | 1,819,909.01 (87.38%) |
test_data_loader | ✅ (view plot) | 381,920.00 (-16.96%) | 519,212.38 (73.56%) |
test_handle_request | ✅ (view plot) | 141,570.00 (-8.57%) | 172,628.65 (82.01%) |
test_http_execute_method | ✅ (view plot) | 14,534.00 (-17.64%) | 20,576.27 (70.63%) |
with_mustache_expressions | ✅ (view plot) | 1,082.70 (-6.80%) | 1,235.58 (87.63%) |
with_mustache_literal | ✅ (view plot) | 738.41 (+2.26%) | 778.60 (94.84%) |
Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help
--- | ||
schema @server @upstream { | ||
query: Query | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some basic generated configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added code for generating queries
r"^.*\.json", | ||
open_api_to_config_spec::run_open_api_to_config_spec, | ||
"src/core/generator/tests/fixtures/openapi", | ||
r"^.*\.yml" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move these tests to open_api_to_config_spec.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created a new file named config_gen.rs
which makes call to both run_json_to_config_spec
and run_openapi_to_config_spec
src/core/generator/from_openapi.rs
Outdated
} | ||
} | ||
|
||
pub fn from_openapi_spec(query: &str, spec: OpenApiV3Spec) -> Config { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep only FromOpenAPIGenerator
public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the from_openapi_spec
function
Action required: PR inactive for 5 days. |
Summary:
Briefly describe the changes made in this PR.
Issue Reference(s):
Fixes #... (Replace "..." with the issue number)
Build & Testing:
cargo test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>