Skip to content

Commit

Permalink
Account for existing but empty cpus file
Browse files Browse the repository at this point in the history
If a CPU file exists but is empty, previously we reported this file with a CPU count of 1, which resulted in a single-threaded run.

This change trims whitespace from the file, and makes sure that the length of any token in the file is greater than 0 before incrementing the CPU count variable. This will (correctly) report the file with a CPU count of 0, and the result will be filtered out as expected.
  • Loading branch information
angelapwen committed Feb 15, 2024
1 parent 65b0987 commit 8275137
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

No user facing changes.
- Fix an issue where an existing, but empty, `/sys/fs/cgroup/cpuset.cpus` file always resulted in a single-threaded run. [#2151](https://github.com/github/codeql-action/pull/2151)

## 3.24.3 - 15 Feb 2024

Expand Down
4 changes: 2 additions & 2 deletions lib/util.js

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

Loading

0 comments on commit 8275137

Please sign in to comment.