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
I am trying to scope a Cloud Storage triggered cloud function to a specific storage bucket as the documentation explains here: https://firebase.google.com/docs/storage/extend-with-functions. However, on the local emulator, the function is run no matter what bucket a file is uploaded to. This appears to be a bug in the local emulator because if I deploy the same function to Firebase it runs as one would expect there.
[REQUIRED] Steps to reproduce
Create a Cloud Storage triggered function.
Scope function to a specific bucket
Upload a file to that specific bucket
Upload file to any other or default bucket
Function should have triggered both times despite being scoped to only run once.
The expected behavior is that the Cloud Function should only run when a file is uploaded to the scoped cloud bucket.
[REQUIRED] Actual behavior
It actually runs no matter what bucket I uploaded it to on the local emulator. However, the expected behavior is correct if the function is deployed to firebase.
The text was updated successfully, but these errors were encountered:
[REQUIRED] Environment info
firebase-tools: 9.23.0
Platform: macOS 12.0.1 (Intel Mac)
[REQUIRED] Test case
I am trying to scope a Cloud Storage triggered cloud function to a specific storage bucket as the documentation explains here: https://firebase.google.com/docs/storage/extend-with-functions. However, on the local emulator, the function is run no matter what bucket a file is uploaded to. This appears to be a bug in the local emulator because if I deploy the same function to Firebase it runs as one would expect there.
[REQUIRED] Steps to reproduce
Sample Code:
export const transformProfileImage = functions.storage.bucket('scoped_bucket_name').object().onFinalize(async (file) => { console.log(file.name); });
[REQUIRED] Expected behavior
The expected behavior is that the Cloud Function should only run when a file is uploaded to the scoped cloud bucket.
[REQUIRED] Actual behavior
It actually runs no matter what bucket I uploaded it to on the local emulator. However, the expected behavior is correct if the function is deployed to firebase.
The text was updated successfully, but these errors were encountered: