-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(nextjs): Revert #4139 - remove manipulation of res.finished
value
#4516
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
Merged
lobsterkatie
merged 2 commits into
master
from
kmclb-nextjs-remove-hack-marking-res-finished
Feb 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We can’t use the logger here?
Also why are we emitting a new line at the start?
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.
The logger only shows up if the user has
debug: true
in their config, whereas the warning our message references shows up regardless.As for the newline, in my testing the message was just kind of getting lost in all the logs, so I stuck some blank lines around it. Do you think it's an issue?
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.
I would prefer to remove the new lines to reduce the noise caused by sentry.
That’s primarily my worry here with the
console.warn
, that it will cause a lot of noise in the development environment (that can’t be turned off). With debug logging, it’s opt in from the user.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.
I can take the newlines out, but bottom line, this creates exactly as much noise as the warning we're causing. It's just that with this logging, it's now
rather than
As a user, I'd rather have that be effectively a two-line warning, including reassurance that I don't need to stress, rather than a one-line warning whose origin and importance I have to wonder about (unless I happen to have turned on debugging in Sentry, which the warning itself gives me no hint that I'd need to do).
The least noise, of course, would be if we weren't causing the warning in the first place, and that's what the original PR accomplished. But given that for the moment we're choosing annoying warning over potential breakage, I really do think it's better to at least let people know why it's there and that it's safe to ignore. Don't you?
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.
Yeah that’s good perspective
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.
Hello @AbhiPrasad @lobsterkatie, how are you? Is the potential fix being tracked in an issue? Combined with next/auth and swr for fetching the user profile it's triggering a massive amount of logs.
Thank you for your hard work 👍
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.
Hey, @Fedeorlandau thanks for reaching out. Could you please open an issue with your setup details? (SDK version, next version, next config), it'll help a ton for us to debug.