FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fail more clearly if the `file` program is not installed on the runner by mbg · Pull Request #2234 · github/codeql-action · GitHub

Fail more clearly if the file program is not installed on the runner - #2234

Merged
mbg merged 10 commits into
mainfrom
mbg/clearer-file-command-failure
Apr 15, 2024
Merged

mbg merged 10 commits into
mainfrom
mbg/clearer-file-command-failure

Conversation

mbg commented Apr 11, 2024
edited
Loading

Copy link
Copy Markdown
Member

This PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be found. There is also a new integration test which checks that this works as intended.

Since the check for whether the Go workaround is needed takes place before the database gets initialised, this PR also modifies the code for diagnostics to:

  • Check if the database exists yet before writing a diagnostic.
  • If it does not exist, the diagnostic is added to an array and flushed to disk later once the database is presumed to exist (init Action only)

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

mbg self-assigned this Apr 11, 2024
mbg force-pushed the mbg/clearer-file-command-failure branch from 9f15e90 to cc356e1 Compare April 11, 2024 13:19
mbg force-pushed the mbg/clearer-file-command-failure branch from 944c14e to 4b0172d Compare April 11, 2024 16:21
mbg marked this pull request as ready for review April 11, 2024 16:21
mbg requested a review from a team as a code owner April 11, 2024 16:21
Comment thread src/actions-util.ts Outdated
Comment thread src/diagnostics.ts
Comment thread src/init-action.ts Outdated
henrymercer previously approved these changes Apr 12, 2024

henrymercer left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Very nice, I expect the functionality for writing diagnostics before the database has been initialized will come in handy elsewhere too.

You might want to consider adding a changelog note, otherwise LGTM!

mbg commented Apr 12, 2024

Copy link
Copy Markdown
Member Author

Added a changelog entry

mbg enabled auto-merge April 12, 2024 20:43
mbg requested a review from henrymercer April 12, 2024 20:43
auto-merge was automatically disabled April 12, 2024 20:46

Pull Request is not mergeable

mbg merged commit 2b2cee5 into main Apr 15, 2024
mbg deleted the mbg/clearer-file-command-failure branch April 15, 2024 09:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL