Commit Graph

35 Commits

Author SHA1 Message Date
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
tkAppsmith
4d18943099
chore: Added loginTimeout datasource param for jdbc connection to reduce tim… (#22922)
## Description

> In this pr, loginTimout param is added to datasourceProperties map of
HikariConfig object so that the ssl peer is verified within the UI
timeout limit
> This fixes the issue:
https://github.com/appsmithorg/appsmith/issues/22035

Fixes #22035

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


## How Has This Been Tested?
> Add a Snowflake DB with wrong account name as provided in the related
issue. Test the datasource, and wait for the error to come up. Error
should show up on UI in ~15 seconds with message that ssl peer identity
validation has failed.

- Manual
- Jest
- Cypress

### Test Plan
> Add a Snowflake DB with wrong account name as provided in the related
issue. Test the datasource, and wait for the error to come up. Error
should show up on UI in ~15 seconds with message that ssl peer identity
validation has failed. A correct account id should be instantly
validated. This is because with the account id provided in the issue,
the error took 60 seconds to occur which now has been reduced to 15
seconds.


## 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
2023-05-25 16:28:59 +05:30
Manish Kumar
99466e197d
chore: added application name in JDBC url for connection URI (#23074)
## Description

This PR includes changes for:

- Snowflake
- Redshift

> TL;DR: Modifying connection string to reduce auxiliary connection to
datasources in order to required properties.

Fixes #22659 

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

## Testing

#### How Has This Been Tested?
 This has been tested
- [x] Manual
- [ ] Jest
- [ ] Cypress
>
>

## 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:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [ ] 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
- [ ] 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-17 09:45:00 +05:30
PiyushPushkar02
781d5b5958
fix: Snowflake error msg fix on test datasource timeout (#23270)
## Description

- Set a flag called InitializationFailTimeout to -1 to create the
connection pool asynchronously.
- Set the **connectionTimeout** value to timeout to handle any issue
with the connection as the pool is getting created asynchronously now.
- Changed the error message returned to the user for an invalid
Snowflake URL.

Fixes #16140 
Fixes #22035 

## 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-16 10:19:40 +05:30
tkAppsmith
d9024156d5
fix: Added single quotes on hint query containing mustache substitution fo… (#22848)
## Description

> In this PR, single quotes have been added around substitution
expression in hint query of Snowflake DB.
> This fixes the issue:
https://github.com/appsmithorg/appsmith/issues/22132
> Single quotes is necessary in hint text because Snowflake DB don't
have prepared statements mode yet and with single quotes, the
substituted values appear in query without quotes leading to query
execution error.

Fixes #22132 


## Type of change

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


## How Has This Been Tested?
> Running a query in Snowflake DB integration, having substitution
expression not enclosed in quotes will give an error.
> Currently the hint query that has substitution expression has not
enclosed then in single quotes. Hence adding single quotes around them
to provide user with proper hint.

- Manual
### Test Plan
> Create a new "Create Query" for Snowflake DB. The hint query should
contain the sample substitution expression in single quotes.
> Run a fetch query for Snowflake DB containing substitution expression
without single quotes enclosing it and it should return an error.
> Run the query with quotes enclosing substitution expression and the
query should run successfully.


## 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-05-03 22:06:22 +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
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
Shrikant Sharat Kandula
4280ded88e
chore: Fix unnecessary re-shading of jars (#21994)
Solves a single thing in the build configurations, resulting in a few
wins.

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

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

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


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

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

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

>TL;DR 

Fixes # 


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


## Type of change

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


## How Has This Been Tested?

- Manual
- Jest
- Cypress

### Test Plan


### Issues raised during DP testing


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


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

---------

Co-authored-by: subrata <subrata@appsmith.com>
2023-02-18 18:25:46 +05:30
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
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
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
dependabot[bot]
d4068a24af
chore: bump jackson-databind from 2.12.6.1 to 2.13.4.1 in /app/server/appsmith-plugins/snowflakePlugin (#17695)
chore(deps): bump jackson-databind

Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.6.1 to 2.13.4.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 09:48:03 +05:30
Nidhi
c3e935ef40
fix: Remove datasource connection from cache when datasource is deleted (#17364)
* Changes to testDatasource interface method and archive flow

* Tests for plugin level testDatasource implementations

* Added test for refreshing cache on deleting datasource

* Modified warnings to errors in logs

* Fixed test

* Fixed test
2022-10-17 10:31:26 +05:30
Nidhi
66f3dfe790
chore: Move to Jupiter JUnit5 (#17083)
* Upgrading to Jupiter tests for everything but plugins

* Whoops, too soon

* Fixed failing tests

* Imports fixed

* Removed PowerMock dep and JUnit4 from interfaces

* Woohoo! That's testcontainers

* Added maven enforcer to disallow junit4

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

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

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

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

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

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

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

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

* Weird formatting and version upgrades

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-29 08:54:07 +05:30
Sumit Kumar
0cbe81dfde
feat: merge GraphQL plugin to release (#16554)
* merge GraphQL plugin to release
2022-09-09 21:29:47 +05:30
Arpit Mohan
f5c67840ea
chore: Closing resources to ensure there are no memory leaks (#15343)
This is based on warnings from Sonar's static code analysis.
2022-07-29 19:51:10 +05:30
Nidhi
6df4dafead
chore: Better server logging infra (#15440)
* Fixed a bunch of server side logging issues

* Tests

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

Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
2022-07-19 10:23:27 +05:30
dependabot[bot]
1e50701075
chore: bump jackson-databind from 2.12.6 to 2.12.6.1 in /app/server/appsmith-plugins/snowflakePlugin (#12402)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.6 to 2.12.6.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-01 14:16:10 +05:30
dependabot[bot]
92cf99f025
chore: bump spring-core from 5.2.3.RELEASE to 5.3.18 in /app/server/appsmith-plugins/snowflakePlugin (#12474)
Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.2.3.RELEASE to 5.3.18.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.2.3.RELEASE...v5.3.18)

---
updated-dependencies:
- dependency-name: org.springframework:spring-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-01 12:11:20 +05:30
Snyk bot
7e6a48c7b8
chore: [Snyk] Security upgrade com.fasterxml.jackson.core:jackson-databind from 2.10.5.1 to 2.12.6 (#10015)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-2326698
2021-12-28 12:08:53 +05:30
Arpit Mohan
96677ef673
fix: Updating log4j to 2.17.0 to prevent JNDI lookups (#9863)
Also making minor edit to not show "Application name updated" toast message. This is a counter-productive toast that is distracting the user
2021-12-20 16:01:08 +05:30
Sumit Kumar
f3880f32ca
fix: validate database, warehouse and schema name (#7683)
* Validate database, warehouse and schema name during test datasource and get structure calls.
* Minor refactor to avoid repeating code.
2021-09-23 15:35:21 +05:30
Trisha Anand
cbf7dc2745
feat: New Mongo UQI Plugin with new datastructures (with old UI) (#6666) 2021-09-02 14:00:18 +00:00
Nidhi
8be0580c77
Fixed template queries for PG, MySQL and Snowflake (#6698)
* Fixed template queries

* Fixed tests
2021-08-19 16:35:32 +05:30
Nidhi
a65bcb74b3
Fixed ds form not functional because of eval supported fields (#6665) 2021-08-18 08:16:56 +05:30
Nidhi
f05e32a97e
Throw a stale connection exception when authentication token expires in Snowflake (#6612)
* Throw a stale connection on authentication token expired

* Added JUnit test
2021-08-16 10:33:39 +00:00
Nidhi
dc8673c22c
Changes to props (#6574) 2021-08-13 19:32:00 +05:30
Abhijeet
70cf1e39b8
Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
2021-08-02 19:03:28 +05:30
Abhijeet
9633d1e1c3
Add autogenerate field in datasource structure for each column (#6018)
* Added field to autogenerate values in DB column

* Added comment and refactor

* Autogenerate field update according to names instead of type for ArangoDB
2021-07-23 09:00:32 +05:30
Nikhil Nandagopal
e8ba1bee7f
removed quotes from sql templates because of prepared statements being on (#5404)
removed comments from sql templates confusing users with errors because of linting
2021-06-25 14:39:39 +05:30
Nidhi
57adbd7777
Schema info in templates query (#5244) 2021-06-18 11:31:17 +05:30
Nidhi
884636f33f
Snowflake integration (#5176)
* POC for snowflake integration with Appsmith

This is just a rough version to see if the functionality works. Needs to be cleaned up & enhanced for production usage.

* Plugin with connection, monos, ds testing, validation, templates, structure and forms

* Better comments

* Default schema to public

* Changed logging destination, populated request in result and used thread group for datasource creation

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2021-06-17 15:03:18 +05:30