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
93 stars 3 forks source link

fix(deps): update rust crate napi-derive to v2.16.12 #593

Open renovate[bot] opened 4 months ago

renovate[bot] commented 4 months ago

This PR contains the following updates:

Package Type Update Change
napi-derive dependencies patch 2.16.1 -> 2.16.12

Release Notes

napi-rs/napi-rs (napi-derive) ### [`v2.16.12`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.12) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.11...napi-derive@2.16.12) #### What Changed - fix(napi-derive): string enum validate logic [#​2213](https://redirect.github.com/napi-rs/napi-rs/issues/2213) [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) - fix(napi-derive): warning in empty enum codegen [#​2214](https://redirect.github.com/napi-rs/napi-rs/issues/2214) [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) - fix(napi,napi-derive): ffi lifetime and pointer sound issues [#​2216](https://redirect.github.com/napi-rs/napi-rs/issues/2216) [@​cathy-sjh](https://redirect.github.com/cathy-sjh) - fix(napi-derive): replace self when function returns `Result` [#​2224](https://redirect.github.com/napi-rs/napi-rs/issues/2224) [@​CPunisher](https://redirect.github.com/CPunisher) - perf(macro): constructor don't support asynchronous function [#​2239](https://redirect.github.com/napi-rs/napi-rs/issues/2239) [@​richerfu](https://redirect.github.com/richerfu) - fix(napi-derive): call flush on the BufWriter [#​2242](https://redirect.github.com/napi-rs/napi-rs/issues/2242) [@​richerfu](https://redirect.github.com/richerfu) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10...napi-derive@2.16.12 ### [`v2.16.11`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.11) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10...napi-derive@2.16.11) #### What Changed - fix(napi-derive): add more cases for typegen of function args by [@​CPunisher](https://redirect.github.com/CPunisher) [#​2210](https://redirect.github.com/napi-rs/napi-rs/issues/2210) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.10...napi-derive@2.16.11 ### [`v2.16.10`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi%402.16.10) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.9...napi-derive@2.16.10) #### What Changed - fix(napi,napi-derive): ffi lifetime and pointer sound issues [https://github.com/napi-rs/napi-rs/pull/2216](https://redirect.github.com/napi-rs/napi-rs/pull/2216) [@​cathy-sjh](https://redirect.github.com/cathy-sjh) - chore(napi): mark JsArraybufferValue's value pub [https://github.com/napi-rs/napi-rs/pull/2226](https://redirect.github.com/napi-rs/napi-rs/pull/2226) [@​richerfu](https://redirect.github.com/richerfu) - fix(napi): use error_ref should checkout it at first [https://github.com/napi-rs/napi-rs/pull/2235](https://redirect.github.com/napi-rs/napi-rs/pull/2235) [@​richerfu](https://redirect.github.com/richerfu) - fix(napi): windows function registration timing [https://github.com/napi-rs/napi-rs/pull/2248](https://redirect.github.com/napi-rs/napi-rs/pull/2248) [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) - perf(napi): remove unnecessary checks for strings from napi_get_value_string_utf8 [#​2247](https://redirect.github.com/napi-rs/napi-rs/issues/2247) [@​SyMind](https://redirect.github.com/SyMind) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi@2.16.9...napi@2.16.10 ### [`v2.16.9`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.9) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.8...napi-derive@2.16.9) #### What's Changed - fix: napi getter macros by [@​SyMind](https://redirect.github.com/SyMind) in [https://github.com/napi-rs/napi-rs/pull/2188](https://redirect.github.com/napi-rs/napi-rs/pull/2188) #### New Contributors - [@​SyMind](https://redirect.github.com/SyMind) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2188](https://redirect.github.com/napi-rs/napi-rs/pull/2188) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.8...napi-derive@2.16.9 ### [`v2.16.8`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.8) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.7...napi-derive@2.16.8) #### What changed - fix(napi-derive): missing declare keyword for function **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.7...napi-derive@2.16.8 ### [`v2.16.7`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.7) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.6...napi-derive@2.16.7) #### What Changed - fix(napi-derive): class constructor and factory should support custom error status by [@​richerfu](https://redirect.github.com/richerfu) [#​2161](https://redirect.github.com/napi-rs/napi-rs/issues/2161) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi@2.16.8...napi-derive@2.16.7 ### [`v2.16.6`](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.5...napi-derive@2.16.6) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.5...napi-derive@2.16.6) ### [`v2.16.5`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi%402.16.5) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.4...napi-derive@2.16.5) #### What's Changed - Fix panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 by [@​tronical](https://redirect.github.com/tronical) in [https://github.com/napi-rs/napi-rs/pull/2083](https://redirect.github.com/napi-rs/napi-rs/pull/2083) - fix(napi): make sure env without exception pending before throw error by [@​southorange0929](https://redirect.github.com/southorange0929) in [https://github.com/napi-rs/napi-rs/pull/2092](https://redirect.github.com/napi-rs/napi-rs/pull/2092) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5 ### [`v2.16.4`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi%402.16.4) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.3...napi-derive@2.16.4) #### What changed - feat(napi): allow user defined tokio runtime by [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) [#​2040](https://redirect.github.com/napi-rs/napi-rs/issues/2040) - fix(napi): handle panic in async block by [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) ([https://github.com/napi-rs/napi-rs/pull/2050](https://redirect.github.com/napi-rs/napi-rs/pull/2050)) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi@2.16.2...napi@2.16.4 ### [`v2.16.3`](https://redirect.github.com/napi-rs/napi-rs/compare/napi@2.16.2...napi@2.16.3) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.2...napi-derive@2.16.3) ### [`v2.16.2`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%402.16.2) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-derive@2.16.1...napi-derive@2.16.2) ##### What's Changed - feat(napi-derive): enhance the error messages in object validator by [@​Brooooooklyn](https://redirect.github.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/2034](https://redirect.github.com/napi-rs/napi-rs/pull/2034) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.1...napi-derive@2.16.2

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 was generated by Mend Renovate. View the repository job log.

