Merge remote-tracking branch 'origin/releases/v3' into backport-v2.27.4-ea9e4e379

This commit is contained in:
github-actions[bot] 2024-11-14 14:13:43 +00:00
Родитель dbe849c3c9 ea9e4e3799
Коммит 87a237b6ff
25 изменённых файлов: 83 добавлений и 35 удалений

2
.github/workflows/__config-export.yml сгенерированный поставляемый
Просмотреть файл

@ -70,7 +70,7 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif

2
.github/workflows/__diagnostics-export.yml сгенерированный поставляемый
Просмотреть файл

@ -82,7 +82,7 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif

2
.github/workflows/__export-file-baseline-information.yml сгенерированный поставляемый
Просмотреть файл

@ -70,7 +70,7 @@ jobs:
with:
output: ${{ runner.temp }}/results
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif

2
.github/workflows/__job-run-uuid-sarif.yml сгенерированный поставляемый
Просмотреть файл

@ -59,7 +59,7 @@ jobs:
with:
output: ${{ runner.temp }}/results
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif

4
.github/workflows/__zstd-bundle-streaming.yml сгенерированный поставляемый
Просмотреть файл

@ -72,9 +72,9 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zstd-bundle.sarif
name: ${{ matrix.os }}-zstd-bundle.sarif
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF

4
.github/workflows/__zstd-bundle.yml сгенерированный поставляемый
Просмотреть файл

@ -74,9 +74,9 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zstd-bundle.sarif
name: ${{ matrix.os }}-zstd-bundle.sarif
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF

Просмотреть файл

@ -4,6 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
## 3.27.4 - 14 Nov 2024
No user facing changes.
## 3.27.3 - 12 Nov 2024
No user facing changes.

5
lib/caching-utils.js сгенерированный
Просмотреть файл

