firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.01k stars 926 forks source link

Deploying only functions removes all extensions. #7582

Closed siarheidudko closed 2 weeks ago

siarheidudko commented 3 weeks ago

[REQUIRED] Environment info

firebase-tools:13.15.4

Platform:macOS

[REQUIRED] Test case

Use old firebase.json file without extensions field or with:

{
  ... // any other settings
  "extensions": {}
}

[REQUIRED] Steps to reproduce

Just run command: firebase deploy --only functions --force

[REQUIRED] Expected behavior

Deploying only functions.

[REQUIRED] Actual behavior

Deploying only functions and removing all extensions.

google-oss-bot commented 3 weeks ago

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

aalej commented 3 weeks ago

Hey @siarheidudko, sorry to hear you encountered this issue and thanks for reporting this. I’ll raise this to our engineering team and try to bring someone who can take a look into this. Apologies again for the issue this has caused.

gbourne1 commented 3 weeks ago

If you don't have your extension defined in the firebase.json file then you are asked to remove all the extensions - if enter "Y" the will be removed.

siarheidudko commented 3 weeks ago

It did not asked anything, because this operation would have blocked CI. In addition, I've only been deploying functions, but not extensions. I have always set up extensions directly in the UI interface.

Чт, 22 авг. 2024 г. в 22:47, Geoffrey Bourne @.***>:

If you don't have your extension defined in the firebase.json file then you are asked to remove all the extensions - if enter "Y" the will be removed.

— Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-tools/issues/7582#issuecomment-2305416883, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXASJQRYVV7XMCBB4V7AB3ZSYW27AVCNFSM6AAAAABM5UGPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGQYTMOBYGM . You are receiving this because you were mentioned.Message ID: @.***>

gbourne1 commented 3 weeks ago

It did not asked anything, because this operation would have blocked CI. In addition, I've only been deploying functions, but not extensions. I have always set up extensions directly in the UI interface. Чт, 22 авг. 2024 г. в 22:47, Geoffrey Bourne @.>: If you don't have your extension defined in the firebase.json file then you are asked to remove all the extensions - if enter "Y" the will be removed. — Reply to this email directly, view it on GitHub <#7582 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXASJQRYVV7XMCBB4V7AB3ZSYW27AVCNFSM6AAAAABM5UGPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGQYTMOBYGM . You are receiving this because you were mentioned.Message ID: @.>

The "--force" prevented the ask.

siarheidudko commented 3 weeks ago

Previously, publishing only functions did not cause any actions with extensions. If you do not consider this a issue, then the major version of the application should have been upgraded. Because this is a breaking backwards incompatible functionality.

Пт, 23 авг. 2024 г. в 00:14, Geoffrey Bourne @.***>:

It did not asked anything, because this operation would have blocked CI. In addition, I've only been deploying functions, but not extensions. I have always set up extensions directly in the UI interface. Чт, 22 авг. 2024 г. в 22:47, Geoffrey Bourne @.

>: … <#m-7173298374939350900> If you don't have your extension defined in the firebase.json file then you are asked to remove all the extensions - if enter "Y" the will be removed. — Reply to this email directly, view it on GitHub <#7582 (comment) https://github.com/firebase/firebase-tools/issues/7582#issuecomment-2305416883>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXASJQRYVV7XMCBB4V7AB3ZSYW27AVCNFSM6AAAAABM5UGPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGQYTMOBYGM https://github.com/notifications/unsubscribe-auth/AIXASJQRYVV7XMCBB4V7AB3ZSYW27AVCNFSM6AAAAABM5UGPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGQYTMOBYGM . You are receiving this because you were mentioned.Message ID: @.>

The "--force" prevented the ask.

— Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-tools/issues/7582#issuecomment-2305551251, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXASJTX7RY2LDRSDCCBZWTZSZBBJAVCNFSM6AAAAABM5UGPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGU2TCMRVGE . You are receiving this because you were mentioned.Message ID: @.***>

yurist38 commented 3 weeks ago

I've just faced this change also and trying to workaround it. My functions do not deploy anymore asking extensions to be added to the firebase.json. I still need to find a way to configure it for a cross-project environment, but for the short term I'd like to be able to keep the control via extensions exclusively over UI. Is that possible now? How can I avoid adding the extensions installed manually into the manifest?

siarheidudko commented 3 weeks ago

@yurist38 I downgraded the version to 13.15.2 to be able to deploy projects without affecting extensions.

yurist38 commented 3 weeks ago

@siarheidudko good to know, thanks for sharing! I've decided to properly structure my project, actually didn't take me too long. So I've added the extensions to the json manifest already, it turned out they have support for setting up multiple projects (I used project suffix for the env files)

dipbhi commented 3 weeks ago

This is a major problem for people (like me) who use UI interface to install extensions. Now I am asked each time whether to delete the extension functions. Entering Y by mistake once would end up in a nightmare. It used to work fine.

Likely introduced by: #7575

jacobhume commented 2 weeks ago

I also have the same issue as mentioned by other commenters. We use firebase tools within our deployment workflows, and thus cannot interactively specify "N". Nor does it seem that the right answer is specifying --force because this will cause any of our extensions to be deleted. If I specify firebase deploy --only functions (or if I enumerate the specific functions I want deployed), I think only those functions should be affected, and not any others, whether they be part of an extension or not.

I suppose I could do something similar to https://github.com/firebase/firebase-tools/issues/7582#issuecomment-2306674680 but this doesn't seem extensible to me; if I have a repository which is in charge of deploying a function or set of functions, it shouldn't need to know about all the extensions I've installed, and it would be difficult to create a system wherein when I create an extension I would remember to update my unrelated function deploying repositories/directories.

Ideally the behavior could be returned to the status quo where my repository that only concerns itself with functions need not know about my extensions or their configuration. Thanks for your consideration.

joehan commented 2 weeks ago

Hey everyone, apologies for the trouble here. We're rolling out a new way to declare extensions from within your functions codebases soon, and this change was meant to se the table for that. However, it ended up negatively users who installed extensions via the console and deploy only their functions via CLI. We're reverting this behavior change for now and will release a version today to get the changes out(https://github.com/firebase/firebase-tools/commit/dee2c89a99819298e1b1437881e9a15d138c510f).

Later, we'll revisit this feature and will roll it out again in a less disruptive way.