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
[v2] Add skip interceptor #364
Conversation
cfb8ee6
to
18d498d
Compare
Codecov Report
@@ Coverage Diff @@
## v2 #364 +/- ##
==========================================
- Coverage 83.58% 75.90% -7.69%
==========================================
Files 30 31 +1
Lines 932 776 -156
==========================================
- Hits 779 589 -190
- Misses 114 139 +25
- Partials 39 48 +9
Continue to review full report at Codecov.
|
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.
Nice, I like it, but curious why denylist was chosen instead of allowlist approach? 🤔
To me allowlist approach might be more comprehensive. E.g If you want to use logging middleware only on service X. I will add SKIP -> Logging, filter service != x
Doable but quite big inversion (:
I think we could consider this, at the end it's flexible enough anyway, just curious what is easier to use.
Skip might be nice for auth aspect, so by default you deny from auth etc.. Maybe does not matter that much 🤗
LGTM, overall 💪
I agree with that. At the first design, |
@johanbrandhorst Shall we merge it? |
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, but could we add this new interceptor to the README too please? Sorry for the delayed review.
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
0f6ed9b
to
6695dad
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@johanbrandhorst It seems like the CLA bot is not working. |
I think @bwplotka might need to consent too. |
@bwplotka Shall we? |
Yeah, seems like @bwplotka also needs to consent 😛 |
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.
Sorry for lag, if you think it makes sense I am happy as well. LGTM!
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All is good to me, so merging. |
Resolve #363
It's hard to transfer a
interceptors.UnaryServerInterceptor
intointerceptors.Reporter
, so I use the old way to implement this feature.