GoogleCloudPlatform / cloud-run-button

Let anyone deploy your GitHub repos to Google Cloud Run with a single click
https://cloud.run
Apache License 2.0
525 stars 91 forks source link

Project selector suggests invalid projects #177

Open glasnt opened 4 years ago

glasnt commented 4 years ago

Introduced in #149, the API for the project list includes all lifecycle types, including projects pending deletion.

The list of projects should only be those with lifecycle == "ACTIVE" (this is the default in gcloud, effectively --filter='lifecycleState:ACTIVE'.)

https://cloud.google.com/resource-manager/reference/rest/v1/projects/list https://cloud.google.com/resource-manager/reference/rest/v1/projects#LifecycleState

Reproduction:

[ ? ] Choose a project to deploy this application: butt  [Use arrows to move, type to filter]
❯ glasnt-cloudrun-button-0364 ^C
~$ gcloud projects list --format "value(project_id, lifecycle_state)" --filter='lifecycleState:*'
glasnt-cloudrun-button-0364 DELETE_REQUESTED