| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Warning
RecordingLogger formats array messages differently in its recorded and console outputs.
1 open finding What changed in this PRRemoves the test-only getRunnerLogger, standardizing tests on RecordingLogger.
Changes:
| 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. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Follow-up to #4198 (comment), which cherry-picks the commit with the Logger improvement and addresses the getRunnerLogger point.
The getRunnerLogger function is only used in tests where it is largely superseded by getRecordingLogger / the RecordingLogger class. The Logger returned by getRunnerLogger outputs log messages to stdout. In setupTests, we install test hooks which ensure that all stdout/stderr output 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 of getRecordingLogger. While RecordingLogger always uses console.debug to output to stdout, this doesn't matter because we capture the output with the hooks installed by setupTests. The debug-level filter of getRunnerLogger was 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 replaces getRunnerLogger with new RecordingLogger.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
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