Skip to content

Commit 2815209

Browse files
authoredNov 5, 2024··
fix: the missing artifactsMaxDownloadSize (#3237)
1 parent 03303f6 commit 2815209

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎bin/server

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const queueWebhookEnabled = convertToBool(config.get('queueWebhook').enabled);
6262
// Default cluster environment variable
6363
const clusterEnvConfig = config.get('build').environment; // readonly
6464
const clusterEnv = { ...clusterEnvConfig };
65+
const artifactsMaxDownloadSize = config.get('build').artifacts.maxDownloadSize;
6566

6667
Object.keys(clusterEnv).forEach(k => {
6768
clusterEnv[k] = String(clusterEnv[k]);
@@ -304,7 +305,8 @@ datastore.setup(datastoreConfig.ddlSyncEnabled).then(() =>
304305
executor,
305306
queueWebhookEnabled
306307
},
307-
unzipArtifactsEnabled
308+
unzipArtifactsEnabled,
309+
artifactsMaxDownloadSize
308310
})
309311
.then(instance => logger.info('Server running at %s', instance.info.uri))
310312
.catch(err => {

‎lib/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ function prettyPrintErrors(request, h) {
8282
* @param {Object} config.builds.authConfig Configuration for auth
8383
* @param {Object} config.builds.externalJoin Flag to allow external join
8484
* @param {Object} config.unzipArtifactsEnabled Flag to allow unzip artifacts
85+
* @param {Object} config.artifactsMaxDownloadSize Maximum download size for artifacts
8586
* @param {Function} callback Callback to invoke when server has started.
8687
* @return {http.Server} A listener: NodeJS http.Server object
8788
*/
@@ -211,8 +212,7 @@ module.exports = async config => {
211212
expiresIn
212213
);
213214
server.app.buildFactory.executor.tokenGen = server.app.buildFactory.tokenGen;
214-
server.app.buildFactory.maxDownloadSize =
215-
parseInt(config.build.artifacts.maxDownloadSize, 10) * 1024 * 1024 * 1024;
215+
server.app.buildFactory.maxDownloadSize = parseInt(config.artifactsMaxDownloadSize, 10) * 1024 * 1024 * 1024;
216216

217217
server.app.jobFactory.apiUri = server.info.uri;
218218
server.app.jobFactory.tokenGen = (username, metadata, scmContext, scope = ['user']) =>

0 commit comments

Comments
 (0)
Please sign in to comment.