Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
Andrew Eisenberg 31b445c8d2 Remove logic to only create release artifacts on PRs
Create them for appropriately named tags and workflow dispatch as well.
2021-01-29 15:21:12 -08:00
Andrew Eisenberg 292e695646 Add telemetry for commands
This commit adds telemetry capturing for command execution. The data
captured explicitly captured and sent to application insights is only
the command id, execution time, and command completion status. We also
capture errors thrown by any command execution, but these are not sent
to application insights.

Telemetry capturing is opt-in. No data will be sent to application
insights unless the user explicitly allows it.

There are two new config settings added. The first controls whether or
not telemetry should be sent. This setting AND the global telemetry setting
must be enabled in order for telemetry to be sent.

The second setting controls whether or not telemetry event data should
be logged to the extension console. The hope here is that users can
inspect exactly what data is sent to the server and can have confidence
that nothing concerning is being leaked.

Note that the global setting for disabling telemetry collection is
handled inside the  `vscode-extension-telemetry` package implicitly, so
this extension doesn't touch that setting explicitly.

The `codeql.canary` setting is being used to add an additional flag to
telemetry events. This flag will help us determine if a user in internal
or not.

The application insights key is injected at build time through a
repository secret.

This commit also includes a new `TELEMETRY.md` file that explains what
is being captured, and why.
2021-01-29 15:21:12 -08:00
Andrew Eisenberg 07eb334e6c Ensure databases are re-registered when query server restarts
This commit fixes #733. It does it by ensuring that the query server
emits an event when it restarts the query server. The database manager
listens for this even and properly re-registers its databases.

A few caveats though:

1. Convert query restarts to using a command that includes progress.
   This will ensure that errors on restart are logged properly.
2. Because we want to log errors, we cannot use the vscode standard
   EventEmitters. They run in the next tick and therefore any errors
   will not be associated with this command execution.
3. Update the default cli version to run integration tests against to
   2.4.2.
4. Add a new integration test that fails if databases are not
   re-registered.
2021-01-29 11:24:07 -08:00
Andrew Eisenberg cace4acb1e Update internal docs for publishing
And remove unused file.
2021-01-11 13:38:21 -08:00
Andrew Eisenberg 696c16b5b4 Add workflow jobs to deploy extension
This adds two new jobs to the `Release` workflow. These
jobs are blocked behind an environment. When approved
by a committer, the extension will be deployed to
Open VSX and VS Code marketplace.

Also, update contributing docs for open-vsx publishing.
2021-01-11 13:38:21 -08:00
Andrew Eisenberg 5ad433775b Move query.test.ts to the cli integration tests
* Now query.test.ts runs on multiple cli versions
* Removed most `dispose` calls in cli tests because each test shares the
  same instance of the extension and all of its properties. So, we
  shouldn't be disposing until the last test completes. It's likely that
  we will need to be more careful about cleaning up state between test
  runs, but we haven't hit that yet and this can happen in a later
  commit.
2020-12-14 12:36:46 -08:00
Andrew Eisenberg 69ca0f55ba Re-enable the queries cli test
* Requires that QL_PATH environment variable is set and points to a
  checkout of github/codeql
* Adds the `quiet` flag to the cli. When set, this flag will prevent
  some modal dialogs from disrupting the flow. Currently, we only ensure
  that the upgrades dialog is avoided.
* Update the main.yml workflow to checkout the codeql repo
2020-12-14 12:36:46 -08:00
Andrew Eisenberg 370dbcbfae Update integration test version numbers
Also, fix a typo and remove comment.
2020-12-04 10:08:15 -08:00
Andrew Eisenberg 16eac45822 Add integration tests with the CLI
This commit adds integration tests that run commands using the CLI. This
change introduces a number of enhancements in order to get there.

1. Augments the index-template.ts file so that it downloads an
appropriate cli version if requested.
2. Adds the ensureCli.ts that performs the download if a a suitable
version is not already installed. See the comments in the file for how
this is done.
3. Changes how run-integration-tests is done so that the directories
run are specified through a cli argument.
4. Updates the main.yml workflow so that it also runs the
cli-integration tests.
5. Takes advantage of the return value of the call to `activate` on the
extension. This allows the integration tests to have access to internal
variables of the extension like the context, cli, and query server.
6. And of course, adds a handful of simple tests that ensure we have a
cli installed of the correct version.
2020-12-04 10:08:15 -08:00
Andrew Eisenberg da9576fee0 Add workflow_dispatch to release workflow 2020-11-23 17:56:36 -08:00
Andrew Eisenberg 5133ee713f Add the assert-pure query
This query ensures that all of our files marked as "pure" remain that
way. In this case "pure" means that it does not depend on vscode and
can therefore be run in tests outside of a runtime environment.

