-
Notifications
You must be signed in to change notification settings - Fork 13
Ignore tsserver results when both results have identical request IDs and command names #98
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
Conversation
…and command names
I think we're trying to drive the "known" number down to 0 - so until then, we should continue reporting. |
This seems like the right behavior for PRs, though. Implementation-wise, I don’t know this codebase at all, but it’s not clear to me why command name and request id would be enough to say that two outputs are the same? |
Oh, this object only exists if it’s a failure, so the assumption is that if each failed, they’re equal-ish. |
Sure, but right now, it's spamming PRs with huge amounts of comments and text that have nothing to do with the PRs, and we don't do this at all for tsc, regardless of if it's a PR. I think we need to do something.
It's not, really; I'm struggling to come up with a good mechanism because I can't just stringly-compare the messages. I would need to sanitize them for file/line, at least, but we'd still be sensitive to function name changes too. I'll see if there's a specific option that's set on PRs, though. |
I agree with that - the only exception being cases where your PR is supposed to fix these issues. |
If we get rid of the errors, then the existing code here doesn't report anything either! I noticed that too. I can try and fix that here.
|
Okay, I've changed it such that now:
|
Co-authored-by: Daniel Rosenwasser <[email protected]>
@@ -233,7 +235,6 @@ async function getTsServerRepoResult( | |||
} | |||
|
|||
console.log("No issues found"); | |||
return { status: "Detected no interesting changes" }; |
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.
Ugh, this was wrong because fallthrough! Will fix.
While the tsc reporter will compare errors and hide when there's a diff, the tsserver reporter instead always reports if the current PR fails, including both traces.
It seems like all of our current spurious outputs (microsoft/TypeScript#52809 (comment)) are cases where the errors have identical IDs and command names.
This PR makes it so that if they are identical, we ignore the problem.