the-guild-org / conductor

Conductor is a cutting-edge, open-source GraphQL Gateway, fully compliant with the GraphQL specification and designed to supercharge any API with powerful features and proxy flows.
https://the-guild.dev/graphql/gateway
MIT License
98 stars 3 forks source link

chore(deps): update rust crate schemars to v0.8.18 #582

Closed renovate[bot] closed 6 months ago

renovate[bot] commented 6 months ago

Mend Renovate

This PR contains the following updates:

Package Type Update Change
schemars (source) workspace.dependencies patch 0.8.16 -> 0.8.18

Release Notes

GREsau/schemars (schemars) ### [`v0.8.18`](https://togithub.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#0818---2024-05-06) [Compare Source](https://togithub.com/GREsau/schemars/compare/v0.8.17...v0.8.18) ##### Fixed: - Reduce size of MIR output (and improve release-mode compile time) when deriving `JsonSchema` on enums ([https://github.com/GREsau/schemars/pull/266](https://togithub.com/GREsau/schemars/pull/266) / [https://github.com/GREsau/schemars/pull/286](https://togithub.com/GREsau/schemars/pull/286)) ### [`v0.8.17`](https://togithub.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#0817---2024-04-28) [Compare Source](https://togithub.com/GREsau/schemars/compare/v0.8.16...v0.8.17) ##### Changed: - Update to syn 2.0, which should improve compile times in many cases ([https://github.com/GREsau/schemars/pull/281](https://togithub.com/GREsau/schemars/pull/281))

Configuration

๐Ÿ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

๐Ÿšฆ Automerge: Disabled by config. Please merge this manually once you are satisfied.

โ™ป Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

github-actions[bot] commented 6 months ago

๐Ÿšจ Rust Panic Audit: 102 Potential Panic Points Detected ๐Ÿšจ

Crate: federation_query_planner

๐Ÿ“Š Total Usages: 53

๐Ÿ“Œ Expected Annotations

Crate: conductor

๐Ÿ“Š Total Expected Usages: 2

expand details 1. Reason: "we need to exit the process, if the logger can't be correctly set." - Code: `let _guard = tracing::subscriber::set_default(subscriber);` - Location: `./bin/conductor/src/lib.rs:37` 2. Reason: "we need to exit the process, if the provided configuration file is incorrect." - Code: `panic!("Failed to initialize gateway: {:?}", e);` - Location: `./bin/conductor/src/lib.rs:76`

Crate: jwt_auth

๐Ÿ“Š Total Expected Usages: 1

expand details 1. Reason: "if initiating an http client fails, then we have to exit." - Code: `let client = wasm_polyfills::create_http_client().build().unwrap();` - Location: `./plugins/jwt_auth/src/jwks_provider.rs:49`

Crate: config

๐Ÿ“Š Total Expected Usages: 9

expand details 1. Reason: "statically defined regex pattern, we know it works ;)" - Code: `.unwrap();` - Location: `./libs/config/src/interpolate.rs:18` 2. Reason: "part of development docgen CLI" - Code: `.expect("Failed to serialize json schema for config file!");` - Location: `./libs/config/src/generate-json-schema.rs:50` 3. Reason: "part of development docgen CLI" - Code: `.expect("Failed to write the json schema to the file system!");` - Location: `./libs/config/src/generate-json-schema.rs:54` 4. Reason: "๐Ÿ‘‡" - Code: `let raw_contents = read_to_string(file_path)` - Location: `./libs/config/src/lib.rs:815` 5. Reason: "๐Ÿ‘‡" - Code: `panic!("Failed to interpolate config file, please resolve the above errors");` - Location: `./libs/config/src/lib.rs:847` 6. Reason: "๐Ÿ‘‡" - Code: `parse_config_from_json(&config_string).expect("Failed to parse JSON config file")` - Location: `./libs/config/src/lib.rs:854` 7. Reason: "๐Ÿ‘‡" - Code: `parse_config_from_yaml(&config_string).expect("Failed to parse YAML config file")` - Location: `./libs/config/src/lib.rs:858` 8. Reason: "๐Ÿ‘‡" - Code: `_ => panic!("Unsupported config file extension"),` - Location: `./libs/config/src/lib.rs:875` 9. Reason: "๐Ÿ‘‡" - Code: `None => panic!("Config file has no extension"),` - Location: `./libs/config/src/lib.rs:878`

