Skip to content

Conversation

charisk
Copy link
Contributor

@charisk charisk commented Jan 20, 2022

Adds logic to download analyses results, do some minimal processing and make them available to the web view.

Note that this solution doesn't work well with running multiple queries but I'm hoping to address that once we have some notion of query history.

Also it does not support bqrs files as there is some Product/UX work that needs to happen.

Checklist

N/A:

  • 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.

@charisk charisk requested a review from a team as a code owner January 20, 2022 10:05
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Looks good. I haven't tried running this yet. I have a handful of suggestions and a few things we will want to think about in the future.

Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Looks good. A small suggestion about updating an error message. I'm not entirely happy with what I have, but we should be using the terms alert and path queries instead of problem or problem-path.

See https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/#overview

After this change, I think it will be good.

@charisk charisk merged commit 1216fce into main Jan 25, 2022
@charisk charisk deleted the charisk/download-analyses-results branch January 25, 2022 08:28
aeisenberg added a commit that referenced this pull request Feb 22, 2022
Remote query items will be stored in query history and will remain
available across restarts.

When the extension is restarted, any `InProgress` remote queries will
be monitored until they complete.

When clicked on, a remote query is opened and its results can be
downloaded. The query text and the query file can be opened from the
history menu. A remote query can be deleted as well, which will purge
all results from global storage.

Limitations:

1. Labels are not editable
2. Running multiple queries that each run on the same repository
   will have conflicting results and there will be errors when trying
   to view the results of the second query. This limitation is not new,
   but it is easier to hit now. See #1089.

Both of these limitations will be addressed in future PRs.
aeisenberg added a commit that referenced this pull request Feb 22, 2022
Remote query items will be stored in query history and will remain
available across restarts.

When the extension is restarted, any `InProgress` remote queries will
be monitored until they complete.

When clicked on, a remote query is opened and its results can be
downloaded. The query text and the query file can be opened from the
history menu. A remote query can be deleted as well, which will purge
all results from global storage.

Limitations:

1. Labels are not editable
2. Running multiple queries that each run on the same repository
   will have conflicting results and there will be errors when trying
   to view the results of the second query. This limitation is not new,
   but it is easier to hit now. See #1089.

Both of these limitations will be addressed in future PRs.
aeisenberg added a commit that referenced this pull request Feb 22, 2022
Remote query items will be stored in query history and will remain
available across restarts.

When the extension is restarted, any `InProgress` remote queries will
be monitored until they complete.

When clicked on, a remote query is opened and its results can be
downloaded. The query text and the query file can be opened from the
history menu. A remote query can be deleted as well, which will purge
all results from global storage.

Limitations:

1. Labels are not editable
2. Running multiple queries that each run on the same repository
   will have conflicting results and there will be errors when trying
   to view the results of the second query. This limitation is not new,
   but it is easier to hit now. See #1089.

Both of these limitations will be addressed in future PRs.
aeisenberg added a commit that referenced this pull request Feb 22, 2022
Removes the limitation specified in #1089 where analyses for the same
repo and different queries will overwrite each other.
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.

2 participants