-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: prioritize custom database URL in Firestore plugin #41494
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
base: release
Are you sure you want to change the base?
fix: prioritize custom database URL in Firestore plugin #41494
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughDatasource initialization and teardown for the Firestore plugin were modified: FirebaseApp is now initialized with provided options (and reinitialized on IllegalStateException after deleting an existing app), and datasourceDestroy removes the FirebaseApp instance when present. Several non-functional formatting and TypeReference adjustments were made. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
🔇 Additional comments (5)
app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java (5)
147-150: LGTM!Minor comment reformatting for readability. No behavioral change.
207-208: LGTM!Straightforward reformatting of the ternary expression.
949-953: Core fix looks good — custom database URL is now passed to FirebaseOptions.This addresses the PR objective of prioritizing the custom database URL. However, see the comment below regarding the fallback behavior that may undermine this fix.
383-384: LGTM!Diamond operator usage with
TypeReference<>is idiomatic and cleaner.Also applies to: 430-432
1032-1056: LGTM!Reformatting of
getStructuremethod improves readability without changing behavior.
...ver/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
Outdated
Show resolved
Hide resolved
...ver/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
Outdated
Show resolved
Hide resolved
|
Hi Appsmith Team! I've addressed the initial feedback from CodeRabbit regarding stale FirebaseApp instances. I've updated datasourceCreate to delete existing instances before re-initialization and implemented datasourceDestroy for proper cleanup. Ready for review when a maintainer is available. Thanks! |
Description
Tip
This PR fixes an issue where the Firestore plugin ignores the custom Database URL provided in the datasource configuration. Previously, it would default to the main project instance even if a specific URL was provided
Fixes #
38121Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags=""
🔍 Cypress test results
Caution
If you modify the content in this section, you are likely to disrupt the CI result for your PR.
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.