ultraGentle
ultraGentle

Reputation: 6349

Roll back Firebase hosting and functions deploy jointly?

When rolling back a Firebase Hosting deploy, is it possible to also roll back Firebase Functions to the state they were in as of the target Hosting rollback?

If not, is there some way to manually roll back functions?

I have not seen a way to do so in the documentation, but I'm hoping I've missed something, since this would be a nice way to ensure interoperability between functions and hosting in a rollback. https://firebase.google.com/docs/cli#roll_back_deploys

There's also this related question How to atomically update and roll back a Firebase Hosting site + Cloud Run service? , but it's about Firebase Hosting and Google Cloud Run.

Upvotes: 1

Views: 461

Answers (1)

ultraGentle
ultraGentle

Reputation: 6349

Per Frank van Puffelen's comment, this can't be done in a single action. Instead of rolling back functions, you must re-deploy the version that was active during your hosting-rollback target.

So, if joint rollbacks are something you anticipate needing, it might be worth redeploying functions every time you deploy hosting. That way, if a joint rollback is ever needed, you can simply look for the matching date function deploy, rather than having to dig through various function versions in version control.

Upvotes: 2

Related Questions