Skip to content

Commit

Permalink
Merge branch 'main' into henrymercer/deprecate-codeql-2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer authored and GitHub committed Sep 27, 2023
2 parents 219066c + 2cc1651 commit e4ef094
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED]

- The CodeQL Action now requires CodeQL version 2.10.5 or later. For more information, see the corresponding changelog entry for CodeQL Action version 2.21.8. [#1907](https://github.com/github/codeql-action/pull/1907)

## 2.21.9 - 27 Sep 2023

- Update default CodeQL bundle version to 2.14.6. [#1897](https://github.com/github/codeql-action/pull/1897)
- We are rolling out a feature in October 2023 that will improve the success rate of C/C++ autobuild. [#1889](https://github.com/github/codeql-action/pull/1889)
- We are rolling out a feature in October 2023 that will provide specific file coverage information for C and C++, Java and Kotlin, and JavaScript and TypeScript. Currently file coverage information for each of these pairs of languages is grouped together. [#1903](https://github.com/github/codeql-action/pull/1903)
Expand Down
2 changes: 1 addition & 1 deletion lib/api-compatibility.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "maximumVersion": "3.11", "minimumVersion": "3.6" }
{ "maximumVersion": "3.11", "minimumVersion": "3.7" }
5 changes: 5 additions & 0 deletions lib/util.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/util.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api-compatibility.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"maximumVersion": "3.11", "minimumVersion": "3.6"}
{"maximumVersion": "3.11", "minimumVersion": "3.7"}
9 changes: 9 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ function getCgroupMemoryLimitBytes(
}

const limit = Number(fs.readFileSync(limitFile, "utf8"));

if (!Number.isInteger(limit)) {
logger.debug(
`While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit ` +
Expand All @@ -269,6 +270,14 @@ function getCgroupMemoryLimitBytes(
}

const displayLimit = `${Math.floor(limit / (1024 * 1024))} MiB`;
if (limit > os.totalmem()) {
logger.debug(
`While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit as ` +
`its contents ${displayLimit} were greater than the total amount of system memory.`,
);
return undefined;
}

if (limit < MINIMUM_CGROUP_MEMORY_LIMIT_BYTES) {
logger.info(
`While resolving RAM, ignored a cgroup limit of ${displayLimit} in ${limitFile} as it was below ${
Expand Down

0 comments on commit e4ef094

Please sign in to comment.