GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

Conversation

@mbg

@mbg mbg commented Apr 11, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mbg
Produce a clearer error message when file is not installed
8ea1a11
@mbg mbg self-assigned this Apr 11, 2024
@mbg
mbg force-pushed the mbg/clearer-file-command-failure branch from 9f15e90 to cc356e1 Compare April 11, 2024 13:19
mbg added 4 commits April 11, 2024 17:20
@mbg
Emit diagnostic if file is not installed
1829b70
@mbg
Add integration test for new diagnostic
96f44cb
@mbg
Check that the database exists before writing diagnostics to it
d4e7b0e
@mbg
Store diagnostics in memory until the database is available
4b0172d
@mbg
mbg force-pushed the mbg/clearer-file-command-failure branch from 944c14e to 4b0172d Compare April 11, 2024 16:21
@mbg
mbg marked this pull request as ready for review April 11, 2024 16:21
@mbg
mbg requested a review from a team as a code owner April 11, 2024 16:21
henrymercer
henrymercer reviewed Apr 11, 2024
View reviewed changes
Comment thread src/actions-util.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/diagnostics.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/init-action.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

mbg added 4 commits April 12, 2024 13:22
@mbg
Unify error messages in getFileType
3901d12
@mbg
Unconditionally report unwritten diagnostics at the end of the init…
1ac88f3
… Action
@mbg
Include "Linux" in diagnostic name and message
93f93fc
@mbg
Downgrade log levels for some messages to debug
efc4746
henrymercer
henrymercer previously approved these changes Apr 12, 2024
View reviewed changes

@henrymercer henrymercer left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mbg
Add changelog entry
4fcf7a2
@mbg
mbg dismissed henrymercer’s stale review via 4fcf7a2 April 12, 2024 20:43
@mbg

mbg commented Apr 12, 2024

Copy link
Copy Markdown
Member Author

Added a changelog entry

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg enabled auto-merge April 12, 2024 20:43
@mbg
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

henrymercer
henrymercer approved these changes Apr 15, 2024
View reviewed changes
@mbg
mbg merged commit 2b2cee5 into main Apr 15, 2024
@mbg
mbg deleted the mbg/clearer-file-command-failure branch April 15, 2024 09:30
This was referenced Apr 15, 2024
Merge main into releases/v3 #2238
Merged
Merge releases/v3 into releases/v2 #2240
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@henrymercer henrymercer henrymercer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mbg mbg

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mbg @henrymercer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.