Fix dependabot errors

I explicitly had to downgrade "@octokit/plugin-retry" to "^6.0.0". Other
dependencies were upgraded.
This commit is contained in:
Andrew Eisenberg 2025-03-14 13:13:56 -07:00
parent f338ec87a3
commit 5f98c40063
1536 changed files with 52911 additions and 424849 deletions

View file

@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUploadChunkTimeout = exports.getConcurrency = exports.getGitHubWorkspaceDir = exports.isGhes = exports.getResultsServiceUrl = exports.getRuntimeToken = exports.getUploadChunkSize = void 0;
const os_1 = __importDefault(require("os"));
const core_1 = require("@actions/core");
// Used for controlling the highWaterMark value of the zip that is being streamed
// The same value is used as the chunk size that is use during upload to blob storage
function getUploadChunkSize() {
@ -44,20 +45,42 @@ function getGitHubWorkspaceDir() {
return ghWorkspaceDir;
}
exports.getGitHubWorkspaceDir = getGitHubWorkspaceDir;
// Mimics behavior of azcopy: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-optimize
// If your machine has fewer than 5 CPUs, then the value of this variable is set to 32.
// Otherwise, the default value is equal to 16 multiplied by the number of CPUs. The maximum value of this variable is 300.
// The maximum value of concurrency is 300.
// This value can be changed with ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY variable.
function getConcurrency() {
const numCPUs = os_1.default.cpus().length;
if (numCPUs <= 4) {
return 32;
let concurrencyCap = 32;
if (numCPUs > 4) {
const concurrency = 16 * numCPUs;
concurrencyCap = concurrency > 300 ? 300 : concurrency;
}
const concurrency = 16 * numCPUs;
return concurrency > 300 ? 300 : concurrency;
const concurrencyOverride = process.env['ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY'];
if (concurrencyOverride) {
const concurrency = parseInt(concurrencyOverride);
if (isNaN(concurrency) || concurrency < 1) {
throw new Error('Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable');
}
if (concurrency < concurrencyCap) {
(0, core_1.info)(`Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY.`);
return concurrency;
}
(0, core_1.info)(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${concurrencyCap} based on the number of cpus. Set it to the maximum value allowed.`);
return concurrencyCap;
}
// default concurrency to 5
return 5;
}
exports.getConcurrency = getConcurrency;
function getUploadChunkTimeout() {
return 30000; // 30 seconds
const timeoutVar = process.env['ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS'];
if (!timeoutVar) {
return 300000; // 5 minutes
}
const timeout = parseInt(timeoutVar);
if (isNaN(timeout)) {
throw new Error('Invalid value set for ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS env variable');
}
return timeout;
}
exports.getUploadChunkTimeout = getUploadChunkTimeout;
//# sourceMappingURL=config.js.map