Skip to content

Cloud Functions Always Unhealthy #426

@zacpez

Description

@zacpez

Observation
All Gen 1 Cloud Functions in GCP Project are reporting as Unhealthy. Given the root cause below it might follow that Gen 2 will do the same.

Suspected Root Cause
There is a compound condition that always returns true in this linked logic gcloud functions list --filter="state!=ACTIVE OR status!=ACTIVE"

Gen 1 has key status and Gen 2 has key state that holds value 'ACTIVE' or other values for other states. If one of these keys is missing then it reports as Unhealthy.

Short Term Ideas
Add a CLI flag (--v2) to force the API response in Gen 2 mode even if the functions are Gen 1. This worked locally with gcloud, and presumably the version in the runtime is the same or close.

Long Term Ideas
Not necessarily long term, rather alternative ideas: Use a XOR operator or equivalent condition with available logic operators.

Housekeeping - Check off all before closing issue

  • This bug is fixed with the short term ideas
  • Long term backlog items are created and linked to this issue
  • The long term backlog items are assigned to the appropriate project

Metadata

Metadata

Assignees

Labels

bugAny bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions