Skip to content
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

Deploy only changed Functions #239

Open
ChazUK opened this issue May 7, 2024 · 1 comment
Open

Deploy only changed Functions #239

ChazUK opened this issue May 7, 2024 · 1 comment

Comments

@ChazUK
Copy link

ChazUK commented May 7, 2024

Hi, I was wondering if it'd be possible to deploy only the functions that have changed.

I'm not sure how Nx would work on that level, unless each function had it's own tag in the dependency tree.

@simondotm
Copy link
Owner

simondotm commented May 7, 2024

If you have one firebase function project per exported cloud function, you could use nx affected eg.

nx affected -t deploy --tag=firebase:function

to deploy only changed firebase function projects

I believe the firebase CLI already does some hashing when it deploys? I found this comment:

The Firebase CLI has a functionality that skips functions that have not been modified, but that logic only runs when deploying all functions. When given instructions to deploy a specific function/set of functions, it assumes that you know best and skips the change detection logic.

Perhaps the way the plugin runs the deploy command needs to be checked to see if it allows this optimization. 🤔

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

No branches or pull requests

2 participants