appsmith
appsmith copied to clipboard
fix:added a method to identify the data types properly and show in th…
Description of PR
- this pr contains the changes to handle the data types from the user regarding feature
Changes in PR
- In this PR added a method ,which takes the json data and it identifies the datatypes, then saves in firestore as expected.
fixes- #7176
output
- below are the screen shots , after sending the data, they are stored in firestore with proper datatype format.
below is the screen shot, when we try to get the documents then they are also represented based on their format
Summary by CodeRabbit
-
New Features
- Enhanced data handling capabilities for geolocation and timestamp data in the Firestore integration.
- Improved validation for Firestore document references.
- Added robust data conversion methods for better formatting of Firestore data.
-
Bug Fixes
- Fixed issues related to incorrect formatting of timestamp and geolocation data.
-
Tests
- Introduced a new test suite for validating the functionality of the Firestore plugin against an emulated Firestore environment.
Walkthrough
The updates to the FirestorePlugin class significantly enhance its functionality, specifically in handling geolocation and timestamp data. New constants and a regex pattern improve data validation, while modifications to the methodAddToCollection and resultToMap methods ensure accurate data conversion and formatting. These changes facilitate better integration with Firestore, leading to more consistent and usable data within the application.
Changes
| File Path | Change Summary |
|---|---|
app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java |
- Added constants for geolocation (LATITUDE, LONGITUDE) and Firestore timestamps (SECONDS, NANO_SECONDS). - Introduced REFERENCE_PATTERN for validation. - Updated methodAddToCollection for improved handling of geolocation and timestamps via checkAndConvertDataType. - Enhanced resultToMap for better formatting of Timestamp and GeoPoint. |
app/server/appsmith-plugins/firestorePlugin/src/test/java/com/external/plugins/FirestorePluginExecutorTest.java |
- Introduced a test suite for FirestorePluginExecutor using JUnit and Testcontainers. - Implemented testMethodAddToCollection to validate document addition and data types in Firestore. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.
Hii @somangshu @NilanshBansal @Nikhil-Nandagopal , this PR has been approved , can you merge the changes !!
thank you.
@Naveen-Goud this needs further testing from our end. We will be prioritising this in the next week. cc: @rohan-arthur @carinanfonseca
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.
Hi @rishabhrathod01, I have resolved the comments.Can you review the updated code. thank you.
@Naveen-Goud the server unit test is failing for above PR, could you please check.
Hii @rishabhrathod01 , I have updated the test files and removed few statement in FirestorePluginTest, since they are covered in test file firestorePluginExecutorTest which contains the test cases that I have written.
thank you.
@Naveen-Goud could you please resolve the merge conflict by taking pull from latest release?
Hii @rishabhrathod01 , I have resolved the merge conficts , could you review this PR.
thank you.
@Naveen-Goud there are server unit tests that are failing on the PR, could you please resolve them?
cc: @NilanshBansal I have unassigned myself here from the reviewer, we could re-assign the reviewer to this PR.
Hi @NilanshBansal ,I have checked the test case failing files, those files are not related to the changes I have made.
thank you.
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.
This PR has been closed because of inactivity.