Commit Graph

62 Commits

Author SHA1 Message Date
Harsh Mange
25d8d3ed03
fix: [#21180] Firestore plugin -> "Timestamp Path" fix (#22646)
## Description

> Firestore plugin -> "Timestamp Path" field must not be required field
(isRequired: false)

Closes #21180 

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist:
### Dev activity
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-27 11:03:22 +05:30
PiyushPushkar02
ac63cadf24
fix: Firestore Invalid DS Test Success (#21954)
## Description

- The following PR fixes the issue where the firestore test data source
was returning success even after providing an invalid project id.
- The PR address the invalid project id only not the db URL as it is
fetched from the auth json If the URL is invalid in user provided entry.
Also, the value is mutable at runtime from the firestore side.
- For more detailed description of the following can be found in the
notion doc here:
https://www.notion.so/Firestore-c3f5c816a68a45b18395da74be97d666

Fixes #21373 

## Type of change

- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?
- Manual
- JUnit

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-13 15:47:35 +05:30
Shrikant Sharat Kandula
4280ded88e
chore: Fix unnecessary re-shading of jars (#21994)
Solves a single thing in the build configurations, resulting in a few
wins.

1. Reduced number of warnings in the output.
   1. In release branch:
      ```
mvn clean package -DskipTests | grep --fixed-strings --count '[WARNING]'
      3233
      ```
   1. In this PR's branch:
      ```
mvn clean package -DskipTests | grep --fixed-strings --count '[WARNING]'
      172
      ```

2. All uber-jar files are shaded twice, currently. Once with the default
execution of `maven-shade-plugin`, and again with the `shade-plugin-jar`
execution in these `pom.xml` files. This is double-work, and is the
cause of most of the warnings we see.
1. This `shade-plugin-jar` was added to have the plugin information
included in the `/META-INF/MANIFEST.MF` file, since we can't configure
the default execution of the shade plugin (it comes to us from Spring
Boot).
2. Instead, we switch to configuring plugin information in a
`/plugin.properties` file.
3. Previously, we used `/plugin.properities` for plugin information in
dev time, and `/META-INF/MANIFEST.MF` in production. This PR will change
it so that we use `/plugin.properties` all the time. We configure PF4J
with a custom plugin manager to achieve this.

3. Moved all `plugin.properties` into `src/main/resources`, so that they
land up in the root of the final jar files. But this means, during
development, loading the plugin fails since it looks for a
`plugin.properties` at the root of the plugin module, i.e., next to the
`src` folder.
1. For this, in the custom plugin manager class, we change where we look
for the `plugin.properties` file during development mode. In this mode,
we look at the `target/classes/plugin.properties` file, which is where
maven saves this file, taken from
`src/main/resources/plugin.properties`.
2. This also solves the duplication of the plugin properties that's
currently present, between `plugin.properties` and the `<properties>`
section of `pom.xml` files.


Here's the shade plugin's default execution and configuration, from
Spring Boot:
https://github.com/spring-projects/spring-boot/blob/v3.0.1/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/build.gradle#L174.
2023-04-03 17:49:21 +05:30
ChandanBalajiBP
b72dea33f3
feat: Error handling phase 1 (#20629)
## Description
This PR updates the error logs 
- Establishing a consistent format for all error messages.
- Revising error titles and details for improved understanding.
- Compiling internal documentation of all error categories,
subcategories, and error descriptions.

Updated Error Interface:
https://www.notion.so/appsmith/Error-Interface-for-Plugin-Execution-Error-7b3f5323ba4c40bfad281ae717ccf79b

PRD:
https://www.notion.so/appsmith/PRD-Error-Handling-Framework-4ac9747057fd4105a9d52cb8b42f4452?pvs=4#008e9c79ff3c484abf0250a5416cf052

>TL;DR 

Fixes # 


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual
- Jest
- Cypress

### Test Plan


### Issues raised during DP testing


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: subrata <subrata@appsmith.com>
2023-02-18 18:25:46 +05:30
Nidhi
01d665898a
fix: Added Firestore pagination paths to self referencing candidates (#19412)
## Description

Firestore requires cursor based pagination which means that a query that
needs to be paginated will most definitely also refer to the same widget
that is consuming the query data. This introduced a cyclic dependency in
the dependency graph for such apps. This fix uses the concept of self
referencing paths to ignore the pagination related fields in Firestore
for all dependency calculations.

Fixes #19256 

## Type of change
- Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?
- Manual
- ?

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-01-05 13:03:52 +05:30
Nikhil Nandagopal
2f2cb42e02
fix: Fix firestore plugin Configuration (#19281)
## Description

The firestore query fields were very difficult to understand and use.
This PR cleans up the UI to help make it simpler.

## Type of change
- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?
- Manual
2023-01-02 18:24:18 +05:30
Nidhi
dfccd5a058
chore: Upgrade to Spring Boot 3.0.1 (#19044)
This upgrade takes care of our move to JDK 17, Spring Boot 3.0.1 and a
few other security upgrades along the way.

Fixes #18993 

TODO:

- [x] Check CI changes for Java 17
- [x] Check vulnerability report
- [x] Mongock needs an upgrade
- [x] Add JVM args at all possible places for exposing java.time module
- [x] Add type adapters everywhere / use the same config for type
adapters everywhere
2023-01-02 19:40:59 +07:00
Nidhi
5329010415
fix: Refactor entities based on AST parsing logic (#18517)
* feat: Refactor entities based on AST parsing logic

* Deleted jmh file

* rts updates for the edge cases

* adding jest test cases

* update review comments

* Fixed issue with references outside of bindings and some other stuff

* Added tests for DSLUtils

* bug fix 18699

* Test fixes

* Test fixes

* Review comments

* Changed type to boxed

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
2022-12-12 08:12:21 +03:00
subratadeypappu
19e2e5785e
Fix/16994 refactor common datatype handling (#17429)
* fix:Add array datatype to execute request

* feat: Consume and store type of array elements in Param class (#16994)

* Append param instead of clientDataType in varargs (#16994)

* Refactor common data type handling w.r.t newer structure (#16994)

This commit takes care of the following items:
- It minimizes the number of usage to the older stringToKnownDataTypeConverter method
- Modifies the existing test cases to conform to the newer structure
- Marks stringToKnownDataTypeConverter method as deprecated to discourage further use

* Remove comma delimited numbers from valid test cases (#16994)

* Fix extracting clientDataType from varargs in MySQL (#16994)

* Pass param as a dedicated parameter in json smart replacement (#16994)

* Remove varargs from json smart replacement method (#16994)

* Move BsonType to mongoplugin module (#16994)

* Introduce NullArrayType and refactor BsonType test cases (#16994)

* Add new test cases on numeric string with leading zero (#16994)

* Refactor test case name (#16994)

* Add comment on the ordering of Json and Bson types (#16994)

* Add comment on the ordering of Json and Bson types (#16994)

* Add NullArrayType in Postgres and introduce postgres-specific types (#16994)

* Add data type test cases for Postgres and change as per review comments (#16994)

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
2022-10-18 11:02:37 +05:30
Nidhi
c3e935ef40
fix: Remove datasource connection from cache when datasource is deleted (#17364)
* Changes to testDatasource interface method and archive flow

* Tests for plugin level testDatasource implementations

* Added test for refreshing cache on deleting datasource

* Modified warnings to errors in logs

* Fixed test

* Fixed test
2022-10-17 10:31:26 +05:30
Aman Agarwal
78c89894f8
fix: updated settings page design (#16990)
fix: updated settings page design
2022-10-06 16:36:29 +05:30
Nidhi
66f3dfe790
chore: Move to Jupiter JUnit5 (#17083)
* Upgrading to Jupiter tests for everything but plugins

* Whoops, too soon

* Fixed failing tests

* Imports fixed

* Removed PowerMock dep and JUnit4 from interfaces

* Woohoo! That's testcontainers

* Added maven enforcer to disallow junit4

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/GitServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserWorkspaceServiceTest.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Update app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Weird formatting and version upgrades

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-29 08:54:07 +05:30
Ayangade Adeoluwa
1ecffb8272
fix: Modify Form Control Inputs for various Datasource Actions (#15396)
* Modify control type for MongoDB Collection field

* Make more form control changes across datasources

* Fix cypress errors

* Fix typescript error

* Fix more cypress tests

* Fix failing MongoDBShoppingCart spec

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-08-09 13:05:59 +00:00
Nidhi
6df4dafead
chore: Better server logging infra (#15440)
* Fixed a bunch of server side logging issues

* Tests

* Added ISO8601 timestamp to log format
2022-07-28 09:40:03 +05:30
Shrikant Sharat Kandula
bba78afc3b
chore: Upgrade dependencies reported by Dependabot (#13735)
Upgrades vulnerable dependencies in all plugins except for MySQL. That one is still failing and I'll fix it in a separate PR. Issue #14475

Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
2022-07-19 10:23:27 +05:30
Nidhi
906a7298dc
feat: Simplified Google Sheets queries (#14869)
* Client changes 1

* add DSL functionality

* Temp commit for refactoring changes

* Do I even know what I'm doing here?

* chore: Second GS layout

* Update: Visibility conditional outputs for schemas

- Added the output from conditional outputs for schema children too

* Update: Entity selector visibility control

- Added logic for controlling visibility of sub components via the JS expressions system

* Update: Passing disabled prop to toggle button

* Update: Passing disabled prop to toggle btn

* Update: Styled component for toggle button

- Added disabled styles based on the disabled prop sent to the toggle form view JSON button

* Update: configProperty role in Entity Selector

- Removed dependance of the configProperty of the entity selector children to it's parent component

* Update: type of placeholder key

- Made placeholder key from form config JSON to accept either string or an object
- Earlier only string was accepted
- This is for pagination component

* Update: Added placeholder control for pagination

* Client changes 1

* add DSL functionality

* Do I even know what I'm doing here?

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design

* fix: updated tooltip component for wrong ui on entity explore

* temp triggers

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design (#12395)

* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design

* fix: updated tooltip component for wrong ui on entity explore

* fix: updated tooltip ui, where condition placement, sort by ui

* temp form data access logic

* fix: updated sorting type width ui

* fix: updated ui for spacing, width and text issues

* Update: Type for tooltip of UQI forms

- Added option to send an object to the tooltipText object.
- This allows for composite components like pagination to have tooltips for each sub component

* Update: tooltip for pagination component

- Added handling to parse the tooltip for multiple components.
- This allows for composite components like pagination to have tooltips for each sub component

* Update: Type cast for tooltip component

- Made the content passed to tooltip component as a string only

* Update: Fixed tooltip component CSS

* Update: Dropdown option component

- Added a tooltip wrapper to each option
- This is to show on hover text like disabled state

* fix: updated ẇhere clause broken ui for condition

* Add: functions to check and extract expressions

- Loop through the formConfig and find any keys that have a value that is bindable
- Used pre defined regex to check if value is a moustache binding

* Add: Types for evaluated form configs

- Added types for the form configs to be evaluated and their output post eval

* Add: Flow to run the form config

- Run the form config and update the result to the redux state

* Update: Name of the type for formconfigs

- Updated since it was clashing with a component of the same name

* Add: Function to enforce config type checks

- This is done so that the improper configs can be weeded out and the rest of the form can be shown

* Add: Function to update evaluated config

- Added option to update the config if it's values needed evaluation

* Add: Type check for schema sections

* Update: Error handling for invalid control type

- We were throwing an exception till now, changed it to a warning text

* Add: Exposed tooltip for dropdown option disabled state

* Update: switch to json mode functionality

- Added logic to convert data to a string rather than an object when the first switch to JSON mode happens

* Update: Added key to tooltip for dropdown options

* Trigger API modification

* Add: function to fetch default trigger URL

* Update: Made URL optional in dynamic trigger config

* Update: Dynamic trigger API call

- Made the API call for dynamic triggers have URL as optional field
- Added type check to the response of the API call

* Update: resp type for trigger APIs

* Update: Moved code to utils folder

- Moved functions for UQI form eval processing to utils file

* Update: passing original controltype to JS switch

* Update: config for JSON editor mode

- Updated the config to have different options for JSON mode depending on the original control type

* Update: Connected line numbers flag to config

* Revert: CSS changes for tooltip

* Refactor: Removed consle

* Add: type for the config of dynamic values

* Add: Feature to evaluate config for triggers

* Refactor: fix type check errors

* fix: dropdown ui width with text alignment

* Update: fixed selector for dynamic values

* Update: selector call for fetchDynamicValues

* Add table header index prop for columns selector

* migration partial commit

* migration partial commit

* Refactor: removed unused import

* Update: reused function for checking dynamic value

* Update: removed unused import

* Fix format JSON issues

* Retrieve binding paths from entity selector components

* Fixes 6 remaining issues with UQI implementation

* Fix dropdown issues

* Fix dropdown height issues and fixes triggering of APIs when option is deselected

* Migration changes

* Fix QA generated UQI issues

* Fix projection component height and route change logic

* Fix multi select dropdown placeholder text issue and json stringify issue with switching view types

* Reset entity type value when command value changes

* Test changes

* Review comments

* Moved migrations around

* Corrected import statement

* Added JSON schema migration

* Updated schema version

* perf improvements and filter dropdown options feature

* Fix Code mirror component config for toggleComponentToJson input fields.

* Fix prettier issues

* fix prettier issues

* Fix style issues as a result of the merged conflicts

* Fix failing test case

* Fixed a few other flows (#14225)

* Fixed a few other flows

* Review comments

* Fix generate CRUD, fix evaluation of dynamic bindings and fix various styling issues.

* More fixes (#14367)

* Factor in the root formconfig parent key.

* Fix flickering issues, and evaluatedFormConfig issues

* fix: Teeny bugs (#14455)

* Teeny bugs

* Added previous functionality as is

* Improvements in the way we fetch dynamic values

* Fix stringiification issue and cyclic dependency issues

* Resolve projection component values deletion

* Resolve merge conflicts and fix prettier issues

* fix: Tsc issues

* Fix property pane connection navigation

* updating ee locator

* updating inputfield locator

* dropdown locator update

* Merge conflict not properly resolved.

* Fix s3 spec

* Fix Mongo Spec

* Fix some more tests

* fix: prevent cyclic dependency when switching to js mode (#14668)

* add delete events for change from array to string in diff

* add test to assert absence of cyclic dependency error when switching to js in switchgroup widget

* Assert that evaluation is not disabled when no cyclic dependency happens

* Cypress test preparations for google sheets and form controls

* Fixed a few test errors (#14874)

* Add: unit tests for uqi UI updates

- view type tests
- conditional output extraction
- processing conditional output to handle view/enabled state of the component

* Add: completed isValidFormConfig test

* Update: improved tests for update config

- These tests cover the functionality to update a section config after it's components are done evaluating

* Fix failing cypress tests and cyclic dependency issue

* Fixes some more tests

* Fixed migration of row objects (#14896)

* Bumped the version of design system package

* Update: reverted change to EE selector

* Fix deletion pointer

* Update: selector for js on load spec

- Synced with changes related to ADS dropdown

* Fix mongoDBShoppingCart spec

* Remove comments

* Fix: mongo shopping cart test failures

* fix: mongo shopping cart spec

* Dummy push to retrigger vercel

* fix: mongo shopping cart spec

* Update MongoDBShoppingCart_spec.js

* fix: removed unused click away

* dummy commit

* Update: moved helper functions to separate file

* Add: added tests for saga functions

- Worked on testing for
   - extractFetchDynamicValueFormConfigs
   - extractQueueOfValuesToBeFetched

* Add if check for queueOfValuesToBeFetched

* Resolve review comments

* Empty-Commit

Co-authored-by: Irongade <adeoluayangade@yahoo.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com>
Co-authored-by: Albin <albin@appsmith.com>
2022-07-04 11:13:27 +05:30
Leo Thomas
c8fce60831
fix: Firestore where condition issue (#12929)
* Fix 11141-Added JDBC override parameter for resolving Cast Errors with timestamp

* Firestore Where condition Unit Test for Arrays

* Code review comments update

* removed two unrelated file somehow added here from the previous PR

* Code review comments update V2

* Code review Comments Fix - Second

* Removing the frontend Changes related to dropdown width

Co-authored-by: Leo Thomas <leoweb2010@gmail.com>
2022-05-06 13:58:17 +05:30
Sumit Kumar
a486474483
rename variable. (#12204) 2022-03-24 16:38:52 +05:30
Sumit Kumar
47ad7cc9b1
feat: add JSON smart substitution feature to Firestore plugin actions
* This PR adds the JSON smart substitution feature to Firestore plugin actions.
* This smart substitution will work exactly the same way as it works for REST API actions.
* Currently, smart substitution only gets applied to the body section of Create, Set, Add or Update commands as this is the only input field that expects a JSON input type.
* It can be toggled On/Off via the Settings tab.
* It is set to On by default. However, data migration has been added to set it to Off for all existing Firestore actions so that they are not impacted by this PR's changes.
2022-03-24 13:02:54 +05:30
Nidhi
c97b7e31e7
chore: Migrations to enable JSON and form mode (#11534)
* feat: added new component to perform generic json raw toggle functionality

* chore: Migration to convert formData references

* fix: Redid migration for per plugin changes, fixed consumption

* fix: Added JSON migration for git import

* Added JSON migration as well

* Reverted client side changes

* fix: Modified plugin config aggregation logic

* Merge conflict fixes

* different paths for different commands

* Whoopsie

* Modified usage to different paths

* Reverting env change

* Config changes to show json mode

* Test fixes

* Migrated body,path,next,prev

* Cypress test fixes

* Modified dynamic binding replacement

* Changed view type

* Reverted json form mode display

* Modified structure of JSON mmigrations

Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-03-21 11:22:14 +05:30
devnamrits
406fa0cc3d
fix: firestore queries asterisk (#11599)
* fix: remove asterisk from non-mandatory fields in firestore query

* making one false

* fix: remove asterisk from non-mandatory fields in firestore query

* fix: remove asterisk from non-mandatory fields in firestore query

Co-authored-by: Hritik Kumar <devnamrits@Hritiks-Mac.local>
2022-03-03 22:08:44 +05:30
Nidhi
8b1638aba6
chore: Modified plugin config aggregation logic (#11561)
* fix: Modified plugin config aggregation logic

* Modified logs a bit

* Reverted incorrect path from another branch
2022-03-03 19:26:55 +05:30
Leo Thomas
6e7687450e
fix: 9414 Firestore where clause not fetching numbers (#10775)
* Fixed issue with Firestore in fetching data while using numbers in the where condition.
* Other Fixes made in the where condition :
  When using Boolean
  When using Date 
  When Using Timestamp 
  When given space in the key
  When Space given in the Value
2022-02-08 11:29:50 +00:00
Sumit Kumar
b8cfc18f7f
fix: fix firestore pagination cyclic dependency error (#9892)
* fix firestore pagination cyclic dependency error
fix firestore UQI migration error

* fix TC
2021-12-21 11:27:05 +05:30
Arpit Mohan
96677ef673
fix: Updating log4j to 2.17.0 to prevent JNDI lookups (#9863)
Also making minor edit to not show "Application name updated" toast message. This is a counter-productive toast that is distracting the user
2021-12-20 16:01:08 +05:30
Sumit Kumar
7909ae8680
feat: port Firestore plugin to UQI (#9393)
* Port Firestore plugin to UQI schema
* This PR implements a non-functional requirement i.e. from an end user perspective there is no change in the features that the plugin provides. However, the underlying DSL to render and interpret the query interface has been updated.
* It also involves a migration change to port existing Firestore plugin actions to the new UQI schema.
2021-12-16 13:31:09 +05:30
Trisha Anand
659d7c3866
feat: Where condition helper library using H2 in memory database (#7592) 2021-09-19 20:33:47 +05:30
Arpit Mohan
3a071864dd
fix: Fixing the previous page pagination for Firestore (#7374)
The problem was that the pagination was designed & tested with only 2 pages. Firestore has a different function `limitToLast` which solves for previous page pagination commands.
2021-09-13 09:07:30 +00:00
Sumit Kumar
42273043da
- change action editor field label (#6845)
* The input box label in the Firestore plugin action editor reads Document / Collection Path which is misleading since a document is nested inside a collection and not the other way round. Hence changing it to Collection / Document Path
2021-08-25 16:04:51 +05:30
Snyk bot
652ad3506a
fix: app/server/appsmith-plugins/firestorePlugin/pom.xml to reduce vulnerabilities (#5864)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JAVA-IONETTY-1317097
2021-07-26 08:26:40 +00:00
Sumit Kumar
7787a0ddac
Bug Fix: Fix dynamic binding substitution failure with Firestore where condition input boxes. (#5280)
Modify dynamic binding substitution method to handle list and map types containing generic type values.
2021-06-21 19:36:06 +05:30
Nidhi
57adbd7777
Schema info in templates query (#5244) 2021-06-18 11:31:17 +05:30
Sumit Kumar
d2a74b5ac9
Feature: firestore plugin support for multiple where conditions (#3740)
* allow users to add multiple where conditions to firestore's get documents query.
2021-06-07 10:43:16 +05:30
Sumit Kumar
247e5d7ea4
Feature: return prepared stmt / smart substitution params under request params section for debugging (#4421)
- return prepared stmt / smart substitution params under request params section for debugging
2021-05-17 08:59:17 +05:30
Sumit Kumar
52bfd25824
Feature: return request parameters with type for debug tab (#4078)
- return request parameters with type for debug tab.
- request params are stored in a RequestParamDTO object.
- a configProperty -> label map is cached in pluginService, which returns the param label as per the configProperty it is mapped to via editor.json file.
- This feature currently only works with prepared statements disabled.
2021-04-30 16:26:51 +05:30
Trisha Anand
eeaa26a7cc
Type migration from String to Object for plugin specified templates to preserve boolean and any other future data types (#4053)
* WIP : Type migration from String to Object for value

* Migrating config from string to boolean for prepared statement.
Handled error for already stored actions where PS config is stored as String and not Boolean.
2021-04-20 16:09:48 +05:30
Sumit Kumar
41e44eed30
Feature: add title to action execution errors to improve user experience (#3872)
- add title to action execution errors to improve user experience
    - all errors in AppsmithPluginErrors
    - action execution related errors in AppsmithError : NO_CONFIGURATION_FOUND_IN_DATASOURCE, INVALID_ACTION, INVALID_DATASOURCE, INVALID_DATASOURCE_CONFIGURATION - as these are the likely errors in an action execution flow (excluding plugin specific flow) that might result from faulty action / datasource configuration by a user.
    - title is returned as part of ActionExecutionResult.
    - title is set in ActionExecutionResult on failure during action execution.
    - In response to review comment - added a new BaseException class, so that both AppsmithException and AppsmithPluginException extend this base class. Also, refactored code to introduce setErrorInfo() function in ActionExecutionResult class to set its attributes.
- Some unrelated cleanup:
    - catch PoolInitializationException for Postgres plugin and return AppsmithPuginException
    - catch MongoTimeoutException and return AppsmithPluginException
2021-04-08 09:49:05 +05:30
Sumit Kumar
efa4ae072c
Firestore plugin support for FieldValue.delete() and FieldValue.serverTimestamp() values (#3693)
- Allow users to define key path for FieldValue.delete() and FieldValue.serverTimestamp() values.
- delete() value is only valid for update operation, as Firestore does not seem to support it for any other ops.
- serverTimestamp() is valid for all operations excluding get and delete operations.
2021-03-30 17:19:24 +05:30
Nidhi
683176fc48
Increased default limit for webclient payload (#3718)
* Increased default limit for webclient payload
2021-03-26 21:34:10 +05:30
Trisha Anand
217e36aaa9
Enrichment of analytics event for execute. (#3492)
* WIP : enrichment of analytics event for execute.

* Plugin level : Catch all exceptions and set request in the result
Server level : Adding new fields to analytics : `isSuccessfulExecution`, `statusCode`, `timeElapsed`

* Dont catch StaleConnectionException. Server handles the same.

* Removed class specification for onErrorResume in plugins since its supposed to catch all errors.
2021-03-11 15:40:07 +05:30
Sumit Kumar
aaf4ce95f2
use dynamic input text in plugin editor forms (#3470)
- Use dynamic input text for plugin editor forms so that the evaluated value of mustache expression is visible.
- Those fields which are meant to store Key only - i.e. they are not visible to the user and are only meant to provide key for key value pair in db have been skipped.
2021-03-10 12:29:19 +05:30
Shrikant Sharat Kandula
bb49f04f06
Support descending ordering for Firestore documents (#3340) 2021-03-03 18:18:57 +05:30
Sumit Kumar
e5586a590a
fix placeholderText label in form.json files (#3331)
fix placeholderText label in form.json files
2021-03-03 09:33:02 +05:30
Trisha Anand
91e308665b
Requests preparation by plugins instead of ActionService (#3159)
* Added action request in S3 plugin.

* Added request data in Dynamo plugin

* Added request in Elastic Search.

* Request in Firestore.

* Request added in Mongo

* MsSQL request added.

* Added MySQL request.

* Added Postgres request.

* Added redis request.

* Redshift doen.

* Catching AppsmithPluginExceptions at the plugin level itself to ensure that the request gets passed on as part of the result.

* Fixed failing plugin test failures

* Fixed AmazonS3 test failures.

* WIP post analytics working

* WIP : Making the request data confirm to existing analytics request data format.

* Fixed the headers in the analytics body.

* Migrations S3, Postgres to the accepted format for request in analytics

* Updated S3 action to be the query

* Migration completed for all plugins for analytics.

* Removed the old analytics event. Now sending only the new one.

* Ensuring all data is captured in S3 plugin request in case of error.

* Minor editing of firestore to ensure that the errors get caught by the plugin itself.

* Fixed test cases in Amazon S3

* Incorporated review comments.
2021-03-02 10:58:46 +05:30
Sumit Kumar
68e6c7b1d8
stop logging datasource argument error externally. (#3262)
- Stop logging datasource argument error externally. The error described in the linked GitHub issue arises due to bad service account credentials provided as arg.
- Update error msg to make it clear.
- Add TC.
2021-03-01 12:13:32 +05:30
Trisha Anand
31b20da347
Adding support for NULL value parameters in Prepared Statement. (#3255) 2021-02-27 18:59:51 +05:30
Shrikant Sharat Kandula
68bbc4fb28
Support server-side pagination for Firestore (#3128)
* POC for Firestore server-side pagination

* Load pagination information values from action configuration

* Get execution information for Firestore plugin

* Working implementation of pagination for Firestore

* Add tests for next and previou page navigations

* Require ordering to be set when paginating

* Remove commented code

* Don't report error on bad configuration

* Error out on usupported operation

Co-authored-by: Trisha Anand <trisha@appsmith.com>

* Move constant indices to constant fields

* Use executeParameterized instead of execute

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2021-02-24 10:20:08 +05:30
Shrikant Sharat Kandula
198abbf37d
Rename the $ref field to _ref in Firestore plugin (#3135) 2021-02-22 13:57:04 +05:30
Shrikant Sharat Kandula
b9cb76e7e5
Include Firestore document metadata in responses (#3063) 2021-02-16 22:09:09 +05:30
Shrikant Sharat Kandula
c5df149ba8
Add IN operator support for forms' hidden fields (#2939) 2021-02-10 11:27:21 +05:30