-
Notifications
You must be signed in to change notification settings - Fork 1.2k
catch errors during App Hosting deploys #9984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| - Updated the functions.config deprecation notice from March 2026 to March 2027 (#9941) | ||
| - Detects when App Hosting fails to deploy, returning an error. (#8866) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||||
| logLabeledWarning, | ||||||
| } from "../../utils"; | ||||||
| import { Context } from "./args"; | ||||||
| import { FirebaseError } from "../../error"; | ||||||
|
|
||||||
| /** | ||||||
| * Orchestrates rollouts for the backends targeted for deployment. | ||||||
|
|
@@ -70,16 +71,23 @@ | |||||
| `Starting rollout(s) for backend(s) ${backendIds.join(", ")}; this may take a few minutes. It's safe to exit now.\n`, | ||||||
| ).start(); | ||||||
| const results = await Promise.allSettled(rollouts); | ||||||
| let failed = false; | ||||||
| for (let i = 0; i < results.length; i++) { | ||||||
| const res = results[i]; | ||||||
| if (res.status === "fulfilled") { | ||||||
| const backend = await getBackend(projectId, backendIds[i]); | ||||||
| logLabeledSuccess("apphosting", `Rollout for backend ${backendIds[i]} complete!`); | ||||||
| logLabeledSuccess("apphosting", `Your backend is now deployed at:\n\thttps://${backend.uri}`); | ||||||
| } else { | ||||||
| failed = true; | ||||||
| logLabeledWarning("apphosting", `Rollout for backend ${backendIds[i]} failed.`); | ||||||
| logLabeledError("apphosting", res.reason); | ||||||
| logLabeledError("apphosting", `${res.reason}`); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using
Suggested change
References
|
||||||
| } | ||||||
| } | ||||||
| rolloutsSpinner.stop(); | ||||||
| if (failed) { | ||||||
| throw new FirebaseError( | ||||||
| "One or more rollouts failed. Please review the errors above and try again.", | ||||||
| ); | ||||||
| } | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To enable more robust error message handling later in the file, please also import
getErrMsghere.