Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log commands manually before executing them #1833

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Aug 10, 2023

This PR fixes a bad interaction between #1795 and #1811 which we didn't pick up since the problem only appears when looking at the combination of these two PRs.

In #1811, to make sure we only print the analysis summary once, we invoked the tool runner with silent: true to capture CodeQL's stdout without logging it. We then had our stdout listener forward CodeQL's stdout to the Action's stdout. However we missed another implication of setting silent: true: this disables the log line which prints the command being invoked. This is because we only started running most of our CodeQL invocations through the tool runner in #1795.

With the combination of these two PRs, we stop logging most CodeQL invocations, which reduces the utility of the logs.

This PR starts printing the commands manually to make sure we log them in all cases, including ones where we want to capture the stdout.

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.

@henrymercer henrymercer force-pushed the henrymercer/print-commands branch from 468d9c2 to 25a4246 Compare August 10, 2023 14:36
@henrymercer henrymercer marked this pull request as ready for review August 10, 2023 14:43
@henrymercer henrymercer requested a review from a team as a code owner August 10, 2023 14:43
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Agh.. nice catch.

@henrymercer henrymercer enabled auto-merge August 10, 2023 15:01
@henrymercer henrymercer merged commit 2ec74e3 into main Aug 10, 2023
@henrymercer henrymercer deleted the henrymercer/print-commands branch August 10, 2023 15:26
@github-actions github-actions bot mentioned this pull request Aug 14, 2023
6 tasks
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