github-actions[bot] commented 4 months ago

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

Crate: ``

๐Ÿ“Š Total Usages: 240

๐Ÿ“Œ Expected Annotations

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: ``

๐Ÿ“Š Total Expected Usages: 22

expand details 1. 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` 2. 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` 3. Reason: "statically defined regex pattern, we know it works ;)" - Code: `.unwrap();` - Location: `./libs/config/src/interpolate.rs:18` 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` 10. Reason: "we're parsing a statically defined constant, we know it works ;)" - Code: `.unwrap()` - Location: `./libs/common/src/graphql.rs:31` 11. Reason: "we need this" - Code: `panic!("Exited process!")` - Location: `./libs/napi/src/lib.rs:18` 12. 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` 13. 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` 14. 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` 15. 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` 16. 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` 17. 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` 18. 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` 19. 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` 20. 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` 21. 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` 22. 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: 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: 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`

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: 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: config

๐Ÿ“Š Total Expected Usages: 9

expand details 1. 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` 2. 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` 3. Reason: "statically defined regex pattern, we know it works ;)" - Code: `.unwrap();` - Location: `./libs/config/src/interpolate.rs:18` 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: 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`
github-actions[bot] commented 4 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": "a92ed51e0996d8e9de041ca05ce623d2c491444df6a535a566dabd5cb8336946" } }, { "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": "0b1fdf9351dd648a72040ee0dafa33b6a4b0731e", "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-12852990-6e4e-4bbb-91a0-6edcd9f5d2cd/builder-12852990-6e4e-4bbb-91a0-6edcd9f5d2cd0/jci3iuud0cmdjk2vma2nbvjvz", "containerimage.config.digest": "sha256:f23d526b64084cb6880ec24a34a327cfc70a5567eb32933b6bce8c1b6dfc05e3", "containerimage.descriptor": { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:012ff9aa0297721f0129f1ea449d2bd0f6b560fe923fee299321391514f6ff9e", "size": 902, "platform": { "architecture": "amd64", "os": "linux" } }, "containerimage.digest": "sha256:012ff9aa0297721f0129f1ea449d2bd0f6b560fe923fee299321391514f6ff9e", "image.name": "ghcr.io/the-guild-org/conductor/conductor:0b1fdf9351dd648a72040ee0dafa33b6a4b0731e" } } ```
github-actions[bot] commented 4 months ago

โœ… Benchmark Results

     data_received..................: 13 MB   221 kB/s
     data_sent......................: 22 MB   363 kB/s
     http_req_blocked...............: min=962ns    avg=2.77ยตs   med=2.13ยตs   max=724.5ยตs  p(95)=3.08ยตs   p(99)=9.78ยตs  
     http_req_connecting............: min=0s       avg=310ns    med=0s       max=635.63ยตs p(95)=0s       p(99)=0s      
     http_req_duration..............: min=313.76ยตs avg=415.42ยตs med=382.77ยตs max=33.07ms  p(95)=474.8ยตs  p(99)=544.95ยตs
       { expected_response:true }...: min=313.76ยตs avg=415.42ยตs med=382.77ยตs max=33.07ms  p(95)=474.8ยตs  p(99)=544.95ยตs
     โœ“ { scenario:rps_1000 }........: min=313.76ยตs avg=415.42ยตs med=382.77ยตs max=33.07ms  p(95)=474.8ยตs  p(99)=544.95ยตs
     http_req_failed................: 0.00%   โœ“ 0           โœ— 60001
     โœ“ { scenario:rps_1000 }........: 0.00%   โœ“ 0           โœ— 60001
     http_req_receiving.............: min=9.86ยตs   avg=25.93ยตs  med=25.51ยตs  max=814.68ยตs p(95)=33.23ยตs  p(99)=39.3ยตs  
     http_req_sending...............: min=6.88ยตs   avg=15.22ยตs  med=13.99ยตs  max=2.15ms   p(95)=23.13ยตs  p(99)=31.69ยตs 
     http_req_tls_handshaking.......: min=0s       avg=0s       med=0s       max=0s       p(95)=0s       p(99)=0s      
     http_req_waiting...............: min=275.48ยตs avg=374.26ยตs med=342.25ยตs max=33.03ms  p(95)=434.12ยตs p(99)=498.46ยตs
     http_reqs......................: 60001   1000.005723/s
     โœ“ { scenario:rps_1000 }........: 60001   1000.005723/s
     iteration_duration.............: min=387.63ยตs avg=501.45ยตs med=467.53ยตs max=33.33ms  p(95)=564.35ยตs p(99)=671.03ยตs
     iterations.....................: 60001   1000.005723/s
     โœ“ { scenario:rps_1000 }........: 60001   1000.005723/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