google-github-actions / deploy-cloudrun

A GitHub Action for deploying services to Google Cloud Run.
https://cloud.google.com/run
Apache License 2.0
467 stars 115 forks source link

Interactive prompts cause hang #509

Closed jreidgreer closed 6 months ago

jreidgreer commented 6 months ago

TL;DR

If there is an interactive prompt from the final gcloud command, the action will hang. For example, this is what happens locally:

gcloud run services replace service.yaml --format json --region us-central1
API [cloudresourcemanager.googleapis.com] not enabled on project [....]. Would you like to enable and retry (this will take a few minutes)? (y/N)?  y

The prompt is also not displayed in the output, so it's difficult to debug until you run locally.

Expected behavior

The command would run with the --quiet command, or similar environmental variable so that it throws an error when an interactive prompt is encountered.

Observed behavior

Run google-github-actions/deploy-cloudrun@v2
Successfully authenticated
Running: gcloud run services replace service.yaml --format json --region us-central1

This is the output and it hangs indefinitely.

Action YAML

- name: Deploy to Cloud Run
        uses: google-github-actions/deploy-cloudrun@v2
        with:
          region: us-central1
          metadata: service.yaml

Log output

No response

Additional information

No response

sethvargo commented 6 months ago

We do run quiet, but not on services replace. Fixing...