@ -37,10 +37,11 @@ const util_1 = require("./util");
* Returns the total size of all the specified paths.
* @param paths The paths for which to calculate the total size.
* @param logger A logger to record some informational messages to.
* @param quiet A value indicating whether to suppress logging warnings (default: false).
* @returns The total size of all specified paths.
*/
async function getTotalCacheSize(paths, logger) {
const sizes = await Promise.all(paths.map((cacheDir) => (0, util_1.tryGetFolderBytes)(cacheDir, logger)));
async function getTotalCacheSize(paths, logger, quiet = false) {
const sizes = await Promise.all(paths.map((cacheDir) => (0, util_1.tryGetFolderBytes)(cacheDir, logger, quiet)));
return sizes.map((a) => a || 0).reduce((a, b) => a + b, 0);
}
/* Enumerates caching modes. */

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"caching-utils.js","sourceRoot":"","sources":["../src/caching-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA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AAC,KAAK,CAAC;QAC3B,KAAK,SAAS;YACZ,OAAO,WAAW,CAAC,OAAO,CAAC;QAC7B;YACE,IAAI,CAAC,OAAO,CACV,4CAA4C,KAAK,yBAAyB,CAC3E,CAAC;YACF,OAAO,WAAW,CAAC,IAAI,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,wDAAwD;AACxD,SAAgB,2BAA2B;IACzC,0DAA0D;IAC1D,MAAM,iBAAiB,GACrB,IAAA,+BAAgB,EAAC,oBAAoB,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,kBAAkB,CAAC,CAAC;IACzC,IAAI,iBAAiB,KAAK,SAAS;QAAE,OAAO,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAE9E,qGAAqG;IACrG,IAAI,CAAC,IAAA,qBAAc,GAAE;QAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAE/C,4CAA4C;IAC5C,IAAI,CAAC,IAAA,6BAAc,GAAE;QAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAE/C,4DAA4D;IAC5D,4DAA4D;IAC5D,OAAO,WAAW,CAAC,IAAI,CAAC;AAC1B,CAAC"}

21
lib/dependency-caching.js сгенерированный
Просмотреть файл

@ -140,15 +140,30 @@ async function uploadDependencyCaches(config, logger) {
// use the cache quota that we compete with. In that case, we do not wish to use up all of the quota
// with the dependency caches. For this, we could use the Cache API to check whether other workflows
// are using the quota and how full it is.
const size = await (0, caching_utils_1.getTotalCacheSize)(cacheConfig.paths, logger);
const size = await (0, caching_utils_1.getTotalCacheSize)(cacheConfig.paths, logger, true);
// Skip uploading an empty cache.
if (size === 0) {
logger.info(`Skipping upload of dependency cache for ${language} since it is empty.`);
continue;
}
const key = await cacheKey(language, cacheConfig);
logger.info(`Uploading cache of size ${size} for ${language} with key ${key}`);
await actionsCache.saveCache(cacheConfig.paths, key);
logger.info(`Uploading cache of size ${size} for ${language} with key ${key}...`);
try {
await actionsCache.saveCache(cacheConfig.paths, key);
}
catch (error) {
// `ReserveCacheError` indicates that the cache key is already in use, which means that a
// cache with that key already exists or is in the process of being uploaded by another
// workflow. We can ignore this.
if (error instanceof actionsCache.ReserveCacheError) {
logger.info(`Not uploading cache for ${language}, because ${key} is already in use.`);
logger.debug(error.message);
}
else {
// Propagate other errors upwards.
throw error;
}
}
}
}
/**

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"dependency-caching.js","sourceRoot":"","sources":["../src/dependency-caching.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,4DAmDC;AAQD,wDAkDC;AA5LD,uCAAyB;AACzB,+BAA4B;AAE5B,6DAA+C;AAC/C,oDAAsC;AAEtC,mDAAoD;AAEpD,+CAAuC;AAGvC,iCAA6C;AAgB7C,MAAM,8BAA8B,GAAG,qBAAqB,CAAC;AAC7D,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAE1C;;GAEG;AACH,MAAM,2BAA2B,GAAwC;IACvE,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,QAAQ;YACR,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC;YACvC,SAAS;YACT,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;SACxC;QACD,IAAI,EAAE;YACJ,QAAQ;YACR,YAAY;YACZ,SAAS;YACT,cAAc;YACd,8BAA8B;YAC9B,yBAAyB;YACzB,6BAA6B;YAC7B,wBAAwB;YACxB,wBAAwB;SACzB;KACF;IACD,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QACjD,IAAI,EAAE;YACJ,QAAQ;YACR,uBAAuB;YACvB,QAAQ;YACR,eAAe;SAChB;KACF;IACD,EAAE,EAAE;QACF,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE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ACzF,uFAAuF;YACvF,gCAAgC;YAChC,IAAI,KAAK,YAAY,YAAY,CAAC,iBAAiB,EAAE,CAAC;gBACpD,MAAM,CAAC,IAAI,CACT,2BAA2B,QAAQ,aAAa,GAAG,qBAAqB,CACzE,CAAC;gBACF,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACN,kCAAkC;gBAClC,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,QAAQ,CACrB,QAAkB,EAClB,WAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,OAAO,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,WAAW,CAAC,QAAkB;IAC3C,MAAM,QAAQ,GAAG,IAAA,0BAAmB,EAAC,WAAW,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,yBAAyB,CAAC,CAAC;IACnE,IAAI,MAAM,GAAG,8BAA8B,CAAC;IAE5C,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,GAAG,GAAG,MAAM,IAAI,YAAY,EAAE,CAAC;IACvC,CAAC;IAED,OAAO,GAAG,MAAM,IAAI,+BAA+B,IAAI,QAAQ,IAAI,QAAQ,GAAG,CAAC;AACjF,CAAC"}

8
lib/util.js сгенерированный
Просмотреть файл

@ -610,14 +610,18 @@ function listFolder(dir) {
*
* @param cacheDir A directory to get the size of.
* @param logger A logger to log any errors to.
* @param quiet A value indicating whether to suppress warnings for errors (default: false).
* Ignored if the log level is `debug`.
* @returns The size in bytes of the folder, or undefined if errors occurred.
*/
async function tryGetFolderBytes(cacheDir, logger) {
async function tryGetFolderBytes(cacheDir, logger, quiet = false) {
try {
return await (0, util_1.promisify)(get_folder_size_1.default)(cacheDir);
}
catch (e) {
logger.warning(`Encountered an error while getting size of folder: ${e}`);
if (!quiet || logger.isDebug()) {
logger.warning(`Encountered an error while getting size of '${cacheDir}': ${e}`);
}
return undefined;
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
node_modules/.package-lock.json сгенерированный поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "3.27.3",
"version": "3.27.4",
"lockfileVersion": 3,
"requires": true,
"packages": {

4
package-lock.json сгенерированный
Просмотреть файл

@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "3.27.3",
"version": "3.27.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "3.27.3",
"version": "3.27.4",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^2.1.9",

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "3.27.3",
"version": "3.27.4",
"private": true,
"description": "CodeQL action",
"scripts": {

Просмотреть файл

@ -12,7 +12,7 @@ steps:
output: "${{ runner.temp }}/results"
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: "${{ runner.temp }}/results/javascript.sarif"

Просмотреть файл

@ -26,7 +26,7 @@ steps:
output: "${{ runner.temp }}/results"
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: "${{ runner.temp }}/results/javascript.sarif"

Просмотреть файл

@ -20,7 +20,7 @@ steps:
with:
output: "${{ runner.temp }}/results"
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: "${{ runner.temp }}/results/javascript.sarif"

Просмотреть файл

@ -12,7 +12,7 @@ steps:
with:
output: "${{ runner.temp }}/results"
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: "${{ runner.temp }}/results/javascript.sarif"

Просмотреть файл

@ -29,9 +29,9 @@ steps:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zstd-bundle.sarif
name: ${{ matrix.os }}-zstd-bundle.sarif
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF

Просмотреть файл

@ -29,9 +29,9 @@ steps:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zstd-bundle.sarif
name: ${{ matrix.os }}-zstd-bundle.sarif
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF

Просмотреть файл

@ -9,14 +9,16 @@ import { isHostedRunner, tryGetFolderBytes } from "./util";
* Returns the total size of all the specified paths.
* @param paths The paths for which to calculate the total size.
* @param logger A logger to record some informational messages to.
* @param quiet A value indicating whether to suppress logging warnings (default: false).
* @returns The total size of all specified paths.
*/
export async function getTotalCacheSize(
paths: string[],
logger: Logger,
quiet: boolean = false,
): Promise<number> {
const sizes = await Promise.all(
paths.map((cacheDir) => tryGetFolderBytes(cacheDir, logger)),
paths.map((cacheDir) => tryGetFolderBytes(cacheDir, logger, quiet)),
);
return sizes.map((a) => a || 0).reduce((a, b) => a + b, 0);
}

Просмотреть файл

@ -168,7 +168,7 @@ export async function uploadDependencyCaches(config: Config, logger: Logger) {
// use the cache quota that we compete with. In that case, we do not wish to use up all of the quota
// with the dependency caches. For this, we could use the Cache API to check whether other workflows
// are using the quota and how full it is.
const size = await getTotalCacheSize(cacheConfig.paths, logger);
const size = await getTotalCacheSize(cacheConfig.paths, logger, true);
// Skip uploading an empty cache.
if (size === 0) {
@ -181,10 +181,25 @@ export async function uploadDependencyCaches(config: Config, logger: Logger) {
const key = await cacheKey(language, cacheConfig);
logger.info(
`Uploading cache of size ${size} for ${language} with key ${key}`,
`Uploading cache of size ${size} for ${language} with key ${key}...`,
);
await actionsCache.saveCache(cacheConfig.paths, key);
try {
await actionsCache.saveCache(cacheConfig.paths, key);
} catch (error) {
// `ReserveCacheError` indicates that the cache key is already in use, which means that a
// cache with that key already exists or is in the process of being uploaded by another
// workflow. We can ignore this.
if (error instanceof actionsCache.ReserveCacheError) {
logger.info(
`Not uploading cache for ${language}, because ${key} is already in use.`,
);
logger.debug(error.message);
} else {
// Propagate other errors upwards.
throw error;
}
}
}
}

Просмотреть файл

@ -785,16 +785,23 @@ export function listFolder(dir: string): string[] {
*
* @param cacheDir A directory to get the size of.
* @param logger A logger to log any errors to.
* @param quiet A value indicating whether to suppress warnings for errors (default: false).
* Ignored if the log level is `debug`.
* @returns The size in bytes of the folder, or undefined if errors occurred.
*/
export async function tryGetFolderBytes(
cacheDir: string,
logger: Logger,
quiet: boolean = false,
): Promise<number | undefined> {
try {
return await promisify<string, number>(getFolderSize)(cacheDir);
} catch (e) {
logger.warning(`Encountered an error while getting size of folder: ${e}`);
if (!quiet || logger.isDebug()) {
logger.warning(
`Encountered an error while getting size of '${cacheDir}': ${e}`,
);
}
return undefined;
}
}