## Description
When an application is exported with credentials i.e. template
application, it does not contain the bearer token authentication
credentials. As a result, when user is trying to import this
application, the datasource configuration popup appears. This PR fixes
this issue.
TL;DR enable export-import application with bearer token authentication
Fixes#19415
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
- Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
- Manual
- Jest
### 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
- [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
As per current DB structure actions are embedded inside the JSObjects.
Every new method in JSObjects results in new action getting created in
DB. Consider user updates the JSObject.myFun1 then user will have
changes at 2 locations
Queries directory under myFun1 file
Body of JSObject1
We should not commit these duplicates and JSObject body should be
committed as is. These steps surely makes it easier to resolve the
conflicts even if occurs at same line.
## Description
- Fix git import / export / status related bugs. Please check out this issue for more details : https://github.com/appsmithorg/appsmith/issues/19038
- Remove feature flag usage from the server side, since it was interfering with the JUnit TCs. Please note that the overall feature is still under feature flag since the client side also uses the same feature flag.
Fixes#19038
## Type of change
- Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
- Manual
- JUnit TC
Test plan is the same as the one present for https://github.com/appsmithorg/appsmith/pull/17895
Issues raised during QA
- [ ] https://github.com/appsmithorg/appsmith/pull/19352#issuecomment-1373626895
## 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
- [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
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
## 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
* feat: Refactor entities based on AST parsing logic
* Deleted jmh file
* rts updates for the edge cases
* adding jest test cases
* update review comments
* Fixed issue with references outside of bindings and some other stuff
* Added tests for DSLUtils
* bug fix 18699
* Test fixes
* Test fixes
* Review comments
* Changed type to boxed
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
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
* Refactor changes for DSL
* Spaces
* Action and collection refactor logic
* Changes to some logic for DSL
* Fixed tests, added dynamic trigger path list logic as well
* Added test for dynamicTriggerList condition
* added analytics data to response in ast
* Fix for peer closed connection on AST
* Added comments for clarity
* Added logs for time taken by AST call
* handle export default and update success param accordingly
* updates for review comments
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
* 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
* Changes to on page load logic and consumption for update layout
* Slight clean up, tests and stuff
* - Added evaluationVersion logic based on application configuration
- Added configuration for slim and fat container rts availability
- Added backup logic of string comparison for slim containers
- Added tests for both paths
* Changes to on page load logic and consumption for update layout
* Slight clean up, tests and stuff
* Cleaned up comments all over
* Why isn't there even a setting to disable auto re-formats
* update rts logic to use updated shared AST logic
* Make changes to naming conventions
* Some temp stuff to check if update layout API changes will work out
* Added health check endpoint in RTS
* Added types for AST request
* update: type for save page request object
* update: return type for getEditorConfigs func
- Added applicationId to the type.
- Fetching from the redux store -> applications -> currentApplication -> id
* update: url generation func for update page API
- added applicationId as query param for the call
* Fixed test failures
* Fixed merge from release with on page load failure messages
* Fixed tests failing after merge
* Review comments, more tests, and fix for array index ref directly after .data path
* Test fix
* Addressed review comments
* Updated comment
* Fixed rts temporarily, added handling for data as function name, left with tests
* fix: failing rts server
* Tests for all types of actions and references
* Changes to test
* Modified type to set
* Test fixes
* Trying to make a test pass
* Added app id in cypress test update dsl
* Added app id in cypress test update dsl
* Added app id in cypress test update dsl
* Removed dep tree temp file
* Resolving compile issues after merging from release
* updated tests for applicationId
* corrected a typo
* fixed some more tests
* updated test
* Updated test
* DSL load AppId fix
* appId removal
* AgHelper LocalStorageCache()
* AgHelper LocalStorageCache() - commit 2
* AgHelper LocalStorageCache() - commit 3
* AgHelper LocalStorageCache() - commit 4
* AllWidgets_Reset_spec - Dsl fix
* Json_spec fix
* S3_2 spec fix
* fixes
* LocalStorageCache fixes
* fixes
* fixes
* fix
* OnLoadActions spec fix
* Promises spec fix
* S3_2 spec fix
* 16702 spec update
* OnLoadActions spec trial fix
* RTS fix
Co-authored-by: Nidhi Nair <cataclysm@Nidhis-MacBook-Pro.local>
Co-authored-by: Ayangade Adeoluwa <adeoluayangade@yahoo.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
* 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>
* 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)
* POC: Datatype handling autogenerated naming params client
* added array and file datatype
* handles all primitive types
* paramproperties convetred to map instead of array
* parametermap inversion
* handled no bindings bug
* feat: Consume action execution payload changes w.r.t. data type mapping (#15555)
This commit does the following things
1. It consumes data type metadata from payload
2. It consumes the mapping between the pseudo binding name and original binding name
3. It doesn't apply any logic w.r.t. data type identification after consumption
* added comments and cleaned code with proper datatypes
* removed URLencoding for binding params names
* feat: Remove URL decoding on param keys from server-side codebase (#15555)
* Remove unused import (#15555)
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
* chore: Added analytics for C, U, D operations on actions
* chore: Added isTemplateOrMock field in datasource
* fix: Set mock datasource field as true on creation
* Split template and mock identifiers into two. Added them to analytics as well
* Added tests as well as felt like a noob.
* Add isMock and isTemplate fields to datasources of created Actions
* Removed execute action triggered props
* Revert "Removed execute action triggered props"
This reverts commit cad1b8af504218813daa5f563f7b417fa263101b.
* Stringified response body before recording event
* Adding ds fields
* Reverting client side changes
* Fixed failing tests
Co-authored-by: Ayangade Adeoluwa <adeoluayangade@yahoo.com>
This adds a few missing analytics events and some more extra data for audit purposes. The missing event added are,
User login (login_USER)
User logout (logout_USER)
Import Application (import_APPLICATION)
Export Application (export_APPLICATION)
Clone Application (clone_APPLICATION)
Create Workspace (create_WORKSPACE)
Delete Workspace (delete_WORKSPACE)
View Page (view_NEWPAGE)
* 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>