-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Discovery cancellation #24713
base: main
Are you sure you want to change the base?
Discovery cancellation #24713
Conversation
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- src/client/testing/testController/workspaceTestAdapter.ts: Evaluated as low risk
- src/client/testing/testController/pytest/pytestExecutionAdapter.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/client/testing/testController/pytest/pytestDiscoveryAdapter.ts:130
- Redundant cancellation handling. The
token?.onCancellationRequested
callback is defined twice, once forproc
and once forresultProc
. This can be simplified to avoid confusion.
token?.onCancellationRequested(() => {
Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more
token?.onCancellationRequested(() => { | ||
traceInfo(`Test discovery cancelled.`); | ||
cSource.cancel(); | ||
deferredReturn.resolve({ cwd: uri.fsPath, status: 'success' }); |
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 status message should indicate that the operation was canceled, not 'success'. Consider using a status like 'canceled'.
deferredReturn.resolve({ cwd: uri.fsPath, status: 'success' }); | |
deferredReturn.resolve({ cwd: uri.fsPath, status: 'canceled' }); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
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.
so the actual return value isn't really used at all in production code- currently it is just awaited on the workspaceTestAdapter. Should I just made it an empty promise and remove this whole "status" concept @karthiknadig
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.
That might make it more readable. So, make it a empty promise, now that old code is all removed.
This PR originates from a fork. If the changes appear safe, you can trigger the pipeline by commenting |
fixes #24602