Commit Graph

618 Commits

Author SHA1 Message Date
Ayangade Adeoluwa
f87ba6a671
feat: Feat/add google sheets metdata (#22577)
This PR does three things:

1. Cleans up the Datasource Form page and makes the code more readable
and discoverable
2. Adds the Account information for google sheets
3. Adds a way to render form configs specifically in view or edit modes.
2023-04-27 14:52:41 +01:00
PiyushPushkar02
6843efcb0b
fix: Google Sheets Scope Label Change (#22548)
## Description

- The following PR changes the label values seen by the user in the
scope selection drop-down menu while creating a Google Sheet data
source.
- The changes accommodate for one specific scope that was present in the
previous implementation and is not present now i.e read/write without
delete permission for which a new scope has been added.
- Also with these changes the migration for old data sources is not
required since we have added all the previously used scopes here.
- Figma Link:
https://www.figma.com/file/TcFhqEbAc8ymHTRF5wR1qv/Limited-GSheet-Access?node-id=506-32761
- Notion link for migration:
https://www.notion.so/appsmith/Google-Sheet-Migration-ab7bbfbdae1f40189a957b6ae5374145

Fixes #22327 

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update


## How Has This Been Tested?

- Manual

## 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
- [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: “sneha122” <“sneha@appsmith.com”>
2023-04-27 11:21:32 +05:30
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
Ayush Pahwa
ddfc329abe
feat: remove bloat from large files during upload (WIP) (#21757)
## Description

Currently, we try to upload large files by converting their binaries
into strings which leads to bloat in size. This is because converting to
bytes in a multi-byte encoding usually takes a larger space and white
characters are also included. We were also doing multiple modifications
which were just adding to the bloat.

Hence, we are now converting the binary data into an array buffer to
prevent this. This buffer is added to the multi-part form data request
as a new part and we add a pointer in the pace of the data which used to
be present earlier. This allows us to have minimal bloat on the payload
while sending the request.

TLDR: fix for uploading large files by changing the data type used for
upload.

*TODO:*
- [x] Client side payload changes
- [x] Server side double escape logic fixes
- [x] Server side tests
- [x] Server side refactor
- [ ] Cypress tests

Fixes #20642 

Media

## Type of change

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


## 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
- [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:
- [ ] 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: Nidhi Nair <nidhi@appsmith.com>
2023-04-27 10:33:32 +07:00
subratadeypappu
f9d2849487
Fix stringified JSON response (#22450) (#22498)
## Description
TL;DR

This commit fixes unexpected stringified JSON in the following plugins
- REST API Plugin
- GraphQL plugin

The detailed analysis can be found in the comment section of the issue
itself (#22450)

Slack Conversations
-
[1](https://theappsmith.slack.com/archives/C0341RERY4R/p1681123872154409)
-
[2](https://theappsmith.slack.com/archives/CGBPVEJ5C/p1681726446635249)

> Add a TL;DR when description is extra long (helps content team)

Fixes #22450 


Media


## 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
- [ ] 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
2023-04-26 22:22:08 +05:30
Nidhi
7d1c4d87b6
ci: Fixed external dependencies in tests partially (#22639) 2023-04-26 13:44:08 +05:30
sneha122
a5c1c7a102
feat: disable spreadsheet entity in case of insert/delete one (#22490)
## Description

This PR fixes:
- When google sheet datasource is created with selected sheets scope, in
this case we need to disable spreadsheet option in the entity dropdown
of the query, so that user cannot delete/insert from selected sheets

> Add a TL;DR when description is extra long (helps content team)

Fixes #22152 


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

### 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
- [ ] 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:
- [ ] 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: “sneha122” <“sneha@appsmith.com”>
2023-04-24 10:10:47 +05:30
Rohan Arthur
8e0d683c9b
fix: tooltip in gsheets query pagination field (#22622)
## Description

In the google sheets query for operation `Fetch Many`-->`Sheet Rows`,
the tooltip is as follows:
![Screenshot 2023-04-21 at 15 30
15](https://user-images.githubusercontent.com/94514895/233608160-613a931b-0f5f-403e-9a29-49018dc415e7.png)

this example is incorrect, it should be `...Table1.pageSize`, and not
just `pageSize`

Fixes #21384



## Type of change

> Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- Chore (housekeeping or task changes that don't impact user perception)



## How Has This Been Tested?
- Manual

### Test Plan


### 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

Co-authored-by: Rohan Arthur <rohanarthur@Rohans-MacBook-Pro.local>
2023-04-21 18:45:08 +05:30
Manish Kumar
77aeca27a0
feat: adding email property in google sheets (#22321)
## Description
As a part of google sheet scope limitation, the email address is being
added in datasource configuration. The email address
is being stored in a property, an element in properties
(`List<Property>`) with key: 'emailAddress' and value: (<emailId>) .

In order to retrieve this property a GET call to endpoint
`https://www.googleapis.com/drive/v3/about?fields=user` is being made.

This property is being saved while google sheet datasource gets
authorised, after access toke retrieval from cloud services.
in the endpoint `/saas/{datasourceId}/token`.

Since the flow is specific to google sheets, the main code is
implemented in googlesheetPluginExecutor. The flow has three steps

- Getting access token from datasourceConfiguration
- making the call to googleApis and obtaining the email address
- saving it back into datasource configuration

The authorisation flow itself saves the datasource later on.  


> TL;DR Adding emailAddress in properties of datasource configuration
when google sheets is authorised.

Fixes #21902 
- New feature (non-breaking change which adds functionality)

## This has been tested
- Manual
- JUnit

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] 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
- [x] PR is being merged under a feature flag
2023-04-21 14:17:34 +05:30
dependabot[bot]
b6dbce0bf7
chore: bump snowflake-jdbc from 3.13.26 to 3.13.29 in /app/server/appsmith-plugins/snowflakePlugin (#22444)
Bumps [snowflake-jdbc](https://github.com/snowflakedb/snowflake-jdbc)
from 3.13.26 to 3.13.29.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/snowflakedb/snowflake-jdbc/releases">snowflake-jdbc's
releases</a>.</em></p>
<blockquote>
<h2>Release</h2>
<ul>
<li>Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
<h2>Release</h2>
<ul>
<li>Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
<h2>Release</h2>
<ul>
<li>Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/snowflakedb/snowflake-jdbc/blob/master/CHANGELOG.rst">snowflake-jdbc's
changelog</a>.</em></p>
<blockquote>
<p><strong>JDBC Driver 3.13.29</strong></p>
<ul>
<li>|| Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
<p><strong>JDBC Driver 3.13.28</strong></p>
<ul>
<li>|| Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
<p><strong>JDBC Driver 3.13.27</strong></p>
<ul>
<li>|| Please Refer to Release Notes at <a
href="https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes">https://community.snowflake.com/s/article/JDBC-Driver-Release-Notes</a></li>
</ul>
<p><strong>JDBC Driver 3.13.26</strong></p>
<ul>
<li>|| Upgraded the arrow library from version 9.0.0 to 10.0.1.</li>
<li>|| Relocated files in META-INF/versions to META-INF/versions/<!--
raw HTML omitted -->/net/snowflake/client/jdbc/internal.</li>
<li>|| Added the getNano() and getOffset() methods to the
SnowflakeTimeWithTimezone object to return the number of nanoseconds and
the time zone offset, respectively.</li>
</ul>
<p><strong>JDBC Driver 3.13.25</strong></p>
<ul>
<li>||<strong>BCR (Behavior Change Release) Change</strong></li>
<li>||Caution: Version 3.13.25 of the Snowflake JDBC driver changes the
default value of the allowUnderscoresInHost parameter to false. This
change might impact PrivateLink customers with account names containing
underscores. In this situation, you must override the default value by
setting allowUnderscoresInHost true.</li>
<li>||<strong>New Features</strong></li>
<li>||Set the allowUnderscoresInHost parameter to false by default which
converts underscores in account names to hyphens to avoid Apache
httpclient connection error with underscores. This behavior can be
turned off by setting allowUnderscoresInHost to true.</li>
<li>||Updated the aws-java-sdk-bom library version from 1.11.394 to
1.12.327.</li>
<li>||Added the enableReturnTimestampWithTimeZone parameter to set
whether to include the timezone in a timestamp.</li>
<li>||Added log warnings for each of the error return paths while
parsing a SnowflakeConnectString.</li>
<li>||Added commas to the SnowflakeDatabaseMetaData.getColumn()
arguments to improve readability.</li>
<li>||Added support for stored procedures.</li>
<li>||<strong>Bug Fixes</strong></li>
<li>||Fixed an issue related to using the GET command when
GCS_USE_DOWNSCOPED_CREDENTIAL is true.</li>
<li>||Fixed an issue related to returning result types when the session
handle is NULL.</li>
</ul>
<p><strong>JDBC Driver 3.13.24</strong></p>
<ul>
<li>|| Upgraded the following libraries:</li>
<li>|| arrow from version 8.0.0 to 9.0.0</li>
<li>|| jacksondatabind from version 2.13.2.2 to 2.13.4.2</li>
<li>|| google-cloud-storage from version 2.5.0 to 2.6.2</li>
<li>|| Remove DML check on getUpdateCount()</li>
</ul>
<p><strong>JDBC Driver 3.13.23</strong></p>
<ul>
<li>|| Relocate Google Guava classes from
com/google/common/util/concurrent/** in FIPS driver</li>
<li>|| Return an empty resultset for getProcedures() when connected with
a reader account</li>
<li>|| Use parallelism parameter for PUT/GET with Azure</li>
<li>|| Set default logger level for arrow project to SEVERE to avoid
unwanted INFO messages</li>
<li>|| login test params updated and test case added</li>
</ul>
<p><strong>JDBC Driver 3.13.22</strong></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="019b0aeccd"><code>019b0ae</code></a>
SNOW-761717: Bumped up the Client PATCH version from 3.13.28 to 3.13.29
(<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1300">#1300</a>)</li>
<li><a
href="4be4b184dd"><code>4be4b18</code></a>
SNOW-760534 Added URLValidator and URLEncoder (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1297">#1297</a>)</li>
<li><a
href="e798047eab"><code>e798047</code></a>
Add tests for SnowflakeGCSClient.java (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1278">#1278</a>)</li>
<li><a
href="520dd90bd6"><code>520dd90</code></a>
Add more tests for SnowflakeFileTransferAgent (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1293">#1293</a>)</li>
<li><a
href="0e49d60404"><code>0e49d60</code></a>
[Snyk] Upgrade com.fasterxml.jackson.core:jackson-core from 2.13.2 to
2.14.2 ...</li>
<li><a
href="fdcc632809"><code>fdcc632</code></a>
Test pr 1113 (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1292">#1292</a>)</li>
<li><a
href="6a7bfefb88"><code>6a7bfef</code></a>
Add arrow tests (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1291">#1291</a>)</li>
<li><a
href="7cd122d4f8"><code>7cd122d</code></a>
Add tests for SnowflakeFileTransferAgent (part 1) (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1288">#1288</a>)</li>
<li><a
href="f7ae088895"><code>f7ae088</code></a>
Run downloadToStream() test on azure and S3 accounts (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1285">#1285</a>)</li>
<li><a
href="85381e7fd0"><code>85381e7</code></a>
SNOW-748294 Fix test failures (<a
href="https://redirect.github.com/snowflakedb/snowflake-jdbc/issues/1287">#1287</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/snowflakedb/snowflake-jdbc/compare/v3.13.26...v3.13.29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=net.snowflake:snowflake-jdbc&package-manager=maven&previous-version=3.13.26&new-version=3.13.29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/appsmithorg/appsmith/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 09:03:22 +05:30
sneha122
685bd13fb9
fix: gsheet ui issues fixed (#22384)
## Description
This PR fixes for google sheet datasource create:
- Remove asterics of scope
- Copy of the permissions drop down should be "Read" instead of "Read
Files"

> Add a TL;DR when description is extra long (helps content team)

Fixes #22383 
> 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)


## 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
- [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
- [ ] 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:
- [ ] 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: “sneha122” <“sneha@appsmith.com”>
2023-04-14 20:09:01 +05:30
Arpit Mohan
82607d0628
chore: Upgrading graphql dependency (#21809)
This PR upgrades the Graphql dependency to the latest stable release.


Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2023-04-14 16:36:50 +05:30
subratadeypappu
094d0a917f
fix: Allow empty password in PostgreSQL trust authentication login (#22186)
This PR reclaims the changes introduced in this
[PR](https://github.com/appsmithorg/appsmith/pull/19265) later which got
reverted by this
[PR](https://github.com/appsmithorg/appsmith/pull/20629)

## Description
- The PR removes the empty password validation check for PostgreSQL
while creating a new data source.
- The JUnit test case is added for the same. Implemented using a
separate PostgreSQL container with Trust Authentication enabled for the
Same.
- Please note for testing from UI perspective we have to create a user
with Trust auth enabled to validate the above changes.



Fixes #14003


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)


## How Has This Been Tested?

- 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
- [ ] 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
2023-04-13 16:20:46 +06:00
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
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
sneha122
67f7571f1e
fix: specific sheets to whole drive issue fixed (#21968)
This PR fixes the issue:
- Spreadsheet dropdown does not show all sheets, when google sheet
datasource is edited from specific sheets to all sheets.
- If files are picked in the file picker, no error message is shown on
datasource review page, but if files are not picked, error message is
shown on review page.

Fixes #21916
2023-04-07 07:31:27 +05:30
Sumit Kumar
d9442d2a7b
feat: Oracle Integration: Add support for Prepared Statements (#21744)
## Description
- This PR introduces support for prepared statements to the Oracle
integration that is currently behind a feature flag.
- Fixed a bug with PL/SQL cmd due to semicolon. 
- Fixed a bug with reading Array type. 
- The following tasks will be taken up separately and will not be part
of this PR. They will be resolved before lifting the feature flag:
  - DB structure and query templates
  - Error messages infra
  - JUnit TC
- The following data types were tested: `char, varchar, array, int,
float, double, raw, timestamp, timestamp_tz, interval` . The following
cmd was used to test the feature:
```
select * from TYPESTEST4 where c_varchar2={{'varchar2'}} 
and c_nvarchar2={{'nvarchar2'}}
and c_number={{1}}
and c_float={{11.22}}
and c_date={{'2002-10-03'}}
and c_binary_float={{11.22}}
and c_binary_double={{11.22}} 
and c_timestamp=TO_TIMESTAMP({{'01-01-1997 09:26:50.124'}}) 
and c_timestamp_tz=TO_UTC_TIMESTAMP_TZ({{"1997-01-01T09:26:56.66+02:00"}}) 
and c_interval_day=NUMTODSINTERVAL({{1}}, {{'HOUR'}}) 
and c_char={{'char                                                                                                                                                                                                                                                            '}}
and c_raw=utl_raw.cast_to_raw({{'raw'}})
```
- `JSON` type could not be tested because it was only recently
introduced in version 21c. However, the Oracle test instance credentials
available on Notion are for 19c. Tracking it
[here](https://github.com/appsmithorg/appsmith/issues/20796).

Fixes #20533

## Type of change
- New feature (non-breaking change which adds functionality)

## How Has This Been Tested?
- Manual

## How to Test 
```
(1) Create a Table with various data types like: 
create table typestest4 (
                            c_varchar2   varchar2(20),
                            c_nvarchar2 nvarchar2(20),
                            c_number number,
                            c_float float,
                            c_date date,
                            c_binary_float binary_float,
                            c_binary_double binary_double,
                            c_timestamp timestamp,
                            c_timestamp_tz timestamp with time zone,
                            c_timestamp_ltz timestamp with local time zone,
                            c_interval_year interval year to month,
                            c_interval_day interval day to second,
                            c_raw raw(256),
                            c_rowid rowid,
                            c_urowid urowid,
                            c_char char(256),
 					  c_nchar nchar(256),
                            c_clob clob,
                            c_nclob nclob,
                            c_blob blob
                            )

(2) Insert data into the table: 
insert into TYPESTEST4 values (
                                  'varchar2',
                                  'nvarchar2',
                                  1,
                                  11.22,
                                  '03-OCT-02',
                                  11.22,
                                  11.22,
                                  TIMESTAMP'1997-01-01 09:26:50.124',
                                  TIMESTAMP'1997-01-01 09:26:56.66 +02:00',
                                  TIMESTAMP'1999-04-05 8:00:00 US/Pacific',
                                  INTERVAL '1' YEAR(3),
                                  INTERVAL '1' HOUR,
                                  utl_raw.cast_to_raw('raw'),
                                  '000001F8.0001.0006',
                                  '000001F8.0001.0006',
                                  'char',
                                  'nchar',
                                  'clob',
                                  'nclob',
                                  utl_raw.cast_to_raw('raw')
                              )

(3) Run the following select cmd with prepared statement toggle on: 
select * from TYPESTEST4 where c_varchar2={{'varchar2'}} 
and c_nvarchar2={{'nvarchar2'}}
and c_number={{1}}
and c_float={{11.22}}
and c_date={{'2002-10-03'}}
and c_binary_float={{11.22}}
and c_binary_double={{11.22}} 
and c_timestamp=TO_TIMESTAMP({{'01-01-1997 09:26:50.124'}}) 
and c_timestamp_tz=TO_UTC_TIMESTAMP_TZ({{"1997-01-01T09:26:56.66+02:00"}}) 
and c_interval_day=NUMTODSINTERVAL({{1}}, {{'HOUR'}}) 
and c_char={{'char                                                                                                                                                                                                                                                            '}}
and c_raw=utl_raw.cast_to_raw({{'raw'}})
```

### 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
- [ ] 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-07 00:00:03 +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
sneha122
c8cd459f39
feat: Added file id mapping in datasource config (#21699)
## Description

This PR adds:
- File Id mapping of the google sheets selected by user, in datasource
configuration, so that when creating queries on top of such gsheet
datasource, only the selected spreadsheets can be seen in the
spreadsheet dropdown.

Changes done on client side:
- As soon as user selects file in file picker popup, the callback will
get the file ids and update the datasource to contain file ids as a part
of datasource configuration properties.
- If user cancels the file selection, file ids is sent as empty array
and datasource is updated.

Changes done on server side:
- In `GoogleSheetPlugin.java` where we have defined execute and trigger
methods for gsheet query, here I have added a new variable
allowedFileIds, which gets the list of authorised file ids from
datasource configuration object and the same list is passed to functions
like `transformTriggerResponse` and `transformExecutionResponse`, which
returns file list data based on the allowedFileIds. In FileListMethod
class, these methods contain the logic to send only authorised file
data.
- Since these two methods are a part of triggerMethod and
executionMethod interfaces, all gsheet query operation classes that
extend this method, their function definition needed to be updated with
this third allowedFileIds parameter.
- Similarly all gsheet query operations test classes were using these
two methods, and hence this third parameter needed to be added there as
well.

How to test:
- With this improvement, when we select `file1` and `file2` for one
datasource and `file3` and `file4` for another datasource, In the query
dropdown for first ds, we should only see `file1` and `file2`, for
second datasource, we should only see `file3` and `file4`.
- Please check following gsheet operations:
    - Fetch Many
    - Fetch Details
    - Update One
    - Update Many
    - Insert Many

> Add a TL;DR when description is extra long (helps content team)

Fixes #21074


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.

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


## 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
- [ ] 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
- [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: “sneha122” <“sneha@appsmith.com”>
2023-04-04 13:43:49 +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
c8c80cfbbd
fix: Avoid HikariCP creating idle connection on Postgres DB (#21780)
## Description

A few users noticed that Appsmith was creating surplus connections in
their database even when connected through a single datasource. Ideally,
this number should start from 5 and not exceed beyond total concurrent
requests in the app/workspace. However, it seems like HikariCP tends to
send the following query outside of the connection pool size for every
query that we try to run.
```
SET application_name = 'PostreSQL JDBC Driver'
```

This PR has introduced a custom set application name to all connections
to avoid sending this set query along with every execution request,
according to this
[post](https://seethawenner.medium.com/improve-the-performance-of-your-aws-rds-postgres-database-by-avoiding-session-pinning-a4f010109bed).

Unfortunately, while this solution has lowered the number of such set
queries, they have not disappeared entirely. There is another
alternative [here](https://github.com/appsmithorg/appsmith/pull/21780)
that requires us to let users know about minimum version support for PG
so we will not be opting for that solution at this time.

Fixes #14117

## 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
- [ ] 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
2023-04-03 09:48:53 +05:30
Sanveer Singh Osahan
b0536861b0
fix: Changed SMTP placeholder for SMTP plugin (#21458) (#21941)
## Description
Fixed the attachment placeholder for a query created on SMTP datasource

Fixes #21458 

## Type of change

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

## How Has This Been Tested?

- Manual

For sending email with attachments, tested `{{FilePicker.files}}` and
`{{[FilePicker.files[0]]}}`, both works successfully but
`{{FilePicker.files[0]}}`

## 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-03-31 11:09:19 +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
PiyushPushkar02
53cdd053b8
fix: API Url Whitespace Bug Fix (#21711)
## Description

- Added trim method to remove the whitespace from the URL while creating
the request URL.
- Notion doc for the issue and fix:
https://www.notion.so/appsmith/API-GraphQL-URL-With-Whitespaces-449a8fa4f3fa49e490b4b4b0fe5a16d1

Fixes #21629 

## 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
- [ ] 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-27 09:58:14 +05:30
PiyushPushkar02
f04c474fc4
fix: MongoDB Invalid DB Name Error Msg (#21599)
## Description

- This PR adds a check to throw a proper error if the default database
name is empty and an invalid database name is provided in the
authentication section for mongo db.
- Added JUnit test cases for the same. one for an invalid db name and
one for a valid db name (Both with empty default db name)
- There is one more issue observed here which is not taken part in this
ticket. When you try to save the mongo data source with the default
database name and empty database name under auth section. Once you try
to save the data source it will throw an internal server error. Created
a ticket for the same:
https://app.zenhub.com/workspaces/data-integration-pod-6322a759b3296d249ce5c4ed/issues/gh/appsmithorg/appsmith/21598

Fixes #12260 

## Type of change
- Bug Fix(non-breaking change which adds functionality)

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

### **Checklist**:

- [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
- [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
- [x]  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-23 11:23:56 +05:30
PiyushPushkar02
df62613709
chore: JUnit TC For Many Form Update (#21671)
## Description

- Added a test case for array type input for many form update command as
mentioned in
[#17732](https://github.com/appsmithorg/appsmith/pull/17732)

Fixes #17732

## Type of change

> Please delete options that are not relevant.
- 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-03-22 19:49:27 +05:30
Sumit Kumar
e3c8ca2d5c
feature: Introduce Oracle Integration behind feature flag (#21273)
- Introduce Oracle Integration behind feature flag.
2023-03-16 16:54:25 +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
sneha122
4a99ff50fd
chore: improvements added in gsheet form config for feature flag (#20999)
## Description

This PR adds code review improvements for feature flag in gsheets form
config as per https://github.com/appsmithorg/appsmith/pull/20395

> Add a TL;DR when description is extra long (helps content team)

Fixes #20925 
> 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.

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


## 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
- [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:
- [ ] 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: “sneha122” <“sneha@appsmith.com”>
2023-03-08 13:43:37 +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
Ayangade Adeoluwa
6a096464fa
fix: Auto-generated header Refactor (#19873)
API content type refactor flow. More information can be found
[here](https://www.notion.so/appsmith/API-Content-type-Header-Refactor-07f2f944e13f43148210c2461cf3fcda?d=339958cf1d374fefadfa437f86d95627)

Fixes #18473

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)


### 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: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: PiyushPushkar02 <118709669+PiyushPushkar02@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
2023-02-24 12:18:48 +00:00
sneha122
7c8daef738
feat: gsheet form config changes (#20395)
## Description
As a part of Limiting Google Sheets access project, we are modifying the
UI of datasource configuration form for google sheets datasource as per
[figma
link](https://www.figma.com/file/TcFhqEbAc8ymHTRF5wR1qv/Limited-GSheet-Access?node-id=7%3A8&t=FN3j084OyCErlu67-0)
This PR contains the code changes required for this new flow. Please
check https://github.com/appsmithorg/appsmith/issues/20159 for more
information.
This improvement was suggested in form config for feature flag, I have
created https://github.com/appsmithorg/appsmith/issues/20925 to track
it, will be fixing it.

Steps to test:

1. Create new google sheet datasource, you should see first option in
the dropdown as `Read/Write | Selected Sheets` selected by default.
2. In this case if we click on save and authorise, it should take us to
google accounts page, where we can select the account.
3. Once account is selected, we should land on permissions page, where
we can check the new permission of `See, edit, create, and delete only
the specific Google Drive files you use with this app`, click on allow.
4. This will take us back to datasource config page in appsmith.
5. Other two options in dropdown are for providing Read/Write or Read
only access to all files in google drive. For Read Only option we should
see permissions as before, where as for read/write option we should see
two permissions: `See, edit, create, and delete all of your Google Drive
files` and `https://www.googleapis.com/auth/spreadsheets`.
7. Since this feature is hidden behind feature flag, we would also need
to test the flow for normal user and ensure that current implementation
is working as is without any issues


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


## Type of change

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


## How Has This Been Tested?

- Manual
- 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
- [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: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-02-24 15:42:28 +05:30
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
appsmithguru
80b4eeea0e
fix: 11847 configuring UTF-8 encoding as default to SMTP plugin (#20619)
Description

SMTP encoding issue.
https://github.com/appsmithorg/appsmith/issues/11847

The default encoding by MimeMessage is ascii and now its been configured
to UTF-8 to support some characters

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 13:34:56 +05:30
Sumit Kumar
8b32fb6e59
fix: allow MsSQL plugin to connect with ssl encryption (#20568)
## Description
- Currently MsSQL plugin enforces SSL setting to be disabled when
connecting with a database, hence any database that does not allow
non-encrypted connection would fail the connection.
- This PR introduces SSL dropdown to MsSQL datasource config page with
two modes - (1) `disabled` (2) `encryption with no verify`
- `encryption with no verify` means that an encrypted connection would
be established but the client would not seek to verify the authenticity
of the database server.
- This PR also migrates the older existing MsSQL datasources to include
the SSL config with mode being `disabled` since this is how the plugin
is effectively configured at the moment.
- An attempt was made to use the new `ChangeUnit` way of writing the
migration but was abandoned in the interest of time after some re-tries
due to some error during runtime.

Fixes #19039 #20048

## Type of change
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)

## How Has This Been Tested?
- Manual
- Attempted to add JUnit TC but had to roll back because of some issues
with DB connections opened via other JUnit TCs. Tracking this issue
here: https://github.com/appsmithorg/appsmith/issues/20570

### Steps for manual testing
(1) Run MSSQL using docker cmd: `docker run -d --name sql_server -e
'ACCEPT_EULA=Y' -e 'SA_PASSWORD=someThingComplicated1234' -p 1433:1433
mcr.microsoft.com/mssql/server:2019-latest`
(2) Switch to `release branch`. 
(3) Create a MSSQL datasource and create valid connection to the DB
created in step (1). Check that the datasource has no SSL dropdown
config.
(4) Create a query on datasource created in (3). Verify that the query
runs.
(5) Switch to this PR branch. Spin up the sever. 
(6) Edit the datasource created in (3) and check that there is a SSL
dropdown with `Disabled` config set.
(7) Check that test datsource passes and query in (4) still works. 
(8) Create a new datsource and check that it has SSL option set to
`Enable with no verify`.
(9) Check that datasource in (8) works.

### 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
- [ ] 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-02-20 18:32:46 +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
subratadeypappu
e05683889f
fix: Do not replace binding with null if no value found (#11688) (#20679) 2023-02-17 17:56:07 +07:00
Shrikant Sharat Kandula
b456bad1e3
fix: Issue with filter not working with IPs (#20688)
We're missing a filter to check for requests that contain a direct IP address, that's listed in the disallow-list. This PR fixes that.
2023-02-17 10:03:02 +05:30
Vaibhav Tanwar
2dec7eb7f4
feat: Snowflake connection pool (#19468)
## Description
- Add connection pool for Snowflake plugin.
2023-02-14 17:44:42 +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
PiyushPushkar02
8be64ff1f6
fix: S3 Connection IllegalStateException Handling (#19872)
## Description

- The PR adds illegal state exception handling for S3 connection
- A JUnit test case has been added for the same.

**Note : We were not able to recreate the original issue. The pr
contains changes for handling the issue if it comes**

Fixes #15620

## Type of change

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

## How Has This Been Tested?

- Manual
- JUnit TC Added

## 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
- [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-20 15:39:28 +05:30
Sumit Kumar
2a6deacbed
fix: fix Snowflake JDBC driver connectivity issue (#19827)
## Description
- Use `JSON` format instead of `Arrow` format.
- Update JDBC connector package version.
- Remove redundant dependency inclusion lines from POM file. 

Fixes #19784
2023-01-18 14:15:23 +05:30
PiyushPushkar02
c40bdc6142
fix: PostgreSQL Trust Authentication Login (#19265)
### **Description**

- The PR removes the empty password validation check for PostgreSQL
while creating a new data source.
- The JUnit test case is added for the same. Implemented using a
separate PostgreSQL container with Trust Authentication enabled for the
Same.
- Please note for testing from UI perspective we have to create a user
with Trust auth enabled to validate the above changes.

Fixes  #14003

### **Type of Change**

- Bug Fix(non-breaking change which adds functionality)

### **How Has This Been Tested?**
- Manual
- JUnit TC added 

### **Checklist**:

- [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
- [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-13 11:27:27 +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
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
Nidhi
02c5c45972
fix: Added handling for empty evaluated values (#19438) 2023-01-04 02:17:57 +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
Vaibhav Tanwar
94989d4bc3
fix: RestApiPlugin get request raw body fix (#18474)
## Description

> RestApiPlugin fix for accepting raw body in get request.

Fixes #12343

## Type of change

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

## How Has This Been Tested?

- Manual
- Unit Tests

## 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
2022-12-30 17:34:31 +05:30