8000 Timeout during query compilation should produce failed query history item · Issue #250 · github/vscode-codeql · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Timeout during query compilation should produce failed query history item #250

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
henrymercer opened this issue Feb 26, 2020 · 4 comments · Fixed by #266 · 4 remaining pull requests
Closed

Timeout during query compilation should produce failed query history item #250

henrymercer opened this issue Feb 26, 2020 · 4 comments · Fixed by #266 · 4 remaining pull requests
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@henrymercer
Copy link
Contributor

Describe the bug
When query compilation times out, the message The request (id: 6, method: 'compilation/compileQuery') has been cancelled is added to the extension log, but a query history item corresponding to the timed out query is not added to the query history view.

To Reproduce

  1. Set codeQL.runningQueries.timeout to 1 second
  2. Run a long-running query e.g. a path problem query
  3. Focus the query history view
  4. Observe that the query history view doesn't contain an item corresponding to the timed-out compilation.

Expected behavior
The query history view should contain an item corresponding to the timed-out compilation with a failed icon and the status "timed out".

@henrymercer henrymercer added bug Something isn't working good first issue Good for newcomers labels Feb 26, 2020
@aeisenberg aeisenberg self-assigned this Mar 6, 2020
@aeisenberg
Copy link
Contributor

The behaviour you are describing isn't exactly what I'm seeing. The query does seem to be added to the query history page as an error. Though, the message is incorrect. I'm seeing something like:

cancelled after 0 seconds

It looks like the cli is incorrectly tagging the query as being cancelled instead of timedout.

@aeisenberg
Copy link
Contributor

Is it possible that the incorrect tag is because the timeout is on vscode's side, not the cli? And when the timeout is reached, vscode triggers the cancel in the cli?

@aeisenberg
Copy link
Contributor

Oddly though, when I actually try to cancel the query, the result comes out as QueryResultType.OTHER_ERROR. Seems like there's a bit of work to do regarding the query statuses.

@aeisenberg
Copy link
Contributor
aeisenberg commented Mar 6, 2020

Now, I'm able to reproduce the error described by @henrymercer. Looks like if I cancel during the compilation phase, I see the behaviour described above. If I cancel during the run phase, then I see the behaviour that I described,

aeisenberg added a commit to aeisenberg/vscode-codeql that referenced this issue Mar 6, 2020
This change converts a cancelled query into a synthetic query result
that is displayed in query history. 

Also includes some light refactoring.

Closes github#250.
aeisenberg added a commit to aeisenberg/vscode-codeql that referenced this issue Mar 6, 2020
This change converts a cancelled query into a synthetic query result
that is displayed in query history. 

Also includes some light refactoring.

Closes github#250.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
0