Commit Graph

55 Commits

Author SHA1 Message Date
Henry Mercer 88d8b86edd Check in compiled files 2025-08-21 13:47:19 +01:00
github-actions[bot] 44e03577b2 Rebuild 2024-12-03 18:39:38 +00:00
Henry Mercer dd7307d603 Refactoring: Simplify retrieving error message 2024-09-16 22:38:35 +02:00
Henry Mercer a52b209ec8 Enable direct tracing the autobuild build mode by default 2024-06-26 19:38:13 +01:00
Henry Mercer 5ac5c91bc1 End tracing early in autobuild Action for improved performance and reliability
This lets us achieve some performance and reliability improvements for
workflows that run autobuild directly without specifying a build mode.
2024-05-09 15:06:36 +01:00
Henry Mercer cbe29f55df Run autobuild script via direct tracing when feature enabled 2024-04-12 17:07:08 +01:00
Henry Mercer 3d49faaabb Use extraction via build mode in autobuild Action when available 2024-04-12 17:07:08 +01:00
Angela P Wen 7df281f2fe Gracefully continue if createStatusReportBase throws (#2225)
Previously, we weren't catching any possible exceptions in `createStatusReportBase` and runs would fail if any of the telemetry sub-items threw exceptions. As telemetry should not block the analysis, we continue here even if the status report throws.
2024-04-04 15:26:14 -07:00
Henry Mercer 2307ff547f Add languages and build_mode to init success status report 2024-02-29 12:18:19 +00:00
Henry Mercer c0917251d4 Refactoring: Convert ActionName to enum 2024-02-29 11:29:32 +00:00
Henry Mercer 60465730fb Add event name to status report 2024-02-26 19:36:37 +00:00
Henry Mercer 28b564f8c6 Add languages to the status report for all jobs 2024-02-26 19:03:28 +00:00
Josh Soref 5a6da1d85d Treat status reports as non-critical
Change `sendStatusReport` to `void`
2024-02-12 13:56:10 -05:00
Henry Mercer 8fb654e590 Don't run autobuild in analyze if already ran in autobuild 2024-02-07 13:19:29 +00:00
Henry Mercer 0fe34bd39a Extract language appropriately in analyze step when build mode specified 2024-02-07 13:19:29 +00:00
nickfyson f72cffc780 add v2 deprecation warning 2024-01-18 20:51:16 +00:00
Michael B. Gale df098abd11 Set DID_AUTOBUILD_GOLANG in runAutobuild 2023-10-04 19:45:08 +01:00
Henry Mercer 7dcb3e5276 Include runner disk info in status report 2023-08-07 16:27:56 +01:00
Henry Mercer c6d284324b Pull out a dedicated status report file 2023-08-07 16:13:59 +01:00
Henry Mercer 2637069a45 Resolve dependency cycles between actions-util and workflow 2023-07-19 17:21:33 +01:00
Henry Mercer 0bc4788cf7 Resolve dependency cycle between api-client and actions-util 2023-07-19 17:01:05 +01:00
Henry Mercer 3a960869ac Simplify definitions of environment variables 2023-07-06 17:28:37 +01:00
Henry Mercer e5c2f32a9f Consistently wrap errors 2023-04-06 17:04:21 +01:00
Angela P Wen 3cbd063679 Upload per-database diagnostic SARIFs on green and red runs (#1556)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-03-20 21:09:04 +00:00
Henry Mercer be8f7b01a2 Add types for package.json via @schemastore/package 2023-01-20 15:01:35 +00:00
Henry Mercer 1b508953b4 Remove checkActionVersion
This is no longer needed now that we only release v2
2023-01-20 15:01:35 +00:00
Henry Mercer 5f644f971e Upgrade TypeScript to 9.2.0 2023-01-18 20:59:57 +00:00
Henry Mercer 0dea34e91c Merge branch 'main' into henrymercer/delete-runner-part-2 2022-11-15 19:35:30 +00:00
Angela P Wen 5883c13406 Deprecate Go extraction reconciliation feature flag and CODEQL_EXTRACTOR_GO_BUILD_TRACING for custom builds (#1322)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-14 13:54:35 -08:00
Henry Mercer 9df773d1a3 Remove unneeded apiDetails input to getApiClient 2022-11-14 19:55:30 +00:00
Henry Mercer b498c79130 Remove concept of Actions / runner mode 2022-11-14 16:37:48 +00:00
Andrew Eisenberg 701cea34ba More renaming 2022-10-11 10:39:40 -07:00
Andrew Eisenberg b27aed78f5 Extract GitHubFeatureFlags to a separate class
Internal refactoring so that `GitHubFeatureFlags` is
private only. The public facing class is `Features`.
2022-10-06 18:00:40 -07:00
Henry Mercer 0d2fa3c636 Support autobuilding multiple languages in autobuild Action 2022-09-12 17:35:32 +01:00
Henry Mercer fc2f344141 Reuse getApiDetails code 2022-09-02 19:59:18 +01:00
Henry Mercer 4b5dea8eed Address review comments 2022-09-02 17:54:53 +01:00
Henry Mercer cf5d465980 Trace Go when Go extraction reconciliation is enabled 2022-09-01 14:42:59 +01:00
Angela P Wen 215c3cb4bb Autobuild Go in analyze step 2022-08-31 13:19:16 +01:00
Henry Mercer 0256599547 Prompt customers to upgrade from v1 to v2 2022-04-27 16:11:24 +01:00
Chuan-kai Lin b0c570ef83 autobuild: add working-directory input 2022-04-08 13:37:42 -07:00
Andrew Eisenberg 3d93bb2ac9 Add UserError
This commit adds a `UserError` class that should be thrown when the
cause of an error is fundamentally from user configuration.

When sending status reports, avoid sending a `failure` for `UserError`s.
This will prevent our diagnostics from pinging us for errors outside of
our control.
2022-02-17 11:47:31 -08:00
Andrew Eisenberg 40568daca8 Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause
is now `unknown` type. So, we need to cast the `e`, `err`, or `error`
variables to type `Error`.
2021-09-10 14:06:27 -07:00
Edoardo Pirovano d9849b8ca1 Rebuild after TypeScript version bump 2021-07-27 17:59:59 +01:00
Andrew Eisenberg f60ef170b0 Cleaning up comments around env vars
Also, move `getTemporaryDirectory` back to `actions-util`.
2021-06-03 11:33:20 -07:00
Andrew Eisenberg 3708898bf2 Add environment variables to signal feature and version to the CLI
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

https://github.com/github/codeql-coreql-team/issues/1124#issuecomment-852463521

This ensures the CLI knows the features and versions of the containing
actions/runner.

Additionally:

- Fix the user agent so that it more closely aligns with user agent
  spec
- Refactor environment variable initialization so that it all happens in
  one place and call.
- Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util
  and into util. actions-util is meant for utils only called by the
  action, not the runner.

The `prepareLocalRunEnvironment()` method is most likely deprecated and
should be removed. I originally added it because I had a way of working
where I would run the action from my local machine to test out changes,
but this was always a little flaky. So, I no longer use this way of
working. I will probably remove it soon.
2021-06-02 11:06:02 -07:00
Andrew Eisenberg 47588796b4 Send the version and mode with the user agent
This commit changes the way the action determines if running in action
or runner mode. There is now an environment variable that is set at the
beginning of the process and elsewhere in the process, we can check to
see if the variable is set.
2021-05-31 09:03:29 -07:00
Chris Gavin ed751ece83 Allow overriding path of temporary files. 2021-02-01 15:34:13 +00:00
Eric Cornelissen e6ea8cbae0 Run npm run build 2020-11-25 22:46:30 +01:00
Simon Engledew eb4226ede4 Scanning endpoint failures should not halt the scan 2020-11-19 15:49:46 +00:00
Robert Brignull 121fd331cd Introduce actions-util.ts 2020-09-15 14:01:21 +01:00