Crate: vrl

๐Ÿ“Š Total Expected Usages: 2

expand details 1. Reason: "if the provided VRL code in the config file can't compile, we have to exit." - Code: `panic!("failed to compile vrl program");` - Location: `./plugins/vrl/src/plugin.rs:129` 2. Reason: "`states` is a non-user provided variable" - Code: `.expect("can't merge states when `states` is an empty vector!")` - Location: `./plugins/vrl/src/plugin.rs:146`

Crate: common

๐Ÿ“Š Total Expected Usages: 1

expand details 1. Reason: "we're parsing a statically defined constant, we know it works ;)" - Code: `.unwrap()` - Location: `./libs/common/src/graphql.rs:31`

Crate: cloudflare_worker

๐Ÿ“Š Total Expected Usages: 4

expand details 1. Reason: "it panics only if the header name is not valid, and we know it is." - Code: `.unwrap()` - Location: `./bin/cloudflare_worker/src/http_tracing.rs:20` 2. Reason: "it panics only if the URL source is not valid, and it's already validated before." - Code: `let url = req.url().unwrap();` - Location: `./bin/cloudflare_worker/src/http_tracing.rs:23` 3. Reason: "it only panics if we are not running in a CF context, should be safe." - Code: `let cf_info = req.cf().unwrap();` - Location: `./bin/cloudflare_worker/src/http_tracing.rs:27` 4. Reason: "unwraps only in special cases where "data:text" is used." - Code: `let http_host = url.host().unwrap().to_string();` - Location: `./bin/cloudflare_worker/src/http_tracing.rs:36`

Crate: napi

๐Ÿ“Š Total Expected Usages: 1

expand details 1. Reason: "we need this" - Code: `panic!("Exited process!")` - Location: `./libs/napi/src/lib.rs:18`

Crate: engine

๐Ÿ“Š Total Expected Usages: 2

expand details 1. Reason: "if we are unable to construct the endpoints and attach them onto the gateway's http server, we have to exit" - Code: `Err(e) => panic!("failed to construct endpoint: {:?}", e),` - Location: `./libs/engine/src/gateway.rs:158` 2. Reason: "we can safely index here, it's inside a test with constant defined fixtures." - Code: `ConductorGateway::execute(request, &gw.routes[0].route_data).await` - Location: `./libs/engine/src/gateway.rs:190`
github-actions[bot] commented 6 months ago

๐Ÿ‹ This PR was built and pushed to the following Docker images:

Docker Bake metadata ```json { "conductor": { "buildx.build.provenance": { "buildType": "https://mobyproject.org/buildkit@v1", "materials": [ { "uri": "pkg:docker/debian@12.5?platform=linux%2Famd64", "digest": { "sha256": "1aadfee8d292f64b045adb830f8a58bfacc15789ae5f489a0fedcd517a862cb9" } }, { "uri": "pkg:docker/rust@1.77.2?platform=linux%2Famd64", "digest": { "sha256": "83101f6985c93e1e6501b3375de188ee3d2cbb89968bcc91611591f9f447bd42" } } ], "invocation": { "configSource": { "entryPoint": "Dockerfile" }, "parameters": { "frontend": "dockerfile.v0", "args": { "label:org.opencontainers.image.authors": "The Guild ", "label:org.opencontainers.image.description": "Conductor is a robust GraphQL Gateway.", "label:org.opencontainers.image.docs": "https://the-guild.dev/graphql/gateway", "label:org.opencontainers.image.licenses": "MIT", "label:org.opencontainers.image.revision": "ac2b0f59e385acbb063d9e09a4348af95f1a72c0", "label:org.opencontainers.image.source": "https://github.com/the-guild-org/conductor", "label:org.opencontainers.image.title": "Conductor", "label:org.opencontainers.image.url": "https://the-guild.dev/graphql/gateway", "label:org.opencontainers.image.vendor": "The Guild", "label:org.opencontainers.image.version": "" }, "locals": [ { "name": "context" }, { "name": "dockerfile" } ] }, "environment": { "platform": "linux/amd64" } } }, "buildx.build.ref": "builder-188b2ae8-a28f-46df-8d58-f51c33abdd89/builder-188b2ae8-a28f-46df-8d58-f51c33abdd890/t606uorc3nhwzoqoorgtsvt65", "containerimage.config.digest": "sha256:98eb775ed297c56e3e4493c1ab90bab1ab7343ea2dbdc73a37a84993868d3c42", "containerimage.descriptor": { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:c8510698f3a9b44d43412464c3e5cbe8cdd1ba80f19ca0cdcc27310de2e0debf", "size": 902, "platform": { "architecture": "amd64", "os": "linux" } }, "containerimage.digest": "sha256:c8510698f3a9b44d43412464c3e5cbe8cdd1ba80f19ca0cdcc27310de2e0debf", "image.name": "ghcr.io/the-guild-org/conductor/conductor:ac2b0f59e385acbb063d9e09a4348af95f1a72c0" } } ```
github-actions[bot] commented 6 months ago

