Skip to content

Conversation

@rjrjr
Copy link
Collaborator

@rjrjr rjrjr commented May 5, 2025

Normally crash reporters group errors by hashing against the elements of the top stack frame. This causes problems for bottleneck code that is enforcing invariants that should be implemented by client code: we wind up with "kitchen sink" groups that hold every crash of a particular type, rather than distinct groups for each specific way that mistake is made.

We fix this for a few spots in RenderContext by inserting a fake top stack frame based on some hashable key provided by client code -- the child workflow, the "key" param for runningSideEffect, etc.

So far this is a JVM-specific hack.

@rjrjr rjrjr changed the title Better BugSnag error grouping from RenderContext assertions Better crash reporter error grouping from RenderContext assertions May 5, 2025
@rjrjr rjrjr force-pushed the ray/throwables branch from 3bf694f to 78c6464 Compare May 5, 2025 20:01
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract

internal tailrec fun Throwable.unwrapCancellationCause(): Throwable? {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was unused.

@rjrjr rjrjr marked this pull request as ready for review May 5, 2025 20:05
@rjrjr rjrjr requested review from a team and zach-klippenstein as code owners May 5, 2025 20:05
Normally crash reporters group errors by hashing against the elements of the top stack frame. This causes problems for bottleneck code that is enforcing invariants that should be implemented by client code: we wind up with "kitchen sink" groups that hold every crash of a particular type, rather than distinct groups for each specific way that mistake is made.

We fix this for a few spots in `RenderContext` by inserting a fake top stack frame based on some hashable key provided by client code -- the child workflow, the "key" param for runningSideEffect, etc.

So far this is a JVM-specific hack.
@rjrjr rjrjr force-pushed the ray/throwables branch from 78c6464 to 77f10bc Compare May 5, 2025 20:11
@rjrjr rjrjr enabled auto-merge May 5, 2025 21:06
@rjrjr rjrjr merged commit b8e6bf0 into main May 5, 2025
43 checks passed
@rjrjr rjrjr deleted the ray/throwables branch May 5, 2025 21:13
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.

3 participants