Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
🟡 Changes recommended
RecordingLogger formats array messages differently in its recorded and console outputs.
1 open finding
What changed in this PR
Removes the test-only getRunnerLogger, standardizing tests on RecordingLogger.
Changes:
- Adds array-message normalization to the logging interface.
- Moves
getCodeQLForTestinginto testing utilities. - Updates affected tests and helpers to use
RecordingLogger.
| File | Description |
|---|---|
lib/entry-points.js |
Excluded generated file; contents unavailable for review. |
src/logging.ts |
Removes getRunnerLogger and supports array messages. |
src/logging.test.ts |
Tests message normalization. |
src/testing-utils.ts |
Extends RecordingLogger and adds the CodeQL test helper. |
src/codeql.ts |
Exposes the underlying CodeQL factory and removes its test helper. |
src/codeql.test.ts |
Uses relocated test utilities. |
src/workflow.test.ts |
Uses relocated CodeQL test helper. |
src/tracer-config.test.ts |
Uses relocated CodeQL test helper. |
src/init-action-post-helper.test.ts |
Uses new test logger and CodeQL helper. |
src/feature-flags/testing-util.ts |
Defaults feature tests to RecordingLogger. |
src/actions-util.test.ts |
Replaces runner logger. |
src/analyses.test.ts |
Replaces runner logger. |
src/analyze.test.ts |
Replaces runner logger. |
src/artifact-scanner.test.ts |
Replaces runner logger. |
src/cli/output-cache.test.ts |
Replaces runner logger. |
src/config-utils.test.ts |
Replaces runner logger. |
src/config/db-config.test.ts |
Replaces runner logger. |
src/diff-informed-analysis-utils.test.ts |
Replaces runner logger. |
src/feature-flags/properties.test.ts |
Replaces runner logger. |
src/fingerprints.test.ts |
Replaces runner logger. |
src/overlay/caching.test.ts |
Replaces runner logger. |
src/overlay/index.test.ts |
Replaces runner logger. |
src/setup-codeql.test.ts |
Replaces runner logger. |
src/start-proxy.test.ts |
Replaces runner logger. |
src/status-report.test.ts |
Replaces runner logger. |
src/tar.test.ts |
Replaces runner logger. |
src/tools-download.test.ts |
Replaces runner logger. |
src/trap-caching.test.ts |
Replaces runner logger. |
src/upload-lib.test.ts |
Replaces runner logger. |
src/upload-sarif.test.ts |
Replaces runner logger. |
src/util.test.ts |
Replaces runner logger. |
Files excluded by content exclusion policy (1)
- lib/entry-points.js
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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
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.

Follow-up to #4198 (comment), which cherry-picks the commit with the
Loggerimprovement and addresses thegetRunnerLoggerpoint.The
getRunnerLoggerfunction is only used in tests where it is largely superseded bygetRecordingLogger/ theRecordingLoggerclass. TheLoggerreturned bygetRunnerLoggeroutputs log messages tostdout. InsetupTests, we install test hooks which ensure that allstdout/stderroutput is captured and printed if a test fails.The recording logger is able to both record log messages and output them to
stdout. The former is useful for assertions while the latter mirrors the behaviour ofgetRecordingLogger. WhileRecordingLoggeralways usesconsole.debugto output tostdout, this doesn't matter because we capture the output with the hooks installed bysetupTests. The debug-level filter ofgetRunnerLoggerwas only used by one file and not practically useful -- the tests still pass and the increased output isn't an issue if tests fail. This PR replacesgetRunnerLoggerwithnew RecordingLogger.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
N/A
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist