8000 Merge main into releases/v3 by github-actions[bot] · Pull Request #2200 · github/codeql-action · GitHub
[go: up one dir, main page]

Skip to content

Merge main into releases/v3 #2200

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

Merged
merged 20 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ef507e1
Update changelog and version after v3.24.7
github-actions[bot] Mar 12, 2024
a7b089b
Update checked-in dependencies
github-actions[bot] Mar 12, 2024
f195496
Merge pull request #2193 from github/mergeback/v3.24.7-to-main-3ab41019
angelapwen Mar 12, 2024
362c407
Bump verbosity on `trace-command` when in debug mode
henrymercer Mar 13, 2024
649f3e8
Bump verbosity when running autobuild script directly in debug mode
henrymercer Mar 13, 2024
070b051
Bump verbosity of `database finalize` in debug mode
henrymercer Mar 13, 2024
8da95d8
Refactoring: Add `getExtractionVerbosityArguments` wrapper
henrymercer Mar 13, 2024
3b6ebfb
Add changelog note
henrymercer Mar 13, 2024
a009e4d
Remove "experimental" designation from `packs` input
henrymercer Mar 13, 2024
e402144
Log job status in `init-post`
henrymercer Mar 13, 2024
3d82264
Merge pull request #2195 from github/henrymercer/extraction-debug-mode
henrymercer Mar 13, 2024
0d680ab
Merge pull request #2196 from github/henrymercer/update-packs-input-d…
henrymercer Mar 13, 2024
f055b5e
Merge pull request #2197 from github/henrymercer/log-job-status
henrymercer Mar 13, 2024
88b28eb
Surface autobuild errors from stderr stream
henrymercer Mar 14, 2024
88a0b7a
Mark Maven build failures as configuration errors
henrymercer Mar 14, 2024
3edd1bf
Truncate autobuild errors to 10 lines
henrymercer Mar 15, 2024
bddfc7c
Add config error for Gradle build failures
henrymercer Mar 15, 2024
e28ae3a
Add config error for Swift build failures
henrymercer Mar 15, 2024
1ecc277
Merge pull request #2198 from github/henrymercer/improve-tracking-aut…
henrymercer Mar 15, 2024
2b9b521
Update changelog for v3.24.8
github-actions[bot] Mar 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bump verbosity of database finalize in debug mode
  • Loading branch information
henrymercer committed Mar 13, 2024
commit 070b05147aec989cce727e0177ce8137ec24c359
2 changes: 1 addition & 1 deletion lib/analyze.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions lib/codeql.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.test.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ async function finalizeDatabaseCreation(
util.getCodeQLDatabasePath(config, language),
threadsFlag,
memoryFlag,
config.debugMode,
);
logger.endGroup();
}
Expand Down
25 changes: 20 additions & 5 deletions src/codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ test("database finalize recognises JavaScript no code found error on CodeQL 2.11
sinon.stub(safeWhich, "safeWhich").resolves("");

await t.throwsAsync(
async () => await codeqlObject.finalizeDatabase("", "", ""),
async () => await codeqlObject.finalizeDatabase("", "", "", false),
{
instanceOf: util.ConfigurationError,
message: new RegExp(
Expand All @@ -892,7 +892,7 @@ test("database finalize overrides no code found error on CodeQL 2.11.6", async (
sinon.stub(safeWhich, "safeWhich").resolves("");

await t.throwsAsync(
async () => await codeqlObject.finalizeDatabase("", "", ""),
async () => await codeqlObject.finalizeDatabase("", "", "", false),
{
instanceOf: util.ConfigurationError,
message: new RegExp(
Expand All @@ -915,7 +915,12 @@ test("database finalize does not override no code found error on CodeQL 2.12.4",

await t.throwsAsync(
async () =>
await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"),
await codeqlObject.finalizeDatabase(
"db",
"--threads=2",
"--ram=2048",
false,
),
{
message:
'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
Expand All @@ -940,7 +945,12 @@ test("runTool summarizes several fatal errors", async (t) => {

await t.throwsAsync(
async () =>
await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"),
await codeqlObject.finalizeDatabase(
"db",
"--threads=2",
"--ram=2048",
false,
),
{
instanceOf: util.ConfigurationError,
message: new RegExp(
Expand All @@ -967,7 +977,12 @@ test("runTool outputs last line of stderr if fatal error could not be found", as

await t.throwsAsync(
async () =>
await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"),
await codeqlObject.finalizeDatabase(
"db",
"--threads=2",
"--ram=2048",
false,
),
{
instanceOf: util.ConfigurationError,
message: new RegExp(
Expand Down
5 changes: 5 additions & 0 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface CodeQL {
databasePath: string,
threadsFlag: string,
memoryFlag: string,
enableDebugLogging: boolean,
): Promise<void>;
/**
* Run 'codeql resolve languages'.
Expand Down Expand Up @@ -715,13 +716,17 @@ export async function getCodeQLForCmd(
databasePath: string,
threadsFlag: string,
memoryFlag: string,
enableDebugLogging: boolean,
) {
const args = [
"database",
"finalize",
"--finalize-dataset",
threadsFlag,
memoryFlag,
...(enableDebugLogging
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
: []),
...getExtraOptionsFromEnv(["database", "finalize"]),
databasePath,
];
Expand Down
0