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

ci: custom panic free audit tool #294

Merged
merged 12 commits into from
Jan 8, 2024
Merged

ci: custom panic free audit tool #294

merged 12 commits into from
Jan 8, 2024

Conversation

YassinEldeeb
Copy link
Contributor

@YassinEldeeb YassinEldeeb commented Jan 8, 2024

helps with #291

  • pattern detection: Identify and count patterns like panic!(), unreachable!(), todo!(), unimplemented!(), array indexing, and expect() calls, which we wish to minimize as possible.
  • workspace toml: use the workspace toml to detect the files to audit and the files to exclude.
  • expected annotations: provide a way to specify a call as expected to remove it from the audit warnings, and flag it as an FYI in the audit report.
  • report generation: generate the report as markdown and push it to under a PR comment.
  • cleanup: don't override the comment for k6 performance, and don't post crates with zero panic audit issues

@YassinEldeeb YassinEldeeb changed the title ci: panic free audit ci: panic free audit tool Jan 8, 2024
@YassinEldeeb YassinEldeeb changed the title ci: panic free audit tool ci: custom panic free audit tool Jan 8, 2024
Copy link

github-actions bot commented Jan 8, 2024

✅ Benchmark Results

     data_received..................: 62 MB   776 kB/s
     data_sent......................: 98 MB   1.2 MB/s
     http_req_blocked...............: avg=2.37µs  min=732ns    med=1.97µs  max=13.84ms  p(90)=2.25µs  p(95)=2.45µs 
     http_req_connecting............: avg=173ns   min=0s       med=0s      max=13.79ms  p(90)=0s      p(95)=0s     
   ✓ http_req_duration..............: avg=27.31ms min=766.18µs med=26.73ms max=126.53ms p(90)=43.71ms p(95)=50.01ms
       { expected_response:true }...: avg=27.31ms min=766.18µs med=26.73ms max=126.53ms p(90)=43.71ms p(95)=50.01ms
   ✓ http_req_failed................: 0.00%   ✓ 0           ✗ 255506
     http_req_receiving.............: avg=31.29µs min=9.56µs   med=25.51µs max=17.65ms  p(90)=38µs    p(95)=41.84µs
     http_req_sending...............: avg=15.09µs min=4.87µs   med=11.16µs max=24.48ms  p(90)=13.63µs p(95)=21.16µs
     http_req_tls_handshaking.......: avg=0s      min=0s       med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=27.26ms min=731.16µs med=26.69ms max=126.49ms p(90)=43.66ms p(95)=49.94ms
     http_reqs......................: 255506  3193.788919/s
     iteration_duration.............: avg=27.41ms min=837.25µs med=26.83ms max=126.62ms p(90)=43.81ms p(95)=50.11ms
     iterations.....................: 255506  3193.788919/s
   ✓ valid_graphql_response.........: 100.00% ✓ 255506      ✗ 0     
   ✓ valid_http_code................: 100.00% ✓ 255506      ✗ 0     
     vus............................: 1       min=1         max=100 
     vus_max........................: 100     min=100       max=100 

Copy link
Member

@dotansimha dotansimha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I pushed some fixes

Copy link

github-actions bot commented Jan 8, 2024

🚨 Rust Panic Audit: 136 Potential Panic Points Detected 🚨

Crate: vrl

📊 Total Usages: 37

  • 🚨 panic usages: 1
  • 🔢 array_index usages: 3
  • 🎁 unwrap usages: 32
  • 🔎 expect usages: 1

Crate: jwt_auth

📊 Total Usages: 31

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

Crate: config

📊 Total Usages: 14

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

Crate: common

📊 Total Usages: 12

  • 🎁 unwrap usages: 12

Crate: cors

📊 Total Usages: 11

  • 🎁 unwrap usages: 11

Crate: engine

📊 Total Usages: 10

  • 🔢 array_index usages: 1
  • 🚨 panic usages: 1
  • 🎁 unwrap usages: 8

Crate: cloudflare_worker

📊 Total Usages: 8

  • 🎁 unwrap usages: 8

Crate: persisted_documents

📊 Total Usages: 4

  • 🔎 expect usages: 4

Crate: conductor

📊 Total Usages: 3

  • 🔎 expect usages: 2
  • 🚨 panic usages: 1

Crate: graphiql

📊 Total Usages: 3

  • 🎁 unwrap usages: 3

Crate: http_get

📊 Total Usages: 1

  • 🎁 unwrap usages: 1

Crate: disable_introspection

📊 Total Usages: 1

  • 🚨 panic usages: 1

Crate: napi

📊 Total Usages: 1

  • 🚨 panic usages: 1

Crate: server

📊 Total Usages: 0

Crate: wasm_polyfills

📊 Total Usages: 0

Crate: match_content_type

📊 Total Usages: 0

@the-guild-org the-guild-org deleted a comment from github-actions bot Jan 8, 2024
@dotansimha dotansimha merged commit e3080a5 into master Jan 8, 2024
dotansimha pushed a commit that referenced this pull request Jan 9, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff
dotansimha pushed a commit that referenced this pull request Jan 10, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff
dotansimha pushed a commit that referenced this pull request Jan 10, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally
dotansimha pushed a commit that referenced this pull request Jan 10, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally
dotansimha pushed a commit that referenced this pull request Jan 11, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something
dotansimha pushed a commit that referenced this pull request Jan 11, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep
dotansimha pushed a commit that referenced this pull request Jan 14, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep
dotansimha pushed a commit that referenced this pull request Jan 14, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep

update config
dotansimha pushed a commit that referenced this pull request Jan 14, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep

update config
dotansimha pushed a commit that referenced this pull request Jan 14, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep

update config
dotansimha pushed a commit that referenced this pull request Jan 15, 2024
Co-authored-by: Dotan Simha <[email protected]>

hmmm

ok getting there with the Layers

ok getting there with the plugin

ok

ok using latest deps now

OK

adjustments

ok

ok getting there

ok

use otel semantic convention for graphql

jeager works, also otlp

ok

ok zipkin works

fixes, added datadog

added batch

fix config

handle shutdown

make it work on WASM runtime

doin some testin

ok added some tests

try stuff

ok

try something

ok

try

try

try something

ok

getting there

getting there

maybe like this

adjustments

fix

something else

ok one more time

try more

finally

try something

ok

fix

try

ok we need the sleep

update config

try

maybe this will work

test

wasm works now

ok better logger now

fix zipkin missing http client

ok i can compile wasm now

fix

try
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