Skip to content

Input "available_memory" does not work #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
si-Blue opened this issue May 29, 2024 · 0 comments · Fixed by #414
Closed

Input "available_memory" does not work #413

si-Blue opened this issue May 29, 2024 · 0 comments · Fixed by #414
Labels
bug Something isn't working

Comments

@si-Blue
Copy link

si-Blue commented May 29, 2024

TL;DR

When deploying a cloud function with the input "available_memory", the value is not being changed. Based on the code, the input is actually "memory" instead of available_memory.

Expected behavior

The available_memory should have been increased to the value set in the YAML file based on the README document.

Observed behavior

The default available memory of 256MB remained the same.

Action YAML

jobs:
  job_id:
    runs-on: 'ubuntu-latest'
    permissions:
      contents: 'read'
      id-token: 'write'

    steps:
    - uses: 'actions/checkout@v4'

    - id: 'auth'
      uses: 'google-github-actions/auth@v2'
      with:
        workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
        service_account: ${{ secrets.SERVICE_ACCT_EMAIL }}       

    - id: 'deploy'
      uses: 'google-github-actions/deploy-cloud-functions@v3'
      timeout-minutes: 10
      with:
        name: 'my-python-function'
        runtime: 'python312'
        region: ${{ env.REGION }}
        project_id: ${{ env.PROJECT_ID }}
        ingress_settings: ALLOW_INTERNAL_ONLY  
        service_account: ${{ secrets.SERVICE_ACCT_EMAIL }} 
        min_instance_count: 1
        available_memory: 512Mi # broken
        memory: 512Mi # working
        service_timeout: 360s
        event_trigger_type: "google.cloud.pubsub.topic.v1.messagePublished"
        event_trigger_pubsub_topic: Sensitve
        event_trigger_service_account: ${{ secrets.SERVICE_ACCT_EMAIL }} 
        entry_point: Sensitve

Log output

No response

Additional information

The README document shows that the option for setting the amount of memory available is "available_memory". Since I could not get that option to work correctly, I read through the main.ts file for this and discovered that line 67 shows the following:

const availableMemory = presence(getInput('memory')) || '256Mi';

Since it is getting the input of 'memory', that is the value that needs to be used in the YAML file. The document needs to be updated to reflect this.

@si-Blue si-Blue added the bug Something isn't working label May 29, 2024
sethvargo added a commit that referenced this issue May 29, 2024
Adjust inputs to be consistent.

Fixes
#413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant