Commit Graph

40 Commits

Author SHA1 Message Date
Anna Hariprasad
7aae152dee
fix: logger-not-working-in-plugins (#36231)
Fixes #36073 

Hi @NilanshBansal 

**Issue :**

**Missing Logging Implementation :**

- Without a logging implementation (such as SLF4J Simple or Logback) in
the project's classpath, the logging statements in the plugins cannot be
executed.
- As a result, no log output is being printed to the terminal.

**Solution :**

The solution is to add a logging implementation to the plugins parent
pom. In this case, you can add the slf4j-simple dependency to your
pom.xml file. This will provide a simple logging implementation that
will output log statements to the console.

```
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.7.36</version> 
</dependency>
```
**Explanation:**

- slf4j-api provides the SLF4J API, which is the interface for logging.
  provides the SLF4J API, which is the interface for logging.
- slf4j-simple provides a simple implementation of the SLF4J API, which
is responsible for actually printing the log messages to the console.

**Screenshots :** 

Amazon S3 Plugin and Postgres Plugin 

![image](https://github.com/user-attachments/assets/d3e90b96-2b02-493d-8ffa-44e2aa348fc1)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced logging capabilities with the integration of SLF4J API and
SLF4J Simple implementations.

- **Improvements**
- Improved log management and output formatting for better monitoring
and debugging across various plugins, transitioning from standard output
to structured logging.
- Refined logging practices in multiple plugins to support better
maintainability and performance.
- Removed method for console logging from the Stopwatch class to
streamline logging practices.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-17 10:47:58 +01:00
albinAppsmith
66c815f1cb
feat: Migrate DBform to UQI config (#36168)
## Description

This PR migrates the plugins which were old DBForm config to UQI config.
Plugins that got affected,
1. Snowflake
2. ArangoDB
3. Oracle
4. PostgreSQL
5. MySQL
6. Elasticsearch
7. DynamoDB
8. Redis
9. MSSQL
10. Redshift


Fixes #35496
Fixes #35497
Fixes #35500
Fixes #35487 
Fixes #35490 
Fixes #35491
Fixes #35499
Fixes #35501 
Fixes #35502
Fixes #35506 
Fixes #35890

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10897087023>
> Commit: e8fe475a48aac1e2e1f3184181ae0bed154313ba
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10897087023&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Tue, 17 Sep 2024 06:07:27 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced rendering logic in the Query Editor to support additional UI
component types.
- Improved handling of form evaluations and query configurations across
various plugins, including ArangoDB, DynamoDB, Elasticsearch, and
others.
- Introduced structured layouts for editor configurations, enhancing
clarity and usability in multiple database plugins.

- **Bug Fixes**
- Adjusted control flow in sagas to ensure proper handling of UI
component types, improving user interactions.

- **Chores**
- Refined JSON configurations across multiple plugins for better
organization and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-17 14:22:32 +05:30
Nilansh Bansal
1c14d698f1
chore: added thread logging info for plugins (#36077) 2024-09-05 17:19:57 +05:30
Nilansh Bansal
fe7ca6b98e
chore: added prettier spotless plugin for json files (#35447)
## Description
This PR adds the spotless formatter and validator for the JSON files
present in the project. If there is any invalid JSON file, the formatter
fails and logs the file and the error LOC to be fixed.
It uses the `prettier JSON` formatted in spotless for the same.
Since Spotless is already added to the pre-commit hook it also makes it
necessary to fix the JSON and then commit the changes.

- The prettier JSON formattor preserves the order of the keys.
- Indendation of 2 spaces has been added in the config

Screenshot of the errors displayed for Invalid JSONs
<img width="1427" alt="image"
src="https://github.com/user-attachments/assets/00bbd61c-7414-4787-b9ac-2f0d392f6f33">

### Last attempt to resolve this issue
The formatted used was `simple JSON` which led to change in order of
JSON keys.
PR: https://github.com/appsmithorg/appsmith/pull/35395
Ref:
https://theappsmith.slack.com/archives/CGBPVEJ5C/p1722929754593669?thread_ts=1722916121.682699&cid=CGBPVEJ5C


Fixes #34969 

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10264348935>
> Commit: 4957b647f3d5e0f9853e7f391411b62ee189547b
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10264348935&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 06 Aug 2024 12:40:47 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-08-08 09:16:03 +05:30
Nilansh Bansal
3b3f64f1c0
Revert "chore: added JSON files linting check" (#35445)
Reverts appsmithorg/appsmith#35395
Reverting this PR as the formatter changes the sorting order of the keys
of our JSONs which affects our UI.
Ref:
https://theappsmith.slack.com/archives/CGBPVEJ5C/p1722929754593669?thread_ts=1722916121.682699&cid=CGBPVEJ5C
2024-08-06 14:15:23 +05:30
Nilansh Bansal
486662a2ed
chore: added JSON files linting check (#35395)
## Description
This PR adds the spotless formatter and validator for the JSON files
present in the project. If there is any invalid JSON file, the formatter
fails and logs the file and the error LOC to be fixed.
Since Spotless is already added to the pre-commit hook it also makes it
necessary to fix the JSON and then commit the changes.

Screenshot of the errors displayed for Invalid JSONs

![image](https://github.com/user-attachments/assets/f1661a1e-50a6-4b20-88a5-b7cfe0cc691a)


### Why is this Important?
All of our datasource forms appear on the UI from the JSON configuration
files in the plugins. If an Invalid JSON is added, it can break the
datasource usage experience for the users.
One such instance happened in the past, where due to a JSON formatting
error, the users could not use Smart Substitution feature on production.

[Reference](https://theappsmith.slack.com/archives/C040LHZN03V/p1721124893238579)

Fixes #34969 

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10243164292>
> Commit: 08bc87acd2e44c4a2677d3eed1bad002f991050a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10243164292&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 05 Aug 2024 05:50:07 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-08-05 11:56:50 +05:30
Nidhi
d6e74bf012
chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
Sumit Kumar
98a509227f
fix: fix MySQL stale connection error (#24429)
## Description
- Add changes to address the`StaleConnection` exception caused by MySQL plugin.
- Update MySQL driver version.
- Other refactor changes not related to the main issue: 
  - Explicit empty constructor definition is replaced with Lombok annotation for all error messages class.
  - A base class is created for plugin error messages class to store all common error messages.
  - Fix Indentation.
2023-06-30 11:40:05 +05:30
albinAppsmith
629999f124
feat: [epic] appsmith design system version 2 deduplication (#22030)
## Description

### Fixes
- [x] https://github.com/appsmithorg/appsmith/issues/19383
- [x] https://github.com/appsmithorg/appsmith/issues/19384
- [x] https://github.com/appsmithorg/appsmith/issues/19385
- [x] https://github.com/appsmithorg/appsmith/issues/19386
- [x] https://github.com/appsmithorg/appsmith/issues/19387
- [x] https://github.com/appsmithorg/appsmith/issues/19388
- [x] https://github.com/appsmithorg/appsmith/issues/19389
- [x] https://github.com/appsmithorg/appsmith/issues/19390
- [x] https://github.com/appsmithorg/appsmith/issues/19391
- [x] https://github.com/appsmithorg/appsmith/issues/19392
- [x] https://github.com/appsmithorg/appsmith/issues/19393
- [x] https://github.com/appsmithorg/appsmith/issues/19394
- [x] https://github.com/appsmithorg/appsmith/issues/19395
- [x] https://github.com/appsmithorg/appsmith/issues/19396
- [x] https://github.com/appsmithorg/appsmith/issues/19397
- [x] https://github.com/appsmithorg/appsmith/issues/19398
- [x] https://github.com/appsmithorg/appsmith/issues/19399
- [x] https://github.com/appsmithorg/appsmith/issues/19400
- [x] https://github.com/appsmithorg/appsmith/issues/19401
- [x] https://github.com/appsmithorg/appsmith/issues/19402
- [x] https://github.com/appsmithorg/appsmith/issues/19403
- [x] https://github.com/appsmithorg/appsmith/issues/19404
- [x] https://github.com/appsmithorg/appsmith/issues/19405
- [x] https://github.com/appsmithorg/appsmith/issues/19406
- [x] https://github.com/appsmithorg/appsmith/issues/19407
- [x] https://github.com/appsmithorg/appsmith/issues/19408
- [x] https://github.com/appsmithorg/appsmith/issues/19409

Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers
about this first


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

> Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- Jest
- Cypress

### 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
- [ ] My code follows the style guidelines of this project
- [ ] 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
- [ ] 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

---------

Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvi@appsmith.com>
Co-authored-by: Arsalan <arsalanyaldram0211@outlook.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Rohit Agarwal <rohit_agarwal@live.in>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com>
Co-authored-by: Vijetha-Kaja <119562824+Vijetha-Kaja@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-05-20 00:07:06 +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
subratadeypappu
0ad5aaa41d
fix: Show downstream error message for DynamoDB (#21042) (#21209)
This PR fixes one case where the downstream error message is captured as
`null`.

- In case of illegal access to any table the downstream error message is
not captured correctly. It was captured as `null` because the original
downstream message was available one level deeper.
2023-03-08 21:02:51 +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
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
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
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
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
Sumit Kumar
9faa22ad58
Fix: Dynamodb Plugin: remove data type info keys from raw values. (#6652)
* A fix had been introduced earlier (I had introduced it a few months back) to remove data type info keys from the raw response. However, the transformation was not getting applied to the Query action as the transformation was explicitly limited to few actions. This PR removes that check and allows the transformation for all actions as there does not seem to be any reason to withhold this transformation for other actions.
* The earlier fix also restricted this transformation to results that had specific keys. This PR removes this check as well as it does not seem to be required and further may lead to similar issues if any particular key gets missed.
* Some other redundant checks have been removed from the flow as the transformation function itself takes care of it as edge/base case.
2021-08-17 19:18:25 +05:30
Nidhi
57adbd7777
Schema info in templates query (#5244) 2021-06-18 11:31:17 +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
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
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
5bab77a141
remove endpoint host and port fields from dynamodb datasource form (#3316)
- A consensus has emerged that the utility of overriding endpoint is only for local development and testing. Hence, removing the fields from datasource form.
2021-03-02 17:25:25 +05:30
Sumit Kumar
6c04e1467b
Provide option for only one endpoint and port in the dynamodb plugin datasource form (#3314)
- provide a max length to keyvalue_array type. If the max length is set to 1, then the "+" button will not appear.
- front end changes are pending. A new github issue will be opened to track the same : #3315
2021-03-02 15:42:38 +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
d2643a18c3
check dynamodb connection validity using listTables cmd. (#3241)
* check dynamodb connection validity using listTables cmd.
* add TC
* add encrypted logo to password field
* rectify the default value of region dropdown
* remove unused imports
2021-02-26 16:57:18 +05:30
Sumit Kumar
1e59ed4928
Internal fix: Remove raw response from transformed DynamoDB response structure. (#3209)
* remove raw response from transformed response structure.
* update TCs
2021-02-25 16:34:07 +05:30
Sumit Kumar
4b09b2c379
Transform Dynamodb response for easy consumption (#3050)
- add support to handle dnyamoDb Binary type
- transform raw response to show extracted response and raw response for:
GetItem
BatchGetItem
DeleteItem
PutItem
Scan
TransactGetItems
UpdateItem
- modify TC.
2021-02-23 16:24:06 +05:30
Shrikant Sharat Kandula
4f6a48bf40
Fix BatchGetItem & TransactGetItems operations failing on the DynamoDB plugin (#3120)
* Fix batch operations APIs failing with DynamoDB

* Fixed TransactGetItems operation on DynamoDB
2021-02-23 09:51:23 +05:30
Shrikant Sharat Kandula
ed1c926c8a
Add datasource structure support for DynamoDB (#2919) 2021-02-10 13:28:35 +05:30
Shrikant Sharat Kandula
fbf6021080
Fix nested structure translation in DynamoDB (#2915) 2021-02-09 06:59:45 +05:30
Sumit Kumar
e6b77a1299
Stop logging some AppsmithPluginException to Sentry (#2351)
1. Move package  appsmith-interfaces/src/main/java/com/appsmith/external/pluginExceptions-> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/pluginExceptions
2. Move enum AppsmithErrorAction from appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java -> appsmith-interfaces/src/main/java/com/appsmith/external/exceptions/AppsmithErrorAction.java, so that both plugin exceptions and server exceptions could use the same enum.
3. Log exception based on the error action defined for each exception.
2021-02-04 15:24:30 +05:30
Nidhi
01bbc03857
Fixed handling of lists in dynamodb (#2818) 2021-02-02 13:35:58 +05:30
Nidhi
a00c144e85
Subclassing authentication (#2215)
* Sublcassing authentication

* Removed TODO

* Review changes
2020-12-17 21:38:52 +05:30
Trisha Anand
888d79b06d Removing printing of result objects from plugin execution. 2020-12-09 19:03:51 +05:30
Trisha Anand
8283396056
Moved from boundedElastic to elastic to ensure that the server services the plugin execution request as soon as the request arrives. (#2090) 2020-12-08 22:04:14 +05:30
Trisha Anand
2062c60ca3
Moved all the scheduling of the plugin executions to bounded elastic instead of elastic. (#1931) 2020-11-26 17:50:43 +05:30
Trisha Anand
772884e1a3
Making dynamo db's blocking commands run on elastic thread pool. (#1853) 2020-11-23 17:02:41 +05:30
Shrikant Sharat Kandula
2a53abd8a6
Add DynamoDB Plugin (#1167)
* Added DynamoPlugin to integrate with DynamoDB

* Connection management for DynamoPlugin

* Process action from a single JSON object as input

* Moved ListTables command to separate class

* Add missing UI definition files

* Use reflection to build request objects for AWS SDK

* All DynamoDB actions are now run purely by reflection

* Serialize responses to JSON

* Remove some unused/commented code and some refactorings

* Add non-working test with generic dynamodb container

* Added working test for ListTables action

* Added test for PutItem action

* Add tests for get and update actions

* Added comments and some refactoring

* Removed unused Command class.

* Added more tests for map to SDK object conversion

* Add templates

* Add option to set an endpoint override

* Fix Dynamo plugin tests when ~/.aws is missing

* Add documentation link for DynamoDB plugin

* Fix validation checks

* Remove debug log

* Added comments on expected query structure

* Fix incorrect error condition with incorrect request format

* Add comment for converting action to method name

* Error out if region is missing

* Remove unused throws declaration

* Use rich form for action configuration

* Removed templates

* Use PNG for logo images

* Use PNG logos for all plugins

* Avoid hard-coded field names

* Change logo to PNG only for ElasticSearch for now

* Wrap errors in AppsmithPluginException

* Typo

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

* Fix changeset order number

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

* Minor refactoring and fixed error messaging

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-10-21 17:45:54 +05:30