-
Notifications
You must be signed in to change notification settings - Fork 18
The Great Refactor #82
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
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
==========================================
+ Coverage 77.61% 87.24% +9.62%
==========================================
Files 20 18 -2
Lines 983 894 -89
==========================================
+ Hits 763 780 +17
+ Misses 207 98 -109
- Partials 13 16 +3 ☔ View full report in Codecov by Sentry. |
Edit: on second thought, let's use this opportunity to improve our code coverage. |
d3546c7
to
221b528
Compare
@@ -0,0 +1,53 @@ | |||
// Copyright 2025 SeatGeek, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk how this works, but some files have 2024 and some have 2025. I guess you just keep the year it was last touched in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting, I'll take a closer look at that in a follow-up PR
return func(writer http.ResponseWriter, request *http.Request) { | ||
slog.Debug("handling incoming webhook", "handler", s.Key(), "path", request.URL.Path) | ||
slog.Debug("handling incoming webhook", "parser", parserKey, "path", request.URL.Path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should add these as attributes so they can be reused in the logger scoped to this func?
logger := slog.With(
slog.String("parser", parserKey),
slog.String("path", request.URL.Path),
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I'll revisit this in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great test coverage. I just have one nit, but still approved
Refactoring away some of the complexity and rough edges. At a high level:
pkg/common
andpkg/handler
withpkg/event
andpkg/validation