Skip to content
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

fix(ci): fix napi release #372

Merged
merged 28 commits into from
Jan 26, 2024
Merged

fix(ci): fix napi release #372

merged 28 commits into from
Jan 26, 2024

Conversation

YassinEldeeb
Copy link
Contributor

No description provided.

@YassinEldeeb YassinEldeeb changed the title fix(ci): needs build fix(ci): publish needs build Jan 24, 2024
Copy link

github-actions bot commented Jan 24, 2024

🚨 Rust Panic Audit: 75 Potential Panic Points Detected 🚨

Crate: federation_query_planner

📊 Total Usages: 50

  • 🎁 unwrap usages: 29
  • 🔢 array_index usages: 10
  • 🔎 expect usages: 8
  • 🚨 panic usages: 3

Crate: engine

📊 Total Usages: 12

  • 🎁 unwrap usages: 8
  • 🔎 expect usages: 1
  • 🚨 panic usages: 3

Crate: telemetry

📊 Total Usages: 5

  • 🔢 array_index usages: 3
  • 🎁 unwrap usages: 2

Crate: tracing

📊 Total Usages: 3

  • 🎁 unwrap usages: 3

Crate: conductor

📊 Total Usages: 3

  • 🚨 panic usages: 1
  • 🎁 unwrap usages: 1
  • 🔎 expect usages: 1

Crate: config

📊 Total Usages: 1

  • 🚨 panic usages: 1

Crate: cloudflare_worker

📊 Total Usages: 1

  • 🚨 panic usages: 1

📌 Expected Annotations

Crate: engine

📊 Total Expected Usages: 5

expand details
  1. Reason: "without a fetcher, there's no executor, without an executor, there's no gateway."
  • Code: panic!(
  • Location: ./libs/engine/src/source/graphql_source.rs:30
  1. Reason: "without a fetcher, there's no executor, without an executor, there's no gateway."
  • Code: panic!("Failed while initializing the executor's fetcher for Federation source");
  • Location: ./libs/engine/src/source/federation_source.rs:109
  1. Reason: "without a fetcher, there's no executor, without an executor, there's no gateway."
  • Code: panic!("Failed while initializing the executor's fetcher for Federation source");
  • Location: ./libs/engine/src/source/federation_source.rs:140
  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:138
  1. 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:170

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

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

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: tracing::subscriber::set_global_default(subscriber).expect("failed to set up tracing");
  • Location: ./bin/conductor/src/lib.rs:37
  1. 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:74

Crate: disable_introspection

📊 Total Expected Usages: 1

expand details
  1. Reason: "we need to exit the process if our provided VRL condition has incorrect syntax."
  • Code: panic!("failed to compile vrl program for disable_introspection plugin");
  • Location: ./plugins/disable_introspection/src/plugin.rs:33

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
  1. 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
  1. Reason: "statically defined regex pattern, we know it works ;)"
  • Code: .unwrap();
  • Location: ./libs/config/src/interpolate.rs:18
  1. Reason: "👇"
  • Code: let raw_contents = read_to_string(file_path)
  • Location: ./libs/config/src/lib.rs:576
  1. Reason: "👇"
  • Code: panic!("Failed to interpolate config file, please resolve the above errors");
  • Location: ./libs/config/src/lib.rs:608
  1. Reason: "👇"
  • Code: parse_config_from_json(&config_string).expect("Failed to parse JSON config file")
  • Location: ./libs/config/src/lib.rs:615
  1. Reason: "👇"
  • Code: parse_config_from_yaml(&config_string).expect("Failed to parse YAML config file")
  • Location: ./libs/config/src/lib.rs:619
  1. Reason: "👇"
  • Code: _ => panic!("Unsupported config file extension"),
  • Location: ./libs/config/src/lib.rs:636
  1. Reason: "👇"
  • Code: None => panic!("Config file has no extension"),
  • Location: ./libs/config/src/lib.rs:639

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:122
  1. 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:139

Copy link

github-actions bot commented Jan 24, 2024

🐋 This PR was built and pushed to the following Docker images:

Docker Bake metadata
{
"conductor": {
  "containerimage.config.digest": "sha256:1e6deb8999cc73acbcc0e9bf288f2444b3c1d4e6fde694c1e6eac276e93a32bb",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
    "digest": "sha256:7eb85396f55335c22a5126814d2108ccd6852ba609b4252dffffbde3fbdc1865",
    "size": 902,
    "platform": {
      "architecture": "amd64",
      "os": "linux"
    }
  },
  "containerimage.digest": "sha256:7eb85396f55335c22a5126814d2108ccd6852ba609b4252dffffbde3fbdc1865",
  "image.name": "ghcr.io/the-guild-org/conductor/conductor:03f4e660af926dc093f390be5193270a39ae49ef"
}
}

Copy link

github-actions bot commented Jan 24, 2024

✅ Benchmark Results

     data_received..................: 13 MB   221 kB/s
     data_sent......................: 22 MB   363 kB/s
     http_req_blocked...............: min=852ns    avg=2.65µs   med=2.03µs   max=462.37µs p(95)=2.95µs   p(99)=11.07µs 
     http_req_connecting............: min=0s       avg=322ns    med=0s       max=426.61µs p(95)=0s       p(99)=0s      
     http_req_duration..............: min=314.64µs avg=405.94µs med=378.9µs  max=26.17ms  p(95)=472.58µs p(99)=538.61µs
       { expected_response:true }...: min=314.64µs avg=405.94µs med=378.9µs  max=26.17ms  p(95)=472.58µs p(99)=538.61µs
     ✓ { scenario:rps_1000 }........: min=314.64µs avg=405.94µs med=378.9µs  max=26.17ms  p(95)=472.58µs p(99)=538.61µs
     http_req_failed................: 0.00%   ✓ 0          ✗ 60001
     ✓ { scenario:rps_1000 }........: 0.00%   ✓ 0          ✗ 60001
     http_req_receiving.............: min=9.53µs   avg=26.04µs  med=25.57µs  max=1.62ms   p(95)=34.01µs  p(99)=42.75µs 
     http_req_sending...............: min=6.14µs   avg=15.21µs  med=13.95µs  max=1.64ms   p(95)=24.94µs  p(99)=32.8µs  
     http_req_tls_handshaking.......: min=0s       avg=0s       med=0s       max=0s       p(95)=0s       p(99)=0s      
     http_req_waiting...............: min=274.09µs avg=364.69µs med=338.03µs max=26.12ms  p(95)=432.2µs  p(99)=494µs   
     http_reqs......................: 60001   999.989442/s
     ✓ { scenario:rps_1000 }........: 60001   999.989442/s
     iteration_duration.............: min=381.55µs avg=491.7µs  med=462.86µs max=26.5ms   p(95)=560.68µs p(99)=659.26µs
     iterations.....................: 60001   999.989442/s
     ✓ { scenario:rps_1000 }........: 60001   999.989442/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............................: 0       min=0        max=2  
     vus_max........................: 200     min=200      max=200

Copy link

github-actions bot commented Jan 25, 2024

💻 Website Preview

The latest changes are available as preview in: https://12454a6b.conductor-t2.pages.dev

@YassinEldeeb YassinEldeeb changed the title fix(ci): publish needs build fix(ci): fix napi release Jan 26, 2024
@YassinEldeeb YassinEldeeb merged commit b0d0c17 into master Jan 26, 2024
15 of 16 checks passed
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.

2 participants