Skip to content

feat: dump interceptor#3118

Merged
mcollina merged 34 commits into
mainfrom
feat/dump_interceptor
May 15, 2024
Merged

feat: dump interceptor#3118
mcollina merged 34 commits into
mainfrom
feat/dump_interceptor

Conversation

@metcoder95

@metcoder95 metcoder95 commented Apr 14, 2024

Copy link
Copy Markdown
Member

This relates to...

Rationale

Relates to #2835

Changes

  • feat: add dump interceptor
  • fix(types): interceptor definitions

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@metcoder95
metcoder95 requested a review from ronag April 14, 2024 13:53
Comment thread lib/interceptor/dump.js Outdated
return true
}

// TODO: shall we forward the rest of the data to the handler or better to abort?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggestions? I might be had it wrong here 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you must keep the data flowing from the request or error/abort it. The latter will destroy the connection. It should be a user choice, but I would error/abort the socket by default.

@ronag ronag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should the dump interceptor should also dump on abort?

Comment thread lib/interceptor/dump.js Outdated
Comment thread docs/docs/api/Dispatcher.md Outdated
Comment thread lib/interceptor/dump.js Outdated
Comment thread docs/docs/api/Dispatcher.md Outdated
@metcoder95

Copy link
Copy Markdown
Member Author

Should the dump interceptor should also dump on abort?

Do you mean to not directly abort the connection, but rather let it flow? Or how so?

@codecov-commenter

codecov-commenter commented Apr 16, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.29851% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 94.15%. Comparing base (8c3d42a) to head (4492ab7).

Files Patch % Lines
lib/interceptor/dump.js 90.15% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3118      +/-   ##
==========================================
- Coverage   94.17%   94.15%   -0.03%     
==========================================
  Files          90       91       +1     
  Lines       24559    24692     +133     
==========================================
+ Hits        23128    23248     +120     
- Misses       1431     1444      +13     

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

Comment thread docs/docs/api/Dispatcher.md
Comment thread lib/interceptor/dump.js Outdated
return true
}

// TODO: shall we forward the rest of the data to the handler or better to abort?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you must keep the data flowing from the request or error/abort it. The latter will destroy the connection. It should be a user choice, but I would error/abort the socket by default.

@metcoder95
metcoder95 requested a review from ronag April 17, 2024 10:37
@metcoder95 metcoder95 mentioned this pull request Apr 19, 2024
13 tasks
@mcollina

Copy link
Copy Markdown
Member

@ronag ptal

@ronag ronag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have more opinions. Will try to have a better look as soon as I can.

Comment thread lib/interceptor/dump.js Outdated
Comment thread lib/interceptor/dump.js Outdated
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Comment thread lib/interceptor/dump.js Outdated
Comment thread lib/interceptor/dump.js Outdated
Comment thread lib/interceptor/dump.js Outdated
Comment thread lib/interceptor/dump.js Outdated
Comment thread lib/interceptor/dump.js Outdated

@ronag ronag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would remove waitForTrailers. Just makes things complicated for an edge case.

@Uzlopak
Uzlopak deleted the feat/dump_interceptor branch June 16, 2024 20:16
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.

interceptors does not have any exported type

5 participants