Commit Graph

563 Commits

Author SHA1 Message Date
Aman Agarwal
1bcb321ec3
fix: gs quick wizard table header index (#18242)
* fix: gs quick wizard table header index

* fix: disable generate button if error

* Omni spex fix

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-12-08 22:20:51 +05:30
appsmithguru
b64df3e1c9
chore: rename_triggerUtils (#18405)
Refactored Renamed TriggerUtils.java to RestAPIActivateUtils.java and its usage
2022-12-07 15:03:50 +03:00
dependabot[bot]
8e9ce96565
chore: bump postgresql from 42.4.1 to 42.4.3 in /app/server/appsmith-plugins/postgresPlugin (#18407)
chore: bump postgresql in /app/server/appsmith-plugins/postgresPlugin

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.1 to 42.4.3.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.1...REL42.4.3)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  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-11-25 11:19:24 +05:30
Vaibhav Tanwar
49c3b929e9
feat: Default port for Elastic Search plugin (#17468)
* add default port for ElasticSearch plugin.
2022-11-03 06:51:34 +05:30
amogh2019
a99a989929
chore: Mongo plugin refactor Mongo plugin JUnit TCs (#17633)
* Refactoring MongoPlugin Junit TCs into smaller files
2022-10-31 18:42:54 +05:30
dependabot[bot]
920e7f8305
chore: bump jackson-databind from 2.12.6.1 to 2.13.4.1 in /app/server/appsmith-plugins/graphqlPlugin (#17703)
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:37 +05:30
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
dependabot[bot]
a26c43622f
chore: bump jackson-databind from 2.12.6.1 to 2.13.4.1 in /app/server/appsmith-plugins/googleSheetsPlugin (#17694)
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:47:38 +05:30
dependabot[bot]
02b3bd3670
chore: bump jackson-databind from 2.12.6.1 to 2.13.4.1 in /app/server/appsmith-plugins/restApiPlugin (#17693)
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:47:10 +05:30
amogh2019
37a1738490
fix: MongoPlugin Update Command : parsing valid document or array of valid documents (#17732)
* parse array of valid documents for update command
2022-10-30 17:07:02 +05:30
subratadeypappu
eaf9b95bd6
fix: Internal server error in case of ARRAY type in MySQL (#17702) (#17838)
Fix internal server error in case of ARRAY type in MySQL (#17702)

This commit adds support for handling array like data in MySQL
- If the data type identified by the client side is of type ARRAY it will be treated as STRING as MySQL doesn't have support for ARRAY data type
2022-10-28 11:51:59 +05:30
Sumit Kumar
68b7f16932
fix: update HikariCP package version (#17806)
update HikariCP package version
2022-10-27 14:07:37 +05:30
amogh2019
9e1303905e
fix: ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (#17707)
* get a string casted value safely from form data

* letting warning be and removing unwanted line
2022-10-25 18:56:35 +06:00
subratadeypappu
19e2e5785e
Fix/16994 refactor common datatype handling (#17429)
* fix:Add array datatype to execute request

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

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

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

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

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

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

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

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

* Move BsonType to mongoplugin module (#16994)

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

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

* Refactor test case name (#16994)

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

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

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

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

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
2022-10-18 11:02:37 +05:30
Vaibhav Tanwar
7defff9a7a
fix: ms sql default port updated to 1433 (#17342) 2022-10-18 09:08:39 +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
Ayangade Adeoluwa
18ef195f13
fix: Switches mongo field type from dynamic input text to dynamic text (#17447)
Switches mongo field type from dynamic input text to dynamic text
2022-10-13 19:26:55 +05:30
Kishore
def8f5c03a
fix: Arango plugin: change default db name to _system (#16198) 2022-10-07 23:50:44 +05:30
Sumit Kumar
4f358e0c68
fix: fix GraphQL query run behaviour post cursor based pagination configuration (#17316) 2022-10-07 11:15:38 +05:30
Aman Agarwal
78c89894f8
fix: updated settings page design (#16990)
fix: updated settings page design
2022-10-06 16:36:29 +05:30
subratadeypappu
d2de8f7cec
feat: Implement data type handling in MySQL (#16621) (#17017)
* feat: Implement data type handling in MySQL (#16621)

With this implementation we can now achieve the following under prepared statement:
- Ability to distinguish between null object and "null" string
- Ability to distinguish values like {{"098765"}} and {{098765}}. The former is identified as a string and the latter is identified as an integer

* feat: Add unit test cases on data type handling in MySQL (#16621)

* chore: Move MySQL specific types to a separate class (#16621)

* chore: Remove import shortening (#16621)

* Fix testStructure test case to have loose coupling with the order of tables (#16621)

* Fix: Add missing client-side data types in params in a few test cases (#16621)

* Fix query in test case (#16621)

* Fix test cases and add small refactoring (#16621)

* Refactor assertion with a check on Optional (#16621)

* additional cypress test cases for mysql

* updated test case object

* update for failing test cases

* mysql failure point fix

* mysql false spec failure point fix

* fix flacy test cases

* flacky JSON test cases

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-10-04 10:45:10 +00:00
Nidhi
ca5499c358
chore: Tests pass, server runs w/ analytics (#17205)
* Tests pass, server runs w/ analytics

* Fix okhttp
2022-09-30 11:49:25 +05:30
Manish Kumar
00486833ea
fix: MongoPlugin smart substitution for regex arguments (#16977)
* BugFix: Fix for mongoPlugin smart substitution of regex attributes, Fixes: https://github.com/appsmithorg/appsmith/issues/11880
	Changes:
		MongoPlugin.java
		MongoPluginTest.java

* Added test for decimal numbers and made changes to regex

* code formatting: Formatted some test cases in MongoPluginTest.java
2022-09-29 10:37:19 +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
Shrikant Sharat Kandula
4456687400
Fix domain resolution in Elasticsearch (#17026)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-26 08:55:54 +05:30
Sumit Kumar
b8f30a8f10
fix: remove RapidAPI plugin src code from API server (#16501)
* remove RapidApi plugin related code from API server
* mark RapidApi plugin related data as deleted in DB (soft delete)
2022-09-23 13:20:03 +05:30
Shrikant Sharat Kandula
5ac26692ab
Fix host error message in Elasticsearch config (#17001) 2022-09-23 10:01:43 +05:30
Nidhi
2c2025dfea
fix: Make projection fields refresh when table heading row index selection is updated (#16883) 2022-09-21 15:11:56 +05:30
Shrikant Sharat Kandula
769719ccfe
fix: Better support for disallowed hosts (#16842) 2022-09-19 12:41:57 +05:30
subratadeypappu
e791d7f0d9
fix: Class cast exception during file upload in S3 bucket (#15832) (#16746) 2022-09-16 21:14:27 +06:00
subratadeypappu
cf2ef37527
feat: Add a service layer to get AppsmithType from client-type (#16508) (#16619)
* feat: Add a service layer to get AppsmithType from client-type (#16508)

This commit takes care of the following things
- It creates a service layer to get the target AppsmithType from the client-side data type and the evaluated value
- This service layer is currently not consumed by any plugins
- A full JUnit test suit for MySQL-specific types

* feat: Remove FloatType and add comments for better understanding (#16508)

* feat: Add FallbackType and covert the DataTypeService to a util class (#16508)

This commit takes care of these
- Introduce FallbackType as a separate type
- Convert the DataTypeService to a util class
- Add java doc around the methods in DataTypeService class

* feat: Rename DataTypeService to DataTypeServiceUtils (#16508)
2022-09-16 17:40:28 +06:00
Shrikant Sharat Kandula
83fc89f1a1
fix: No-op Asserts (#16690) 2022-09-13 13:55:33 +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
Shrikant Sharat Kandula
06c8210a3a
fix: Fix LinkageError with macOS DNSResolver class (#16581)
On macOS, when running a MySQL query, we see the following error:

```
java.lang.ClassCastException: class io.netty.channel.kqueue.KQueueEventLoopGroup cannot be cast to class io.netty.channel.EventLoopGroup
```

This is because of a `LinkageError`, caused because these classes exist both in the parent `server` module classpath, as well as in this plugin's classpath separately. To fix this, we removed this dependency from the server module.

But then, this caused a problem with how the `DNSResolver` class was being, well, resolved by the application class loader, vs the plugin class loader. This is a macOS specific problem, and doesn't affect other operating systems.

For this, we add just this package as a dependency to the MySQL plugin.
2022-09-06 22:00:53 +05:30
Shrikant Sharat Kandula
9dbc648e4c
Fix LinkageError in Saas & GSheets plugins (#16565) 2022-09-06 13:23:04 +05:30
subratadeypappu
3725834fb4
feat: Add server-side base data types (#15784) (#16240)
* feat: Add server-side base data types (#15784)

This commit takes care of the following two things
- It adds the server-side base data types which are considered common data types across plugins
- It adds a few MySQL specific types

* feat: Add MySQLBooleanType and refactor MySQLDateTimeType with camelCase (#15784)

* feat: Move MySQL specific types to mysqlPlugin folder (#15784)
2022-09-02 16:25:36 +05:30
sneha122
990692cc81
fix: gsheets insert command placeholder issue fixed (#16441)
gsheets insert command placeholder issue fixed

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2022-09-02 12:32:51 +05:30
Shrikant Sharat Kandula
8a0838505a
All outgoing requests should go through the configured proxy (#14427)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-01 11:16:45 +05:30
Manish Kumar
fcfc3d97dc
feat: Making the error messages in amazon s3 plugin informative (#15861)
* feat: make AmazonS3 plugin error messages more readable. #8664

* added curly braces in if/else block

* modified according to PR review comments

* modified according to PR review comments

* This commit introduces readable errors for S3 Datasource: https://github.com/appsmithorg/appsmith/issues/8554
It changes three files:
	*AmazonS3ErrorUtils.java
	*AmazonS3PluginTest.java
	*AmazonS3ErrorUtilsTest.java

This commit has been tested:
	*manual testing
	*Junit testing

* This feature-commit introduces readable errors for S3 Datasource: https://github.com/appsmithorg/appsmith/issues/8554
It changes three files:
	*AmazonS3ErrorUtils.java
	*AmazonS3PluginTest.java
	*AmazonS3ErrorUtilsTest.java

This commit has been tested:
	*manual testing
	*Junit testing

* added new line in the AmazonS3ErrorUtilsTest.java

* * Ommited unused imports in following files:
	* AmazonS3ErrorUtils.java
	* AmazonS3PluginTest.java
	* AmazonS3ErrorUtilsTest.java

* Moved test functions
* combined instance checking for AmazonServiceException and its subclass

* removed unused imports from AmaxonS3UtilsTest.Java

Co-authored-by: somna <somnathdasadhikari@gmail.com>
2022-08-15 10:48:20 +05:30
Nidhi
10c9f77359
fix: Make default DB compulsory in URI string format (#15881)
* fix: Use admin as default database when no Mongo DB is specified

* fix: Make default db compulsary instead

* Added back check during execution per review

* Json field spec fix

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-08-11 15:35:27 +05:30
Ayangade Adeoluwa
1ecffb8272
fix: Modify Form Control Inputs for various Datasource Actions (#15396)
* Modify control type for MongoDB Collection field

* Make more form control changes across datasources

* Fix cypress errors

* Fix typescript error

* Fix more cypress tests

* Fix failing MongoDBShoppingCart spec

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-08-09 13:05:59 +00:00
Arpit Mohan
c1dbca6779
fix: Adding checks to prevent disallowed hosts from connecting via Elasticsearch plugin (#15834)
## Description

This PR fixes an issue where a potentially malicious user can connect to disallowed hosts from the Elasticsearch plugin within Appsmith. This is because Elasticsearch client SDK is a HTTP interface underneath the hood. 

## Type of change

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

## How Has This Been Tested?

- Junits for the following:
  - create datasource with disallowed host
  - validate datasource with disallowed host
  - test datasource with disallowed host

## Checklist:

- [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
2022-08-08 21:07:15 +05:30
Arpit Mohan
0967b516b6
fix: Adding a check for invalid hosts on redirects as well (#15782)
## Description

Fixes issue for checking for invalid hosts even when there are redirects in the Rest API plugin.

## Type of change

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

## How Has This Been Tested?

- Junit test

## Checklist:

- [ ] 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
2022-08-06 12:36:43 +05:30
dependabot[bot]
bd555c1bfd
chore: bump postgresql from 42.3.3 to 42.4.1 in /app/server/appsmith-plugins/postgresPlugin (#15781) 2022-08-06 12:35:25 +05:30
Manish Kumar
5c1ad6403e
fix: Elasticsearch DB Head request fails on some ES instances when used on /test API (#15332)
* This commit changes two things:

	* Pom.xml --> ES- Restclient version to 7.17.5 from 7.9.2
	* ElasticSearchPlugin.java ---> changed the testDatasource method to expect a 200 instead of a 200 or 404 HTTP status code

This commit fixes a high-priority bug with github issue  https://github.com/appsmithorg/appsmith/issues/14909
	* it can now negotiate around a 403 forbidden error as it does try to send head only to user provided  URI

This commit has been tested:
	* manually for CRUD at local with ES version 7.9.2
	* manually for CR at user provide aws instance running 7.9.3 on docker

* |
|	BugFix:
|
|       This commit changes two files:
|
|               * ElasticSearchPlugin.java --> added feature to distinguish between unauthorized and not found datasources.
|               * ElasticSearchPluginTest.java ---> added testcases to verify the unauthorized and not found test cases
|
|       This commit adds features on top of previous commit  https://github.com/appsmithorg/appsmith/issues/14909
|               * this commit adds the feature of more readable error messages while testing the elasticsearch datasource. i.e wrong endpoint errors and unauthorized issues
|
|       This commit has been tested:
|		* Junit
|		* manually

* removed leftover comments from the parent commit and updated response texts for better readability

* removed wildcard imports from appsmith-plugins/elasticSearchPlugin/src/test/java/com/external/plugins/ElasticSearchPluginTest.java
2022-08-03 16:31:00 +05:30
Sumit Kumar
f5de45dfd7
fix: fix Mongo plugin query execution failure (#15591)
* add handling for IllegalStateException
add TCs

* rename var
2022-08-02 14:55:06 +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
Sumit Kumar
02f1451443
fix: fix query failure on simultaneous execution of multiple queries (#15458)
* update driver
remove connection closure when not required

* add connection pool
remove ssl options

* got working with postgres driver

* use Redshift driver instead of postgres

* updated JUnit TC
added comments
minor refactor

* add comment
cleanup

* update default port
2022-07-28 17:01:17 +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
Nidhi
833a6b05c4
fix: Modified available scopes for Google Sheets (#15169)
* fix: Modified available scopes for Google Sheets

* fix: Fixed locator reference

* Modified text for scope

* Fixed failing tests
2022-07-21 16:35:54 +05:30