[REQUIRED] Environment info
firebase-tools: 15.11.0
Platform: Linux (GitHub Actions ubuntu-latest)
Authentication:
- Running in GitHub Actions
- Authenticated via Google Cloud service account (
project-A)
[REQUIRED] Test case
I am deploying from GitHub Actions using a service account that belongs to project-A.
project-A contains backend-A
firebase.json is misconfigured with backendId: backend-B (which belongs to a different project)
Deploy command:
firebase deploy --only apphosting:backend-A --project project-A
[REQUIRED] Steps to reproduce
- Configure
firebase.json with:
{
"apphosting": [
{
"backendId": "backend-B",
"rootDir": "/"
}
]
}
- Run in GitHub Actions (ubuntu-latest) with a service account for
project-A:
firebase deploy --only apphosting:backend-A --project project-A
- Observe CLI output:
=== Deploying to 'project-A'...
i deploying apphosting
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/project-A/overview
- Check Firebase Console of
project-A:
- No rollout is created
- No deployment occurs
[REQUIRED] Expected behavior
The CLI should either:
- fail with an error because no apphosting entry in
firebase.json matches backend-A, or
- show a clear warning that no App Hosting deployment was performed
It should not report Deploy complete! when no deployment is actually performed.
[REQUIRED] Actual behavior
The command exits successfully with Deploy complete!, but no rollout is created and no deployment occurs.
Additional notes
From additional testing, the behavior appears to depend on whether the backendId specified via --only matches any entry in firebase.json.
If no matching apphosting.backendId exists in firebase.json, the CLI performs a no-op and exits successfully without deploying anything.
Only when both of the following are true:
- the
backendId specified via --only
- and the
backendId in firebase.json
match each other, the CLI proceeds with actual deployment or backend existence validation.
This leads to inconsistent behavior:
- In some cases, invalid backend IDs are correctly detected (when they match
firebase.json)
- In other cases, the same invalid backend IDs are silently ignored (when they do not match
firebase.json)
This makes it difficult to detect configuration errors, especially in CI/CD environments, because the command appears successful while no deployment is performed.
firebase deploy —only apphosting: |
apphosting.backendId in firebase.json |
CLI outputs |
rollout created? |
| backend-A |
backend-A |
i deploying apphosting i apphosting: Found backend(s) backend-A … ✔ apphosting: Rollout for backend backend-A complete! ✔ apphosting: Your backend is now deployed at: https://**** ✔ Deploy complete! |
yes |
| backend-A |
backend-B |
i deploying apphosting ✔ Deploy complete! |
no |
| backend-B |
backend-A |
i deploying apphosting ✔ Deploy complete! |
no |
| backend-B |
backend-B |
i deploying apphosting ? Did not find backend(s) ds-connect. Do you want to create them (you'll have the option to select which to create in the next step)? (Y/n) 25h Error: An unexpected error has occurred. Error: Process completed with exit code 2. |
no |
[REQUIRED] Environment info
firebase-tools: 15.11.0
Platform: Linux (GitHub Actions ubuntu-latest)
Authentication:
project-A)[REQUIRED] Test case
I am deploying from GitHub Actions using a service account that belongs to
project-A.project-Acontainsbackend-Afirebase.jsonis misconfigured withbackendId: backend-B(which belongs to a different project)Deploy command:
[REQUIRED] Steps to reproduce
firebase.jsonwith:{ "apphosting": [ { "backendId": "backend-B", "rootDir": "/" } ] }project-A:project-A:[REQUIRED] Expected behavior
The CLI should either:
firebase.jsonmatchesbackend-A, orIt should not report
Deploy complete!when no deployment is actually performed.[REQUIRED] Actual behavior
The command exits successfully with Deploy complete!, but no rollout is created and no deployment occurs.
Additional notes
From additional testing, the behavior appears to depend on whether the
backendIdspecified via--onlymatches any entry infirebase.json.If no matching
apphosting.backendIdexists infirebase.json, the CLI performs a no-op and exits successfully without deploying anything.Only when both of the following are true:
backendIdspecified via--onlybackendIdinfirebase.jsonmatch each other, the CLI proceeds with actual deployment or backend existence validation.
This leads to inconsistent behavior:
firebase.json)firebase.json)This makes it difficult to detect configuration errors, especially in CI/CD environments, because the command appears successful while no deployment is performed.
firebase deploy —only apphosting:apphosting.backendIdinfirebase.jsoni apphosting: Found backend(s) backend-A
…
✔ apphosting: Rollout for backend backend-A complete!
✔ apphosting: Your backend is now deployed at: https://****
✔ Deploy complete!
✔ Deploy complete!
✔ Deploy complete!
? Did not find backend(s) ds-connect. Do you want to create them (you'll have
the option to select which to create in the next step)? (Y/n)
25h
Error: An unexpected error has occurred.
Error: Process completed with exit code 2.