Skip to content
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

Add new command to open the query history directory #1179

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

aeisenberg
Copy link
Contributor

Allows users to explore the contents and all artifacts of the query
that was just run.

Fixes #1174 (comment)

cc: @tausbn

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@tausbn
Copy link

tausbn commented Mar 2, 2022

Does this work with Codespaces? As far as I can tell, it instructs the host OS to open the folder, and I'm not sure that works properly when the machine that has the directory is hosted in the cloud somewhere.

@aeisenberg
Copy link
Contributor Author

aeisenberg commented Mar 2, 2022

Good question. I have not tried this on codespaces. I'm not even sure what the expected behaviour should be. Probably the best result would be to disable the command if the file system is remote.

It looks like there is already a precedent for that with the Reveal in Finder command (and the equivalent in linux/windows) not being available in codespaces.

@aeisenberg aeisenberg force-pushed the aeisenberg/open-query-folder branch from cc8b7ae to 3754309 Compare March 2, 2022 21:33
@aeisenberg
Copy link
Contributor Author

Added this line and verified on codespaces that the option does not show:

https://github.com/github/vscode-codeql/pull/1179/files#diff-be4c5a31505df7de81fa4900e84e66c04d1a6bca9b3da50f8061d2cb2bfbbde1R707

@tausbn
Copy link

tausbn commented Mar 2, 2022

Added this line and verified on codespaces that the option does not show: [...]

In that case, I do not see how this PR "Fixes #1174 (comment)", as that comment pertains directly to the use of Codespaces.

@aeisenberg
Copy link
Contributor Author

Hmmm...right. At least now, a broken command won't be visible in codespaces. Also, this logs will stick around after restarts. All the data is stored in the workspace storage folder. You need to ensure that the workspace remains the same across restarts.

This command is quite useful in non-remote situations and is something I wanted to implement anyway.

I will take a look at a way to copy the path to the clipboard later.

@aeisenberg aeisenberg force-pushed the aeisenberg/log-history branch 2 times, most recently from b2b8625 to f28c1f9 Compare March 3, 2022 15:57
Allows users to explore the contents and all artifacts of the query
that was just run.
@aeisenberg aeisenberg force-pushed the aeisenberg/open-query-folder branch from 3754309 to 025a1a1 Compare March 3, 2022 15:58
@aeisenberg aeisenberg merged commit 4f04f9d into aeisenberg/log-history Mar 3, 2022
@aeisenberg aeisenberg deleted the aeisenberg/open-query-folder branch March 3, 2022 16:00
@aeisenberg
Copy link
Contributor Author

Query logs will be saved in subdirectories of /home/codespace/.vscode-remote/data/User/globalStorage/github.vscode-codeql/queries. One directory for each query in a file called query.log.

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