This commit also explicitly moves all of our "pure" files to the
`src/pure` directory.
2020-11-02 18:40:45 -08:00
Andrew Eisenberg ec98a577a2 Bump version of create-pull-request action
New version will avoid deprecation warnings for add-path
and set-var.
2020-10-22 14:17:53 -07:00
Andrew Eisenberg 542bb85490 Avoid running workflows on all push events
Only run on push events to main. This ensures that our main branch
is always passing.
2020-10-20 12:48:46 -07:00
Aditya Sharad 5d63431b8c
Actions: Pin version of upload-artifact action (#549) 2020-09-08 16:25:18 -07:00
Andrew Eisenberg ef84d8d362 Update changelog after release
Add a simple perl script that will augment the CHANGELOG with
an [UNRELEASED] section when creating the PR after a release.
2020-08-12 11:33:18 -07:00
Shati Patel 73fc37d370
Update pull_request_template.md
The team has been renamed 🙂
2020-07-31 20:27:28 +01:00
Aditya Sharad 32d4deb575
Update label-issue.yml 2020-07-31 08:57:33 -07:00
Aditya Sharad d2409054e2
Actions: Autolabel issues when opened 2020-07-30 16:59:07 -07:00
Andrew Eisenberg 9052851f9a Run CodeQL Action on PRs 2020-07-23 10:25:16 -07:00
Jason Reed 9ad0bf6f43 Call into package.json scripts from actions workflow 2020-07-21 12:20:17 -04:00
Jason Reed d2138907b9 Fix test section of workflow file 2020-07-16 08:51:35 -04:00
Jason Reed 19a76dcbee Update action to not depend on rush 2020-07-16 08:43:07 -04:00
Jason Reed 963ff9f458 Change references to master branch to main branch
I have already pushed `main` upstream pointing at the same commit as
master, so this PR should be safe to merge. To the best of my
knowledge all that's necessary after that is to change the
default branch
in https://github.com/github/vscode-codeql/settings/branches.
2020-06-16 14:00:02 -04:00
Andrew Eisenberg e2771a8922 Remove code scanning on pull request 2020-05-28 11:53:41 -07:00
Andrew Eisenberg 7bf719f632 Introduce codeql code scanning action 2020-05-26 14:00:28 -07:00
Dave Bartolomeo 3e7084f65d Remove `build` directory 2020-05-19 17:13:30 -04:00
Dave Bartolomeo 18bb4b0231 Avoid need for `build` directory 2020-05-19 17:03:56 -04:00
Shati Patel 3eca4f6734
Update link in PR template 2020-04-20 23:22:25 +01:00
Jason Reed ba3381fbf9 Fix codeql.cmd overwriting codeql.exe in CI 2020-04-07 10:06:29 -04:00
Andrew Eisenberg 130d3c09e3 build: Enable linting in the build 2020-03-25 12:02:12 -07:00
Nick Rolfe f25c9fd6fd Use codeql.exe instead of codeql.cmd on Windows 2020-03-19 08:11:20 -07:00
Aditya Sharad 2c4cf1bab3
Merge pull request #254 from jcreedcmu/jcreed/fix-actions
Fix version bump PR creation during release workflow
2020-02-27 11:18:47 -08:00
Jason Reed ef0623c605 Switch to master branch just before version bump PR creation 2020-02-24 09:07:43 -05:00
Jason Reed 7429af3e27 Fix create pull request step
- Bump create-pull-request version
- Actually checkout master branch
2020-02-21 09:10:12 -05:00
Jason Reed 88033c12f1 Use actions/checkout@v2 2020-02-21 08:30:09 -05:00
Jason Reed 54fc90a673 Trim prefix from git ref name during release 2020-02-14 07:27:46 -05:00
Henry Mercer 0b3fc98a61 Add docs cc step to pull request checklist 2020-02-12 12:06:25 +00:00
Jason Reed 64b1a7c1d9 Revert "Exclude documentation from CI workflow"
This reverts commit c95ac8e6ea.
2020-02-12 06:46:11 -05:00
Jason Reed c95ac8e6ea Exclude documentation from CI workflow 2020-02-10 10:10:10 -05:00
Henry Mercer d6b7889694
Merge pull request #226 from github/alexet-templates
Add issue templates
2020-02-04 19:27:23 +00:00
Alexander Eyers-Taylor b1530c74f3 Fix templates 2020-02-04 19:16:42 +00:00
Alexander Eyers-Taylor 4a72ecb29a Update issue templates with suggestions 2020-02-04 19:13:50 +00:00
Alexander Eyers-Taylor 89595921ff
Update .github/ISSUE_TEMPLATE/new-extension-release.md
Co-Authored-By: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2020-02-04 19:08:28 +00:00
Alexander Eyers-Taylor 75e069cf12 Add issue templates 2020-02-04 19:01:56 +00:00
Henry Mercer f6bcc10cd8 Add pull request template to remind us to update the changelog 2020-02-04 18:56:33 +00:00
Jason Reed 20c312e3c5 Pin nodejs version during Actions build.
This solves the problem of whatever node/npm ubuntu-latest happens to
have in /usr/local/bin/{node,npm} producing `Error: Cannot find module
'semver'` errors when it is misconfigured in the image.

(cf. https://askubuntu.com/questions/1152570/npm-cant-find-module-semver-error-in-ubuntu-19-04)
2020-01-28 11:02:48 -05:00
Henry Mercer 455626cb83 Release action: Fetch master branch in checkout 2020-01-21 17:49:18 +00:00
Henry Mercer 1ad2ed8958 Install CodeQL on Actions
This allows us to run tests requiring CodeQL on Actions.
2019-12-20 17:16:03 +00:00
Henry Mercer fa99f13846 Base the version bump PR on master 2019-12-13 16:39:53 +00:00
Aditya Sharad 1efce610f2 Actions: Open a PR after each release to bump the patch version. 2019-12-03 15:05:15 -08:00