Skip to content

Input "available_memory" does not work #413

@si-Blue

Description

@si-Blue

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy