You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud Function lifecycle hooks don't respect codebase filters #6002
Hi @sam-throne, thanks for reporting this and for submitting a PR. I was able to reproduce the issue you mentioned. Running firebase deploy --only functions:<codebase> runs the predeploy script for both codebases.
I'll notify our engineers about this so that they can take a look, and I’ll be marking this as reproducible. One odd thing I noticed is that your codebases are named “codebaseA” and “codebaseB”. From what I know, codebase names can only contain lowercase letters.
Hey @sam-throne, thanks for reporting this issue. I have implemented a simple fix in a PR here: #6011. Note that predeploy hooks still won't run for individually specified functions, so we will need to revisit this issue and restructure the deploy logic in the future.
Hi @blidd-google thanks for your time. Your PR appears to be a regression however. Predeploy hooks did previously run for individually specified functions, it's just that all of them ran.
IMO if you release with the current behavior you will cause a lot of pain for people who have built workarounds for the current system. I encourage you to take a look at the PR I attached which has much better behavior
Hey @sam-throne, thanks for the followup and pointing this out — opened a PR against yours at #6023 and added some additional fixes to make sure we don't break any pre-existing behavior.
Activity
aalej commentedon Jun 19, 2023
Hi @sam-throne, thanks for reporting this and for submitting a PR. I was able to reproduce the issue you mentioned. Running
firebase deploy --only functions:<codebase>runs the predeploy script for both codebases.I'll notify our engineers about this so that they can take a look, and I’ll be marking this as reproducible. One odd thing I noticed is that your codebases are named “codebaseA” and “codebaseB”. From what I know, codebase names can only contain lowercase letters.
sam-throne commentedon Jun 20, 2023
Thanks @aalej I updated the example to lowercase
blidd-google commentedon Jun 20, 2023
Hey @sam-throne, thanks for reporting this issue. I have implemented a simple fix in a PR here: #6011. Note that predeploy hooks still won't run for individually specified functions, so we will need to revisit this issue and restructure the deploy logic in the future.
sam-throne commentedon Jun 21, 2023
Hi @blidd-google thanks for your time. Your PR appears to be a regression however. Predeploy hooks did previously run for individually specified functions, it's just that all of them ran.
IMO if you release with the current behavior you will cause a lot of pain for people who have built workarounds for the current system. I encourage you to take a look at the PR I attached which has much better behavior
blidd-google commentedon Jun 22, 2023
Hey @sam-throne, thanks for the followup and pointing this out — opened a PR against yours at #6023 and added some additional fixes to make sure we don't break any pre-existing behavior.