Skip to content

fix: clear deploy error when the default App Engine service account is missing or disabled - #10835

Open
IzaakGough wants to merge 15 commits into
mainfrom
@invertase/fix-issue-4524
Open

IzaakGough wants to merge 15 commits into
mainfrom
@invertase/fix-issue-4524

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4524.

Deploying 1st gen functions when the default App Engine service account was missing or disabled failed after several retries with a generic "internal error".

This checks that account before deploying and fails fast with an error that says what is wrong and links to the page that fixes it.

  • Only runs for 1st gen functions without a custom serviceAccount, since those are the only ones that use this account.
  • Fails open on lookup errors other than 404, so a missing IAM read permission does not block a deploy that would otherwise work.

Tested with unit tests. Not tested against a live project.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fast-fail check during the deployment of 1st generation Cloud Functions to ensure that the default App Engine service account exists and is enabled when needed, preventing generic internal errors later in the deployment pipeline. The changes include the implementation of checkDefaultServiceAccountEnabled in checkIam.ts, its integration into the deployment flow in deploy.ts, and comprehensive unit tests in checkIam.spec.ts. The review feedback suggests a minor optimization in checkIam.ts to remove redundant array spreading when calling flattenArray.

Comment thread src/deploy/functions/checkIam.ts Resolved
@IzaakGough
IzaakGough marked this pull request as ready for review July 21, 2026 16:02
@IzaakGough IzaakGough changed the title fix: improve deploy error message when default app engine service acc… fix: clear deploy error when the default App Engine service account is missing or disabled Nov 4, 2026
@CorieW
CorieW self-requested a review November 12, 2026 13:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specific error message on firebase function deploy failure due to missing/deactivated app engine service account

1 participant