firebase / firebase/firebase-tools
Deploy Functions Redeploys Unchanged Functions when run in CICD vs Personal Machine
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### Environment info
**firebase-tools:** 12.5.4
**Platform:** macOS and ubuntu-latest Github Actions CICD
### Test case
Running the same Firebase deploy command on my local machine and then in my CICD pipeline using GitHub Actions (and vice versa) re-deploys all functions instead of skipping the unchanged functions.
### Steps to reproduce
1. Run `npx firebase-tools deploy --only functions` locally multiple times in a row and see that only the updated functions are deployed with the message `functions: Skipping the deploy of unchanged functions with experimental support for skipdeployingnoopfunctions` in the terminal
2. Run `npx firebase-tools deploy --only functions` in a CICD pipeline on GitHub Actions multiple times in a row and see that only the updated functions are deployed with the message `functions: Skipping the deploy of unchanged functions with experimental support for skipdeployingnoopfunctions` in the terminal
3. Run `npx firebase-tools deploy --only functions` locally and then in a CICD pipeline in Github Actions and see that they redeploy each time (or vice versa if CICD runs first and then local deploy after)
I see that the functions hash is different in CICD than it is when deploying locally. How does the functions hash get created? Why would it be different depending on where it is generated? Is this expected? Seems like a bug to me.
### Expected behavior
No matter where you run the CLI command to deploy Cloud Functions, it should skip functions that have not changed.
### Actual behavior
Switching between CICD pipelines and a personal machine to deploy Cloud Functions re-deploys all functions even though the function code has not changed
Contributor guide
Assessment
This issue has not been assessed yet.