PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.89k stars 5.27k forks source link

[FEATURE] Enable custom database URL for Firebase Admin SDK #8551

Closed malexanderlim closed 12 months ago

malexanderlim commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, Firebase Admin SDK only supports the default database. On Blaze paid plans, a single project can contain multiple databases.

https://github.com/PipedreamHQ/pipedream/blob/1ec061d5d5edbc75471059420d287ac85d1acc4b/components/firebase_admin_sdk/firebase_admin_sdk.app.mjs#L88

databaseURL: `https://${projectId}-default-rtdb.${region}/`,

This request is to be able to set custom database urls if the user provides one using the custom field customDatabaseUrl; there is some documentation here that shows how this can be implemented: https://firebase.google.com/docs/database/usage/sharding#connect_your_app_to_multiple_database_instances

In this implementation, we would default back to the https://${projectId}-default-rtdb.${region}/ if the user does not provide anything in the optional custom field customDatabaseUrl, but if a user does provide an optional custom database URL, we would use that, e.g. user specifies: https://third-db-reference.firebaseio.com/ and we would use that instead of the default.

Screenshot 2023-10-20 at 3 20 44 PM
samwellb commented 12 months ago

This would really unlock the Firebase integration inside Pipedream for us. Thank you!

vunguyenhung commented 12 months ago

Hi everyone, all test cases are passed! Ready for release!

Test report https://vunguyenhung.notion.site/FEATURE-Enable-custom-database-URL-for-Firebase-Admin-SDK-814317e2f3f24d86bc64e9db7c6ea3f3