-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update session status to 'unhandled' and extend SessionStatus type #17849
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d4c29f4
fix(session): Update session status to 'unhandled' and extend Session…
JealousGx b2c5600
fix(tests): Update expected session status from 'crashed' to 'unhandl…
JealousGx 87f9ab7
fix(session): Extend requestSession status to include 'unhandled' and…
JealousGx 540fcf8
fix(session): Update requestSession status handling for exceptions
JealousGx 8ae61ed
fix(session): Combine 'crashed' and 'unhandled' counts in session agg…
JealousGx 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
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
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.
Potential bug: The new
'unhandled'
session status is not handled by all parts of the system, leading to data corruption in session aggregation and inconsistent status reporting.Description: The introduction of the
'unhandled'
session status is incomplete. The session aggregation logic inpackages/node-core/src/integrations/http/httpServerIntegration.ts
contains a hardcoded mapping of statuses that was not updated to include'unhandled'
. When a session with this new status is processed, the logic attempts to access a non-existent key, which results inbucket['undefined'] = NaN
. This corrupts the session aggregate data used for health monitoring. Additionally,packages/core/src/server-runtime-client.ts
was not updated and still sets the session status to'crashed'
for unhandled exceptions, creating an inconsistency with other parts of the client that now use'unhandled'
.Suggested fix: Update the session aggregation mapping in
httpServerIntegration.ts
to include the'unhandled'
status. Also, updateserver-runtime-client.ts
and any other remaining locations, including tests, to use the'unhandled'
status instead of'crashed'
for consistency.severity: 0.75, confidence: 0.98
Did we get this right? 👍 / 👎 to inform future reviews.
Uh oh!
There was an error while loading. Please reload this page.
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.
@Lms24 , we dont need to update the test cases in
httpServerIntegration.test.ts
file right? I noticedcrashed
represents unhandled cases, so, it would be pointless to handleunhandled
separately, if I got that right.