Commit Graph

149 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
sneha122
683d441678
chore: system print added instead of log.info (#35335)
## Description
This PR replaces logs added in
[PR](https://github.com/appsmithorg/appsmith/issues/35330) with
System.out.println as log.info does not show up logs on mezmo.


Fixes #`Issue Number`  
_or_  
Fixes https://github.com/appsmithorg/appsmith/issues/35331
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## 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/10193728337>
> Commit: 817f2d09ecf0f74ade574ff07a86703089f9675f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10193728337&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Thu, 01 Aug 2024 07:42:14 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Chores**
- Updated logging approach in the MySqlPlugin to use standard output
instead of the logging framework.
- Maintained the same information output while altering the method of
logging.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-08-01 14:04:15 +05:30
sneha122
28c8c5ad82
chore: added logs for connection pool in mysql (#35255)
## Description

This PR adds logs around connection pool metrics in order to debug
memory leak issue https://github.com/appsmithorg/appsmith/issues/34028

Following metrics are logged for Get strcuture and Excute query calls:
- Acquired  - It indicates number of connections acquired from pool
- Idle - Number of connections sitting idle in the connection pool
- Allocated - Number of connections active / idle in the pool
- Pending - Number of connections pending to be acquired.

This information can help us understand if connections are not being
released from the pool leading to memory leak.

Fixes #35158  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## 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/10148654649>
> Commit: 2588f79ed0203bd6943408e421f37159dbdfbc48
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10148654649&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Mon, 29 Jul 2024 17:38:32 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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


- **New Features**
- Enhanced logging capabilities for the MySqlPlugin connection pool
metrics, improving observability during database operations.

- **Bug Fixes**
- Improved monitoring tools to help identify potential memory leak
issues related to connection pool usage.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-07-30 16:11:02 +05:30
Hetu Nandu
1194bd5a57
fix: Api pane and settings responsiveness (#33297)
## Description

Various style and layout changes for side by side responsiveness

Fixes #33249 

## 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/9006852734>
> Commit: de02d207d06524e3aace37647821ffd45ee17e64
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9006852734&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->






## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-09 17:02:48 +05:30
Aman Agarwal
796a4c8660
fix: default port numbers for the datasources (#32901) 2024-04-30 13:15:11 +05:30
sneha122
d664a81b6a
fix: graphQL bindings issue resolved (#32760)
## Description
This PR resolved issue with graphQL, where if we create a graphQL with a
binding and run such query, it returns with error response saying the
query execution has timed out. A user had raised this issue
[here](https://discord.com/channels/725602949748752515/1230134890704539709).

### Root cause:
The issue was not at all reproducible on local, but It was continuously
erroring out on production, release and even DPs. From the logs, we can
see that issue was with `GraphQLDataTypeUtils.java` class. This class
was somehow not getting initialised. This was due to recent changes made
in [PR](https://github.com/appsmithorg/appsmith/pull/32595), where the
version for package was updated to v2.17.0, on local it was compiling
properly but on release, production and other builds, it still seems to
be referencing to the older version of it, we do not know the reason of
it right now, we should further investigate this. But since this was a
critical issue and we need to get user unblocked, we are going ahead
with an alternate fix where we have moved the initialisation of
objectMapper to serialisationUtils.java file.

![Screenshot 2024-04-18 at 11 22 55
AM](https://github.com/appsmithorg/appsmith/assets/30018882/9735aaed-07c2-402b-a798-d7a4c1b67a19)

### Steps to reproduce the issue:
1. Drag and drop a text widget on canvas, change text value to `US`
2. Create a new graphQL query with url as
`https://countries.trevorblades.com/`
3. Add following in the query body and execute the API

```
{
  country(code: {{Text1.text}}) {
    name
	}
}
```


Fixes #32748
_or_  
Fixes [`Issue
URL`](https://github.com/appsmithorg/appsmith/issues/32748)
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## 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/8735651316>
> Commit: a03f29f8078398a4c317e852667270c0810bddea
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8735651316&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





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

- **Refactor**
- Updated serialization configuration across various data types and
plugins to enhance functionality and compatibility using a centralized
utility method.
- **New Features**
- Introduced a new method to standardize object mapper configurations,
improving serialization processes across the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-04-18 17:36:54 +05:30
Aman Agarwal
2a08e8ed52
fix: reverting the default port numbers for the datasources (#32726)
This PR is created to revert the changes from the PR #32592 due to
flakiness in the test specs.

Reverts appsmithorg/appsmith#32592


## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8717847856>
> Commit: e6b4c320d893490c37bf4b4a2efa02fc4c4a2c4b
> Cypress dashboard: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8717847856&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank"> Click here!</a>
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
</ol>
> To know the list of identified flaky tests - <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">Refer here</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-17 13:44:18 +05:30
Nidhi
c51e4b810d
chore: Introduce changes to minimize git footprint (#32595) 2024-04-16 21:34:24 +05:30
Aman Agarwal
ed1bb9273a
fix: default port numbers for the datasources (#32592) 2024-04-16 13:29:04 +05:30
sneha122
4309e9e44b
fix: connection mode hidden from mysql form config (#32487)
## Description
MySQL datasource config has a field called `Connection mode`, which
allows users to configure their datasource either in read write / read
only mode. This is supposed to block the write queries if datasource is
configured with read only mode, but with current implementation, it does
not block, it lets us execute write query.

On checking the codebase, it seems that this field is not at all being
used in mySQL plugin to configure the datasource, further more mysql
driver used may not even support configuring connection mode as of now,
hence as preventive solution, hiding the connection mode form config for
now.

Fixes https://github.com/appsmithorg/appsmith/issues/9941
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8612888064>
> Commit: `0a0d20e1fb40546e635ba018704b5f13ecc97ab1`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8612888064&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-04-10 12:34:04 +05:30
Rishabh Rathod
5d47001dba
chore: Prepared statement description changes (#32042)
## Description



Fixes https://github.com/appsmithorg/appsmith/issues/32045

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8432564141>
> Commit: `120b0d79d5c4139a92bba228bdcb476cf1f7710c`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8432564141&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->






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

## Summary by CodeRabbit

- **Documentation**
- Updated information text related to using Prepared Statements in
queries, emphasizing the prevention of SQL injections and highlighting
limitations on dynamic bindings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 14:09:35 +05:30
Aman Agarwal
a6926a4fed
fix: sorting schema options alphabetically (#29460) 2023-12-13 13:21:23 +05:30
sneha122
f91dc4889e
chore: JUnit test cases added for rate limit functions (#28399)
## Description

This PR adds JUnit test cases for rate limit functionality implemented
for datasource test and datasource connections.

#### PR fixes following issue(s)
Fixes ##27742
#### 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
- Chore (housekeeping or task changes that don't impact user perception)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [x] JUnit
- [ ] 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
- [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
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-10-26 21:40:55 +05:30
Sumit Kumar
4c23802a94
fix: MySQL plugin: add check for null column value for JSON column type (#28148) 2023-10-19 08:59:12 +05:30
sneha122
ff31d78ee9
chore: Rate limiting datasource test api is added (#27777)
## Description

This PR adds rate limiting functionality to datasource test API. The
rate limiting configuration is added in such a way that if test API
receives more than 3 failed authentication requests for the same host
name within 5 seconds, It will block this hostname for the next 5
minutes, so that brute force attack can be stopped.

Unit test for this will be covered in another PR. Refer #27742 

Currently this PR covers for postgres only, will need to extend the
implementation for all plugins. Refer #27737

#### PR fixes following issue(s)
Fixes #27736, #27739, #27744 
> 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
- Chore (housekeeping or task changes that don't impact user perception)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] JUnit
- [ ] 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
- [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
- [ ] 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
- [x] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-10-17 15:08:23 +05:30
Sumit Kumar
920d454d2b
fix: fix MySQL SSH tunnel default port value (#27612) 2023-09-27 18:41:46 +05:30
Sumit Kumar
58c801f859
chore: move MySQL datasource validation tests to a separate file (#27373) 2023-09-18 14:08:25 +05:30
sneha122
778dd53f45
feat: schema preview API extended for movies mock DB (#26962)
## Description

This PR extends `/schema-preview` API for movies mock mongo DB. For this
experiment we will need to show schema along with preview of movies
mongo DB on the review page. This feature is currently implemented only
for mock mongo DB, if the experiment turns out to be a success, this
will be further extended for non mock mongo datasources as well.

More info on Activation experiments can be found
[here](https://www.notion.so/appsmith/User-Activation-Experiments-cecdd8af23ac4286968096da4a4fdc99)

#### PR fixes following issue(s)
Fixes #26936
> 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
- New feature (non-breaking change which adds functionality)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] JUnit
- [ ] 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
- [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
- [ ] 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
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-09-06 14:02:24 +05:30
Sumit Kumar
770524c372
chore: Add Junit test cases for MySQL SSH tunnel feature (#26829) 2023-09-01 15:42:39 +05:30
Sumit Kumar
b115a7d96a
feat: MySQL SSH tunnel (#26632) 2023-08-30 19:23:33 +05:30
Ayangade Adeoluwa
7dcff0d774
feat: Add isSuggested value to templates for all plugins (#26623)
This PR adds an isSuggested value to templates for all plugins that
support DatasourceStructure
2023-08-30 11:49:25 +01:00
Sumit Kumar
3173dd4e00
feat: add basic data structures for MySQL SSH tunnel (#26349) 2023-08-25 15:28:16 +05:30
sneha122
5d7193c1e3
feat: preview data api extended for mysql (#26573) 2023-08-23 13:32:01 +05:30
Sumit Kumar
d7f940ffaa
chore: replace wildcard imports with specific imports (#25723) 2023-07-26 16:31:29 +05:30
Ayush Pahwa
75b297201a
chore: code splitting for multiple env feature (#25479)
code split for EE feature

---------

Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
2023-07-21 12:53:17 +07:00
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
sneha122
f36bcf2a6c
feat: query creation dumb templates replaced with smart templates (#24234)
## Description
 
This PR replaces dumb template that is shown on new query creation with
smart templates. With current implementation whenever we create a new DB
query, we see this template before writing the query, when we select any
of the template options, it shows us template query like `SELECT * FROM
users ORDER BY id LIMIT 10;` Since its a template query, users table may
not exist in user's actual database, thus leading them to error results.
<img width="1174" alt="Screenshot 2023-06-09 at 2 45 40 PM"
src="https://github.com/appsmithorg/appsmith/assets/30018882/4dede184-439f-4064-abe0-faf7b236748e">

With new implementation, we are removing this template page, instead if
we have the structure of the datasource available, we would simply get
the first table from the structure, and create select query using that.
This way we are populating query editor with user's actual table names
rather than dumb table name like `users`. Thus leading users to create
successful query

Note: This change is done only for sql plugins like MySQL, MSSQL,
PostgreSQL, Redshift, Oracle, Snowflake.

#### PR fixes following issue(s)
Fixes #23960 
> 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
- New feature (non-breaking change which adds functionality)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] Jest
- [x] Cypress
>
>
#### Test Plan
> Create a Connection on the DB 
> Create a Query from the established Query
> Ensure the 1st table data is placed when Add Query button is clicked
from the Review page
> If the query is created from Entity explorer ensure the right table
name is been added

#### Issues raised during DP testing
> Link issues raised during DP testing for better visibility 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
- [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
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [x] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [x] Cypress test cases have been added and approved by SDET/manual QA
- [x] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-06-19 15:23:34 +05:30
Aman Agarwal
c49c42b0be
fix: functionality of placeholdertext in key value array control (#24483)
## Description
This PR fixes : 
- the functionality of placeholder for the key value array control which
was earlier accessing `placeholderText` key from a wrong path for host.
- Added placeholders for different datasources as well
2023-06-16 18:04:25 +05:30
ChandanBalajiBP
b5185ab8b5
fix: Update connection mode DropDown by Segmented Control (#23730)
## Description
> Update the Drop-Down component to Segemented Control as per the
designs in datasource configuration.
>Here is the FIGMA
[link](https://www.figma.com/file/xlYswIZx9noaldAPmv3ji4/Multiple-Environments-V2?type=design&node-id=79-36425&t=egGDXQsYmAFAWjBU-0)

>Current state 
><img width="393" alt="Screenshot 2023-05-25 at 3 08 38 PM"
src="https://github.com/appsmithorg/appsmith-ee/assets/104058110/5f623fee-5ba7-464d-be34-a106f0e7c438">

>Updated State 
><img width="393" alt="Screenshot 2023-05-25 at 3 08 38 PM"
src="https://user-images.githubusercontent.com/104058110/237018777-132f6607-a757-41c0-9d52-c00e70745f36.png">

#### PR fixes following issue(s)
Fixes #

#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
>
## Testing
>
#### How Has This Been Tested?
- [x] 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
- [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
- [ ] 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
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [x] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [x] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-05-29 16:45:52 +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
PiyushPushkar02
e7857a18bb
fix: MySQL Error Message Fix (#22859)
## Description

- Changed the error message returned in case of an invalid
username/password for MySQL.
- Removed the exact exception from the error message returned to the
user.

Fixes #13977 

## 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
- [ ] 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-05-10 17:40:53 +05:30
SatVeer Singh
9dd1ef6ff0
fix: Hint text in create query (sql based datasources) (#22190)
## Description
Improve hint text in SQL type queries. 

Fixes #22011
Fixes #22117
2023-04-10 17:50:09 +05:30
Sanveer Singh Osahan
c7f8b5b800
chore: Added test for various data types (#20069) (#21932)
## Description

Added tests for querying various data types in MySQL plugin
Fixes #20069

## Type of change

- Chore (housekeeping or task changes that don't impact user perception)

## How Has This Been Tested?

- 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
- [x] 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-05 18:34:40 +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
Nidhi
e5da173acd
fix: Removed hard coded 4 seconds timeout for action execution in MySQL (#21719)
## Description

We seem to have introduced a hard coded 4 seconds execution timeout in
the MySQL plugin that was. causing the more complicated queries to throw
a stale connection exception. This PR reverts that change to allow
queries to run completely.

Fixes #17324 

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

## How Has This Been Tested?
- Manual
- JUnit
- 
### Test Plan
Please use
[this](https://www.notion.so/appsmith/Secondary-Stale-Connection-Issue-498b349be64b494abf8d5a34a23a45b8)
document to verify all scenarios where we were seeing a stale connection
exception.

### 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
- [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
- [ ] 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-03-29 17:11:43 +05:30
Manish Kumar
60626a14cf
fix: Ensure backward compatibility w.r.t. statusCode and response.body in case of errors (#21052)
## Description
Since we have introduced the error handling framework, each plugin
produces error messages specific to the plugin execution exception. This
Pr is just about standardising these error messages.
In this PR we are handling only five plugins as mentioned:
- Rest API
- MongoDB
- Postgres
- MySql
- Google Sheets

> Modifying error messages for five plugins Rest API, Mongo, Postgres,
MySQL, and Google Sheets for improving consistency.

In addition it also takes care of the following issues
- If the downstream error message is available response.body will hold
that value and it will hold the appsmith error message otherwise
- Don't override the actual http status code with Appsmith error code in
case of RestAPI and GraphQL plugins

Fixes #20438 #21022

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## How Has This Been Tested?
- Manual


## Checklist:
### Dev activity
- [x] 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

---------

Co-authored-by: subrata <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
2023-03-03 21:18:01 +07:00
appsmithguru
019caf995e
fix: 14544 Ignore comments before parsing a query with IS operator in MySQL (#20620)
Description

MySQL query fails for having the "IS" word inside a comment in Prepared
Statement
https://github.com/appsmithorg/appsmith/issues/14544

Sample query: Select * from table -- IS 
The Query is validated before removing the comments hence was throwing
"IS operator is not supported" error

Checklist:

- [ ]  My code follows the style guidelines of this project
- [ ]  I have performed a self-review of my own code
- [ ]  My changes generate no new warnings
- [ ]  New and existing unit tests pass locally with my changes
2023-02-21 14:13:07 +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
Sumit Kumar
ee0cb4adab
fix: MySQL Plugin: fix connection leak in datasource destroy (#20553)
## Description
- Currently, the code for destroying MySQL connection is incorrect. Hence, MySQL plugin is not able to close connections that are no longer required resulting in connection leak. This PR fixes it.

Fixes #20552
2023-02-14 17:16:25 +05:30
Sumit Kumar
8ec4fbc8b1
fix: MySQL Plugin: update handling of JSON DB type (#20080)
## Description
- In case of MySQL the JSON DB type is stored as a binary object in the DB. This is different from MariaDB where it is stored as a text.Since we currently use MariaDB driver for MySQL plugin as well the driver reads the JSON DB type data as byte array. This PR adds change to convert this byte array to string before sending back the response. 
- Currently, we assume utf-8 encoding when reading the data back into JSON string (since MySQL uses a subset by default ie. utf-8mb3/4), however other encodings can be configured. I have created a new feature request to track it: https://github.com/appsmithorg/appsmith/issues/20088

Fixes #19867 

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

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

### 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
- [x] 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
- [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
- [ ] 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-27 15:14:03 +05:30
Sumit Kumar
03f8b2a523
fix: add connection pool to MySQL plugin and fix issues due to Spring upgrade (#17873)
- Add connection pool to MySQL
- Fix JUnit TC failures due to Spring upgrade
- Fix Cypress TC failures due to change in the MySQL plugin code 
- Remove `Preferred` SSL option
2023-01-09 14:04:51 +05:30
Nidhi
02c5c45972
fix: Added handling for empty evaluated values (#19438) 2023-01-04 02:17:57 +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