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

Middleware #435

Merged
merged 11 commits into from
Jan 16, 2024
Merged

Middleware #435

merged 11 commits into from
Jan 16, 2024

Conversation

maurafortino
Copy link
Contributor

@maurafortino maurafortino commented Jan 10, 2024

What's Included:

  • added otel and candlelight middleware for core endpoints
  • created a Handler Module
  • updated metrics in http.go from gokit to prometheus

Copy link

guardrails bot commented Jan 10, 2024

⚠️ We detected 2 security issues in this pull request:

Vulnerable Libraries (2)
Severity Details
N/A pkg:golang/github.com/satori/[email protected] upgrade to: 1.2.1-0.20181016170032-d91630c85102
N/A pkg:golang/github.com/xmidt-org/webpa-common/[email protected] - no patch available

More info on how to fix Vulnerable Libraries in Go.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

metrics.go Outdated Show resolved Hide resolved
Comment on lines +69 to +70
// TODO: should probably customize things a bit
mux.Use(recovery.Middleware(recovery.WithStatusCode(555)))
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a later todo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was copied and pasted over from old code - including the comment.

routes.go Show resolved Hide resolved
Copy link
Contributor

@denopink denopink left a comment

Choose a reason for hiding this comment

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

besides httpClient_test.go and http_test.go being completely commented out (assuming we're gonna those back in the near future or in this pr), lgtm

Co-authored-by: Owen Cabalceta <[email protected]>
@maurafortino
Copy link
Contributor Author

maurafortino commented Jan 16, 2024

besides httpClient_test.go and http_test.go being completely commented out (assuming we're gonna those back in the near future or in this pr), lgtm

yeah had to comment out the test files because they were using functions that were also being commented out due to ancla/argus issue. will comment back in once we get that fixed. @denopink

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 52 lines in your changes are missing coverage. Please review.

Comparison is base (28b0b22) 31.09% compared to head (132c6c5) 19.86%.
Report is 4 commits behind head on denopink/feat/rewrite.

❗ Current head 132c6c5 differs from pull request most recent head 0d1e678. Consider uploading reports for the commit 0d1e678 to get more accurate results

Files Patch % Lines
http.go 0.00% 37 Missing ⚠️
routes.go 0.00% 15 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           denopink/feat/rewrite     #435       +/-   ##
==========================================================
- Coverage                  31.09%   19.86%   -11.24%     
==========================================================
  Files                         12       12               
  Lines                       1103     1148       +45     
==========================================================
- Hits                         343      228      -115     
- Misses                       745      908      +163     
+ Partials                      15       12        -3     
Flag Coverage Δ
unittests 19.86% <8.77%> (-11.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maurafortino maurafortino merged commit afade6d into denopink/feat/rewrite Jan 16, 2024
13 of 14 checks passed
@maurafortino maurafortino deleted the middleware branch January 16, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants