@@ -357377,6 +357377,8 @@ class CloudFunction {
357377
357377
request.vpcConnector = (opts === null || opts === void 0 ? void 0 : opts.vpcConnector) ? opts.vpcConnector : null;
357378
357378
request.timeout = (opts === null || opts === void 0 ? void 0 : opts.timeout) ? `${opts.timeout}s` : null;
357379
357379
request.maxInstances = (opts === null || opts === void 0 ? void 0 : opts.maxInstances) ? opts.maxInstances : null;
357380
+ request.availableMemoryMb = (opts === null || opts === void 0 ? void 0 : opts.availableMemoryMb) ? opts.availableMemoryMb
357381
+ : null;
357380
357382
// Parse env vars
357381
357383
let envVars;
357382
357384
if (opts === null || opts === void 0 ? void 0 : opts.envVars) {
@@ -357801,6 +357803,7 @@ function run() {
357801
357803
const runtime = core.getInput('runtime', { required: true });
357802
357804
const credentials = core.getInput('credentials');
357803
357805
const projectId = core.getInput('project_id');
357806
+ const availableMemoryMb = core.getInput('memory_mb');
357804
357807
const region = core.getInput('region') || 'us-central1';
357805
357808
const envVars = core.getInput('env_vars');
357806
357809
const entryPoint = core.getInput('entry_point');
@@ -357820,6 +357823,7 @@ function run() {
357820
357823
parent: client.parent,
357821
357824
sourceDir,
357822
357825
runtime,
357826
+ availableMemoryMb: +availableMemoryMb,
357823
357827
entryPoint,
357824
357828
envVars,
357825
357829
timeout,
@@ -357961,8 +357965,8 @@ exports.deleteZipFile = deleteZipFile;
357961
357965
function uploadSource(uploadUrl, zipPath) {
357962
357966
return __awaiter(this, void 0, void 0, function* () {
357963
357967
const zipFile = fs.createReadStream(zipPath);
357964
- const client = new gaxios_1.Gaxios();
357965
- client.request({
357968
+ const client = new gaxios_1.Gaxios({ retryConfig: { retry: 5 } } );
357969
+ const resp = yield client.request({
357966
357970
method: 'PUT',
357967
357971
body: zipFile,
357968
357972
url: uploadUrl,
@@ -357971,6 +357975,9 @@ function uploadSource(uploadUrl, zipPath) {
357971
357975
'x-goog-content-length-range': '0,104857600',
357972
357976
},
357973
357977
});
357978
+ if (resp.status != 200) {
357979
+ throw new Error(`Failed to upload function source code: ${resp.statusText}`);
357980
+ }
357974
357981
return uploadUrl;
357975
357982
});
357976
357983
}
0 commit comments