โœ… Benchmark Results

     data_received..................: 13 MB   221 kB/s
     data_sent......................: 22 MB   363 kB/s
     http_req_blocked...............: min=611ns    avg=2.52ยตs   med=1.87ยตs   max=856.6ยตs  p(95)=2.91ยตs   p(99)=6.3ยตs   
     http_req_connecting............: min=0s       avg=358ns    med=0s       max=608.68ยตs p(95)=0s       p(99)=0s      
     http_req_duration..............: min=307.75ยตs avg=406.88ยตs med=382.09ยตs max=13.43ms  p(95)=481.08ยตs p(99)=554.08ยตs
       { expected_response:true }...: min=307.75ยตs avg=406.88ยตs med=382.09ยตs max=13.43ms  p(95)=481.08ยตs p(99)=554.08ยตs
     โœ“ { scenario:rps_1000 }........: min=307.75ยตs avg=406.88ยตs med=382.09ยตs max=13.43ms  p(95)=481.08ยตs p(99)=554.08ยตs
     http_req_failed................: 0.00%   โœ“ 0           โœ— 60001
     โœ“ { scenario:rps_1000 }........: 0.00%   โœ“ 0           โœ— 60001
     http_req_receiving.............: min=9.82ยตs   avg=25.8ยตs   med=25.31ยตs  max=920.37ยตs p(95)=33.34ยตs  p(99)=39.05ยตs 
     http_req_sending...............: min=6.04ยตs   avg=14.9ยตs   med=13.77ยตs  max=2.33ms   p(95)=23.79ยตs  p(99)=32.66ยตs 
     http_req_tls_handshaking.......: min=0s       avg=0s       med=0s       max=0s       p(95)=0s       p(99)=0s      
     http_req_waiting...............: min=274.96ยตs avg=366.17ยตs med=342.05ยตs max=13.38ms  p(95)=441ยตs    p(99)=511.95ยตs
     http_reqs......................: 60001   1000.005822/s
     โœ“ { scenario:rps_1000 }........: 60001   1000.005822/s
     iteration_duration.............: min=386.3ยตs  avg=491.13ยตs med=465.61ยตs max=13.67ms  p(95)=568.3ยตs  p(99)=682.8ยตs 
     iterations.....................: 60001   1000.005822/s
     โœ“ { scenario:rps_1000 }........: 60001   1000.005822/s
     valid_graphql_response.........: 100.00% โœ“ 60001       โœ— 0    
     โœ“ { scenario:rps_1000 }........: 100.00% โœ“ 60001       โœ— 0    
     valid_http_code................: 100.00% โœ“ 60001       โœ— 0    
     โœ“ { scenario:rps_1000 }........: 100.00% โœ“ 60001       โœ— 0    
     vus............................: 1       min=0         max=2  
     vus_max........................: 200     min=200       max=200