memory_mb input always defaults to 256MB
noahxl10 opened this issue · comments
TL;DR
I am unable to change the default memory allocation for any cloud function I attempt deploying. No matter what value I try, the value stays at 256MB. I haven't seen any failures/logs explaining the issue.
Expected behavior
Expected the cloud function to be deployed with the specified allocated memory
Observed behavior
Cloud function is deployed with default (256MB) allocated memory regardless of what memory_mb is specified (I tried several options: 512MB, 2048MB, 8192MB)
Action YAML
name: Deployment2
on:
push:
branches:
- 'master'
paths:
- 'cloud_function/**'
jobs:
job_id:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v3'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.SA_KEY }}'
- id: 'cloud-function-deploy'
uses: 'google-github-actions/deploy-cloud-functions@v0'
with:
name: 'cloud-function'
runtime: 'python37'
project_id: '${{ secrets.GCP_PROJECT_ID }}'
region: 'us-east4'
source_dir: 'cloud_function'
memory_mb: '2048MB'
entry_point: 'main'
event_trigger_type: 'google.pubsub.topic.publish'
event_trigger_resource: '${{ secrets.topic }}'
timeout: '540'
max_instances: '1'
service_account_email: ${{ secrets.service_account }}
Log output
Current runner version: '2.291.1'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:2541b1294d2704b0964813337f33b291d3f8596b)
Download action repository 'google-github-actions/auth@v0' (SHA:ceee102ec2387dd9e844e01b530ccd4ec87ce955)
Download action repository 'google-github-actions/deploy-cloud-functions@v0' (SHA:150007aacd86ec18da039413072dc179aa95bc16)
1s
Run actions/checkout@v3
Syncing repository: (REMOVED)/eds_gcp_cf
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/5c0ed97c-e71f-4b9a-96b6-e69e94e75c15' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/eds_gcp_cf/eds_gcp_cf
Deleting the contents of '/home/runner/work/eds_gcp_cf/eds_gcp_cf'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/bin/git log -1 --format='%H'
'd90add563b49b4315e8e2644251712044b41ce4b'
0s
Run google-github-actions/auth@v0
Created credentials file at "/home/runner/work/eds_gcp_cf/eds_gcp_cf/gha-creds-1e97032bc9d495c3.json"
2m 46s
Run google-github-actions/deploy-cloud-functions@v0
Created zip file from 'freshdesk_snowflake_push' at '/tmp/cfsrc-d4337fbcc83c9c06a263038a.zip'
Creating new Cloud Function deployment
Deploying Cloud Function
Still deploying Cloud Function (1/n)
Still deploying Cloud Function (2/n)
Still deploying Cloud Function (3/n)
Still deploying Cloud Function (4/n)
Still deploying Cloud Function (5/n)
Still deploying Cloud Function (6/n)
Still deploying Cloud Function (7/n)
Still deploying Cloud Function (8/n)
Still deploying Cloud Function (9/n)
Still deploying Cloud Function (10/n)
Still deploying Cloud Function (11/n)
Still deploying Cloud Function (12/n)
Still deploying Cloud Function (13/n)
Still deploying Cloud Function (14/n)
Still deploying Cloud Function (15/n)
Still deploying Cloud Function (16/n)
Still deploying Cloud Function (17/n)
Still deploying Cloud Function (18/n)
Still deploying Cloud Function (19/n)
Still deploying Cloud Function (20/n)
Still deploying Cloud Function (21/n)
Still deploying Cloud Function (22/n)
Still deploying Cloud Function (23/n)
Still deploying Cloud Function (24/n)
Still deploying Cloud Function (25/n)
Still deploying Cloud Function (26/n)
Still deploying Cloud Function (27/n)
Still deploying Cloud Function (28/n)
Still deploying Cloud Function (29/n)
Warning: Output 'url' was not set - only httpsTrigger Cloud Functions return this attribute.
0s
Post job cleanup.
Removed exported credentials at "/home/runner/work/eds_gcp_cf/eds_gcp_cf/gha-creds-1e97032bc9d495c3.json".
0s
Post job cleanup.
/usr/bin/git version
git version 2.36.1
Temporarily overriding HOME='/home/runner/work/_temp/5307e0ad-2af3-43f5-b11a-b816ee9e4c31' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/eds_gcp_cf/eds_gcp_cf
/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
0s
Cleaning up orphan processes
Additional information
No response
Hi @noahxl10
This is because the value is already in MB, and adding the "MB" suffix makes the value not parsable as a number, which then defaults to undefined
and uses the default value of 256.
- memory_mb: '2048MB'
+ memory_mb: '2048'
Let me see about adding a validation for this.
Oh! Thank you for the clarification. I was deploying via gcloud for a while and just assumed the MB needed to be on the end similar to the gcloud CLI. Thanks again.