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
* 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>
* 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
* 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>
* 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
* 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)
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.
* 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)
* 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>
* 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>
* 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>
## 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
## 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
* 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
* 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
* Added support for self signed certificate during OAuth2 flows, server side changes
* fix: authentication.useSelfSignedCert key added
* Merging from release
* Fixed issue with dependencies, plus bug with using ssl
* Cypress test attempt 1
* Cypress test attempt 2
* Cypress test attempt 3
* Clean up
* Review comments
* Enabled compression again
Co-authored-by: Aman Agarwal <aman@appsmith.com>
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>
* fix: Enable parsing dates before Jan 1, 1970 in MongoDB
This commit takes care of three things
1. It enables the application to parse dates before Jan 1, 1970 in case of MongoDB
2. JUnit test
3. Cypress test
* fix: Enable parsing dates before Jan 1, 1970 in MongoDB
This commit takes care of three things
1. It enables the application to parse dates before Jan 1, 1970 in case of MongoDB
2. JUnit test
3. Cypress test
Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
* fix: Switched Google Sheets JSON to local directory
* fix: Fixed placeholder text for insert row object
* fix: Enabled server side caching of plugin resources again
* Client changes 1
* add DSL functionality
* Temp commit for refactoring changes
* Do I even know what I'm doing here?
* chore: Second GS layout
* Update: Visibility conditional outputs for schemas
- Added the output from conditional outputs for schema children too
* Update: Entity selector visibility control
- Added logic for controlling visibility of sub components via the JS expressions system
* Update: Passing disabled prop to toggle button
* Update: Passing disabled prop to toggle btn
* Update: Styled component for toggle button
- Added disabled styles based on the disabled prop sent to the toggle form view JSON button
* Update: configProperty role in Entity Selector
- Removed dependance of the configProperty of the entity selector children to it's parent component
* Update: type of placeholder key
- Made placeholder key from form config JSON to accept either string or an object
- Earlier only string was accepted
- This is for pagination component
* Update: Added placeholder control for pagination
* Client changes 1
* add DSL functionality
* Do I even know what I'm doing here?
* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design
* fix: updated tooltip component for wrong ui on entity explore
* temp triggers
* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design (#12395)
* fix: updated uqi forms ui, clubbed JS switch button to ads, updated tooltip design
* fix: updated tooltip component for wrong ui on entity explore
* fix: updated tooltip ui, where condition placement, sort by ui
* temp form data access logic
* fix: updated sorting type width ui
* fix: updated ui for spacing, width and text issues
* Update: Type for tooltip of UQI forms
- Added option to send an object to the tooltipText object.
- This allows for composite components like pagination to have tooltips for each sub component
* Update: tooltip for pagination component
- Added handling to parse the tooltip for multiple components.
- This allows for composite components like pagination to have tooltips for each sub component
* Update: Type cast for tooltip component
- Made the content passed to tooltip component as a string only
* Update: Fixed tooltip component CSS
* Update: Dropdown option component
- Added a tooltip wrapper to each option
- This is to show on hover text like disabled state
* fix: updated ẇhere clause broken ui for condition
* Add: functions to check and extract expressions
- Loop through the formConfig and find any keys that have a value that is bindable
- Used pre defined regex to check if value is a moustache binding
* Add: Types for evaluated form configs
- Added types for the form configs to be evaluated and their output post eval
* Add: Flow to run the form config
- Run the form config and update the result to the redux state
* Update: Name of the type for formconfigs
- Updated since it was clashing with a component of the same name
* Add: Function to enforce config type checks
- This is done so that the improper configs can be weeded out and the rest of the form can be shown
* Add: Function to update evaluated config
- Added option to update the config if it's values needed evaluation
* Add: Type check for schema sections
* Update: Error handling for invalid control type
- We were throwing an exception till now, changed it to a warning text
* Add: Exposed tooltip for dropdown option disabled state
* Update: switch to json mode functionality
- Added logic to convert data to a string rather than an object when the first switch to JSON mode happens
* Update: Added key to tooltip for dropdown options
* Trigger API modification
* Add: function to fetch default trigger URL
* Update: Made URL optional in dynamic trigger config
* Update: Dynamic trigger API call
- Made the API call for dynamic triggers have URL as optional field
- Added type check to the response of the API call
* Update: resp type for trigger APIs
* Update: Moved code to utils folder
- Moved functions for UQI form eval processing to utils file
* Update: passing original controltype to JS switch
* Update: config for JSON editor mode
- Updated the config to have different options for JSON mode depending on the original control type
* Update: Connected line numbers flag to config
* Revert: CSS changes for tooltip
* Refactor: Removed consle
* Add: type for the config of dynamic values
* Add: Feature to evaluate config for triggers
* Refactor: fix type check errors
* fix: dropdown ui width with text alignment
* Update: fixed selector for dynamic values
* Update: selector call for fetchDynamicValues
* Add table header index prop for columns selector
* migration partial commit
* migration partial commit
* Refactor: removed unused import
* Update: reused function for checking dynamic value
* Update: removed unused import
* Fix format JSON issues
* Retrieve binding paths from entity selector components
* Fixes 6 remaining issues with UQI implementation
* Fix dropdown issues
* Fix dropdown height issues and fixes triggering of APIs when option is deselected
* Migration changes
* Fix QA generated UQI issues
* Fix projection component height and route change logic
* Fix multi select dropdown placeholder text issue and json stringify issue with switching view types
* Reset entity type value when command value changes
* Test changes
* Review comments
* Moved migrations around
* Corrected import statement
* Added JSON schema migration
* Updated schema version
* perf improvements and filter dropdown options feature
* Fix Code mirror component config for toggleComponentToJson input fields.
* Fix prettier issues
* fix prettier issues
* Fix style issues as a result of the merged conflicts
* Fix failing test case
* Fixed a few other flows (#14225)
* Fixed a few other flows
* Review comments
* Fix generate CRUD, fix evaluation of dynamic bindings and fix various styling issues.
* More fixes (#14367)
* Factor in the root formconfig parent key.
* Fix flickering issues, and evaluatedFormConfig issues
* fix: Teeny bugs (#14455)
* Teeny bugs
* Added previous functionality as is
* Improvements in the way we fetch dynamic values
* Fix stringiification issue and cyclic dependency issues
* Resolve projection component values deletion
* Resolve merge conflicts and fix prettier issues
* fix: Tsc issues
* Fix property pane connection navigation
* updating ee locator
* updating inputfield locator
* dropdown locator update
* Merge conflict not properly resolved.
* Fix s3 spec
* Fix Mongo Spec
* Fix some more tests
* fix: prevent cyclic dependency when switching to js mode (#14668)
* add delete events for change from array to string in diff
* add test to assert absence of cyclic dependency error when switching to js in switchgroup widget
* Assert that evaluation is not disabled when no cyclic dependency happens
* Cypress test preparations for google sheets and form controls
* Fixed a few test errors (#14874)
* Add: unit tests for uqi UI updates
- view type tests
- conditional output extraction
- processing conditional output to handle view/enabled state of the component
* Add: completed isValidFormConfig test
* Update: improved tests for update config
- These tests cover the functionality to update a section config after it's components are done evaluating
* Fix failing cypress tests and cyclic dependency issue
* Fixes some more tests
* Fixed migration of row objects (#14896)
* Bumped the version of design system package
* Update: reverted change to EE selector
* Fix deletion pointer
* Update: selector for js on load spec
- Synced with changes related to ADS dropdown
* Fix mongoDBShoppingCart spec
* Remove comments
* Fix: mongo shopping cart test failures
* fix: mongo shopping cart spec
* Dummy push to retrigger vercel
* fix: mongo shopping cart spec
* Update MongoDBShoppingCart_spec.js
* fix: removed unused click away
* dummy commit
* Update: moved helper functions to separate file
* Add: added tests for saga functions
- Worked on testing for
- extractFetchDynamicValueFormConfigs
- extractQueueOfValuesToBeFetched
* Add if check for queueOfValuesToBeFetched
* Resolve review comments
* Empty-Commit
Co-authored-by: Irongade <adeoluayangade@yahoo.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com>
Co-authored-by: Albin <albin@appsmith.com>
* fix: Consider zip compression info from API response header (#13515)
This commit fixes two things
- If certain API has Accept-Encoding header then Appsmith will take care of this before rendering response to the client
- Used MediaType.includes function for more extensive matching of the requsted API's content type
* fix: Add unit test on consuming API with gzip encoded response (#13515)
This commit takes care of two things
- Unit test on consuming an API which has response being encoded in GZip format
- Set default content-type to "text/plain" in case the content-type is not present in API response
* fix: Add Cypress test on consuming API with gzip encoded response (#13515)
This commit takes care of the following
- Cypress test on consuming an API which checks if it can read any property from the response sent from the API server encoded in GZip format