Skip to content

Using labels with no value fails #392

@BoscoDomingo

Description

@BoscoDomingo

TL;DR

You can't use labels without a value. Even a label= fails

Expected behavior

I would expect to be able to deploy a function with a label that contains a simple key with no value as I can via Console or CLI:
image

Observed behavior

I got the errors failed to parse KEY=VALUE pair "REDACTED_KEY=": no value and failed to parse KEY=VALUE pair "REDACTED_KEY": missing "=". This comes from https://github.com/google-github-actions/actions-utils/blob/main/src/kv.ts#L50

Action YAML

- id: 'deploy'
        uses: 'google-github-actions/deploy-cloud-functions@v1'
        env:
          GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID_DEV }}
          GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT_DEV }}
        with:
          project_id: ${{env.GCP_PROJECT_ID}}
          name: 'REDACTED'
          runtime: 'nodejs${{env.NODE_VERSION}}'
          entry_point: 'main'
          region: ${{env.REGION}}
          docker_registry: 'artifact-registry'
          env_vars: REDACTED
          env_vars_file: '.github/workflows/env.yml'
          secret_environment_variables: REDACTED
          service_account_email: ${{ env.GCP_SERVICE_ACCOUNT }}
          labels: 'REDACTED_KEY' # can also try with 'REDACTED_KEY='

Log output

Private log, the only relevant parts are the error messages I provided

Additional information

It is pertinent to your library used for parsing Key-Value pairs, but in this case, it should allow value-less pairs as is permitted in GCP via Console or CLI as mentioned.

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