Commit Graph

369 Commits

Author SHA1 Message Date
Manish Kumar
70df93a37c
feat: updating datasource endpoints contract (#23920) 2023-07-03 18:36:05 +05:30
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
Nayan
d815fc7cc9
chore: Import action and action collection in bulk during file import (#24603)
## Description
When we import an application from file for Git, file import, templates
and other features, we import the list of actions one by one. This leads
to transaction timeout and other performance issues when the application
has a large number of actions and action collections. This PR imports
the actions and action collections in bulk so that number of database
queries are significantly reduced.

#### PR fixes following issue(s)
Fixes #24419
2023-06-28 18:48:28 +06:00
Nidhi
895ef52701
chore: Removed spring security and redis traces (#24758)
## Description
Adds a filter for http endpoints that are recorded in our traces. We
have discarded the actuator endpoints since we don't care about their
metrics.

We have also filtered spans to only contain the ones that we have
manually declared across the project. All spans need to use the
`appsmith.` prefix to pass through this filter. This change discards
spring security and redis spans as of today.

Fixes #24757

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)
>
## Testing
>
#### How Has This Been Tested?
- [x] 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
- [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
2023-06-27 11:19:28 +05:30
Nayan
9e37b8b194
fix: Reconnect failure error after fork application (#24683)
## Description
After forking an application, the reconnect modal appears. In the
reconnect modal, it's not possible to reauthorize the google sheets
plugin. This PR fixes the problem.

#### PR fixes following issue(s)
Fixes #24566
> 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
- Bug fix (non-breaking change which fixes an issue)

## 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
- [x] Jest
- [ ] 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
- [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/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#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
- [ ] 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-06-23 11:24:02 +05:30
Anagh Hegde
7c65e35ee8
fix: rebase error message during conflicts (#24414)
## Description
Updated the error message for rebase during the conflicts state

Fixes https://github.com/appsmithorg/appsmith/issues/24391


#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## Testing
- [ ] Manual
- [ ] Jest
- [ ] Cypress

#### Test Plan
#### Issues raised during DP testing
## 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:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#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

---------

Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
2023-06-17 14:25:16 +05:30
Anagh Hegde
2f4c52cb5e
chore: revert git rebase with discard (#24479)
Due to one of the corrupted app state in release, we are going to revert
this and retest it and release later.

https://theappsmith.slack.com/archives/CTHN8GX5Y/p1686637493386649
2023-06-15 13:15:55 +05:30
Sumit Kumar
9330829e40
fix: fix execution of REST API query when dynamic binding is present in the URL (#24368)
## Description
-  fix execution of REST API query when dynamic binding is present in the URL

Fixes #24218
2023-06-13 18:32:19 +05:30
Tanvi Bhakta
eeaf4ec044
fix: casing changes (#23515)
Fixes: 
https://github.com/appsmithorg/appsmith/issues/24202

#### Type of change

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

## 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
- [ ] Manual
- [ ] Jest
- [ ] 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
- [ ] 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:
- [ ] [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-06-09 14:22:27 +05:30
Anagh Hegde
56d91190d6
feat: refactor git discrad flow (#23988)
## Description
Added the git rebase to the discard flow. This is to avoid the push
failure when due to branch protection rules.
Prev, it was discard and pull. This flow had above mentioned issue where
if the branch protection rule was present, then the local branch would
be in a bad state.

#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/appsmith/issues/23989

#### 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
- [ ] 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:
- [ ] [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

---------

Co-authored-by: brayn003 <rudra@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2023-06-09 10:58:50 +05:30
tkAppsmith
f6c68284e5
fix: added gitsyncid assignment to DataSource constructor with dataSourceS… (#23912)
## Description
> Added gitsyncid assignment to DataSource constructor with
dataSourceStorage as argument

#### PR fixes following issue(s)
Fixes #23816 (partially),  #23822

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

## Testing
>
#### How Has This Been Tested?
- [x] Manual
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> To test this, please import an application to a workspace from git and
commit the changes that come up in git sync tool. > Check that the
datasources dont have their gitsyncid updated as it was happening in the
issue https://github.com/appsmithorg/appsmith/issues/23816

## 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:
- [ ] [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
- [x] 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-06-02 19:18:02 +07:00
sneha122
2cc92640bf
fix: gs authorisation status updates (#23890)
## Description
This PR fixes inconsistencies in the authenticationStatus property for
google sheets:
- In case of google sheets datasource, when we authorise the datasource,
but do not grant permissions, the authenticationStatus is being saved as
`IN_PROGRESS`, instead it should be `FAILURE` as user failed to give
permissions.
- This PR adds 3 new statuses in AuthenticationStatus Enum,
`IN_PROGRESS_PERMISSIONS_GRANTED`, `FAILURE_ACCESS_DENIED` and
`FAILURE_NO_FILES_SELECTED`.
- `IN_PROGRESS_PERMISSIONS_GRANTED` is used in case of specific sheets
scope, so that we would know that users have granted permissions and
selection of files is pending
- `FAILURE_ACCESS_DENIED` denotes, for any of the scope, if user does
not grant permissions.
- `FAILURE_NO_FILES_SELECTED` denotes, for specific scope, if user
grants permissions but files have not been selected yet.

#### PR fixes following issue(s)
Fixes #23877 
> 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)
>
>
>
## 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
>
>
#### 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
- [ ] 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
- [x] 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

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-06-02 11:58:46 +05:30
Sumit Kumar
823c971c67
fix: fix GET request issue with Figma's REST APIs (#23597)
## Description
- Earlier, when sending a GET request (with no body and content type defined by the user), the API server would set the body to empty string but still attach it with the API request before making the REST API call. While this worked fine with almost all of the use cases, it broke when used against Figma's GET APIs. Figma's API server would detect the body object and return a `BAD REQUEST` error.
- This PR introduces a check that avoids attaching the body object when not required, hence resolving the issue with Figma's GET APIs.

#### PR fixes following issue(s)
Fixes #14894
2023-05-26 12:27:27 +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
3e5f77e1c9
fix: fixes for CI failures on EE (#23711)
This PR mainly tries to address ci failures on EE, this doesn't change
functionality on CE but changes the method flows
2023-05-25 13:14:42 +05:30
Nidhi
2c7798cca6
chore: Refactoring datasource storage consumption to start using the new collection (#23296)
Starts to use the datasource storage collection to store configs moving
forward. WIP

---------

Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com>
2023-05-23 19:27:53 +05:30
Nidhi
4b6e21b9b9
chore: Remove unused datasource query endpoint (#23426)
## Description
This PR removes an unused endpoint to reduce the scope of changes for
multiple environments

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

## Testing
No testing required for this change, regression would cover testing for
this.
2023-05-20 15:03:11 +05:30
albinAppsmith
629999f124
feat: [epic] appsmith design system version 2 deduplication (#22030)
## Description

### Fixes
- [x] https://github.com/appsmithorg/appsmith/issues/19383
- [x] https://github.com/appsmithorg/appsmith/issues/19384
- [x] https://github.com/appsmithorg/appsmith/issues/19385
- [x] https://github.com/appsmithorg/appsmith/issues/19386
- [x] https://github.com/appsmithorg/appsmith/issues/19387
- [x] https://github.com/appsmithorg/appsmith/issues/19388
- [x] https://github.com/appsmithorg/appsmith/issues/19389
- [x] https://github.com/appsmithorg/appsmith/issues/19390
- [x] https://github.com/appsmithorg/appsmith/issues/19391
- [x] https://github.com/appsmithorg/appsmith/issues/19392
- [x] https://github.com/appsmithorg/appsmith/issues/19393
- [x] https://github.com/appsmithorg/appsmith/issues/19394
- [x] https://github.com/appsmithorg/appsmith/issues/19395
- [x] https://github.com/appsmithorg/appsmith/issues/19396
- [x] https://github.com/appsmithorg/appsmith/issues/19397
- [x] https://github.com/appsmithorg/appsmith/issues/19398
- [x] https://github.com/appsmithorg/appsmith/issues/19399
- [x] https://github.com/appsmithorg/appsmith/issues/19400
- [x] https://github.com/appsmithorg/appsmith/issues/19401
- [x] https://github.com/appsmithorg/appsmith/issues/19402
- [x] https://github.com/appsmithorg/appsmith/issues/19403
- [x] https://github.com/appsmithorg/appsmith/issues/19404
- [x] https://github.com/appsmithorg/appsmith/issues/19405
- [x] https://github.com/appsmithorg/appsmith/issues/19406
- [x] https://github.com/appsmithorg/appsmith/issues/19407
- [x] https://github.com/appsmithorg/appsmith/issues/19408
- [x] https://github.com/appsmithorg/appsmith/issues/19409

Fixes # (issue)
> 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)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- Jest
- 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
- [ ] 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: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvi@appsmith.com>
Co-authored-by: Arsalan <arsalanyaldram0211@outlook.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Rohit Agarwal <rohit_agarwal@live.in>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com>
Co-authored-by: Vijetha-Kaja <119562824+Vijetha-Kaja@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-05-20 00:07:06 +05:30
PiyushPushkar02
99b3f9866d
chore: analytics event for schema fetch and datasource test (#23387)
## Description

- Added events for Data source test
- Added events for Data source schema fetch event.
- For data source schema fetch event failure, in case there is an
exception thrown the event will not be captured as that requires a big
change. This is being tracked here #23131

#### PR fixes following issue(s)
Fixes #23128 

#### Type of change

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

#### How Has This Been Tested?
- [x] 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
- [ ] 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:
- [ ] [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-16 20:24:52 +05:30
Sanveer Singh Osahan
504436c998
chore: Server Side Event for running action (#23379)
## Description
Server Side Event to capture run action. Determines if action is user
initiated or not.

Fixes #23127

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

## 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
- [ ] 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
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-05-16 18:40:52 +05:30
Nidhi
1337134cd4
chore: Refactoring action execution flows to clean up files (#23265)
This task is simply dividing action execution related flows into
separate files for clarity. It will allow us to pull this module out in
the future.
2023-05-15 13:16:59 +05:30
Nilansh Bansal
fba8c82a19
feat: enable datasource reconnection while forking application (#22390)
## Description
> This PR sets a field `isPartialImport` in the
`/{defaultApplicationId}/fork/{workspaceId}` POST API response, based on
which the client will show the reconnection modal.
> If the `isPartialImport` field is True, the client has to show the
reconnection modal.
> Earlier, this field was only added as part of the Import flow and not
the forking flow, hence the reconnect datasource modal was only shown
while importing an app from JSON when datasource credentials are not
present.

This PR will solve the following issues: 

1. Create a new field `forkWithConfiguration` that will represent
whether datasource credentials will be shared while forking or not.
Issue #21691 (Initial PR #22157, but had to be reverted due to the
reconnection modal functionality, not being present in the forking code)
2. Enable Reconnection Datasource Modal while forking an app if
datasource credentials are not shared. Issue #22305
3. Reset flags `forkWithConfiguration` and `exportWithConfiguration` to
False when forking/cloning/exporting an app. Issues #22165 #22166
4. Reconnect Datasource Modal is not being triggered when forking apps
using Google Sheets datasource.
https://github.com/appsmithorg/appsmith/issues/16767

## Frontend changes
Fronted changes involve showing the reconnect modal depending of the
flag sent by the backend post forking. So far on prod datasources need
not require re-authentication, with this change they will be prompted to
re-authenticate.
Cypress tests will be pushed post merging this PR as cypress CI uses
release backend. Have created a PR for it
d703a00a7c (diff-2f04da010b929ec86d1064b51ce570cc33fee7481997ff5477a48e3527773dd9R7)



https://user-images.githubusercontent.com/67054171/234506804-f1b5f21b-dd4d-4616-8cfe-6b06649d5df6.mov



## Deploy preview
https://ce-22390.dp.appsmith.com/

Fixes #22305 
Fixes https://github.com/appsmithorg/appsmith/issues/22609


## Type of change

- Breaking change (fix or feature that would cause existing
functionality to not work as expected)


## How Has This Been Tested?

- Manual
- JUnit
- Cypress

### Test Plan

-
https://docs.google.com/spreadsheets/d/1vGYaKHtl8-g7--zBEAP219DCZLhoNah6IwjiijJlQAc/edit#gid=0

### 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:
- [X] 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

---------

Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
2023-05-12 09:55:41 +05:30
Nidhi
d6c23b05ab
chore: Renamed datasource storage doc for indexing needs (#23246)
This PR is simply a refactor to make sure index names are smaller.
2023-05-12 01:58:54 +05:30
Manish Kumar
1d1f01389c
chore: Adding CRUD for Dsconfig (#23138)
## Description

> TL;DR: Separating the DatasourceConfiguration as a new collection to
accommodate for environments

This PR adds services and models for DatasourceConfigurationStorage,
which will now hold the datasourceConfiguration previously held in
Datasource. Additionally, DatasourceConfigurationStorage will also hold
invalids and messages from the datasource. It's indexed on datasourceId
and environmentId.

This PR doesn't change the way Datasource consumes and keeps
datasourceConfiguration. This will be followed by other PR which will
change consumption of datasourceConfiguration into a transitory field
### Changes Made:

- Created DatasourceConfigurationStorage model with datasourceId,
environmentId, datasourceConfiguration, invalids, and messages fields.
- Created DatasourceConfigurationStorageRepository interface and
implementation for managing DatasourceConfigurationStorage in the
database.
- Added DatasourceConfigurationStorageService for performing CRUD
operations on DatasourceConfigurationStorage.
- TODO : Update DatasourceService to use
DatasourceConfigurationStorageService for managing
DatasourceConfigurationStorage.



#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/appsmith-ee/issues/1339

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

## Testing

#### How Has This Been Tested?
- [x] Manual
- [ ] Jest
- [ ] Cypress


## 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:
- [ ] [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-11 21:13:02 +05:30
Abhijeet
467dc1d55b
fix: Email domain hash in analytics event (#23114)
## Description
We are solving 2 problems with this PR:
1. For `Installation Setup Complete` event email domain hash was
incorrect and earlier we were hashing the instanceId which means if user
with same email tries to run 2 different instances hash was different.
2. `IP` is a reserved keyword for tracking events in Mixpanel though
this is allowed in Segment. Instead of showing the ip as is, Mixpanel
provides derived property. As we want derived props alongwith the ip
address we are sharing the IP address in separate keys.
Ref:
https://help.mixpanel.com/hc/en-us/articles/360001355266-Event-Properties

#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/cloud-services/issues/675

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

#### How Has This Been Tested?
- [x] 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
- [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
- [ ] 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-10 17:20:11 +05:30
Manish Kumar
0b6a0f30af
chore: improving /actions endpoint performance (#22109)
## Description

/actions endpoint has very high response latency, The leading factor for
this latency is the DB calls to collections which have high volume of
data. i.e `actions` and `applications`. This Pr tries to address this by
optimising the flow to reduce db calls wherever possible.

The following strategies have been used to reduce the latency as much as
possible

- Reduced DB calls for fetching application and related permission
- Added Criteria for removing JS function from the repository call
- Added a in memory cache to hold default plugins. (this would be used
for filling missing details in action from plugin) resulted in 25-28%
performance advantage.
- **A good next step would have been adding index on all query
parameters, however have held on to that for some data.**

In the PR we have added Micrometer observability for /actions endpoint
as for more data.

> This PR addresses tries to improve the performance of the above
endpoints by means of reducing redundant calls to DB, and caching
wherever possible.

Fixes #21850 

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

## This has been tested:
- Manual

## Progress: 
The DP created with this PR was tested, however the results were not
consistent. waiting for testing dashboard to be ready to verify the
median/p95 timings from the data

## 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
2023-05-05 15:31:24 +07:00
Nidhi
c44a4a124b
fix: Removed structure data from within datasource collection (#22847)
## Description

This PR is a structural change to our database and introduces no change
in functionality.

Since generate CRUD functionality is controlled by an Appsmith app in
release env, this PR will end up breaking generate CRUD temporarily.

Fixes https://github.com/appsmithorg/appsmith-ee/issues/1336

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

## How Has This Been Tested?
- Manual
- Jest

### Test Plan
Available
[here](https://docs.google.com/spreadsheets/d/1dP-x8b7gBFOfXtVBwr-A0I4M0nTiJmeysZO2ExI1Hhk/edit#gid=1966367141)

### 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:
- [x] 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-05-03 10:18:29 +05:30
Sumit Kumar
09fd519e2c
chore: Oracle: add JUnit TCs (#22788)
## Description
- Add JUnit TCs
- Minor improvement to reading of data types: `timestamp`, `raw`, `blob`

Fixes #20535
2023-05-01 21:32:02 +05:30
Sumit Kumar
0e54c57ead
feat: Oracle integration: Add support for DB schema and update error infra (#22634)
## Description
- Update the Oracle plugin code to use newer error framework infra. 
- Add support to fetch DB schema and show dynamic query templates. 
- The following info is shown to the users as part of the DB schema:
table names, column names for each table, column types, primary key,
foreign key
- Update static query templates. 
- Update datasource form to show mandatory fields with asterik mark
- Update datasource validity check to return error on empty password
field
- Improve data read for the following types: `timestamp with local time
zone` , `clob`, `nclob`
- Minor refactor into modular re-usable functions

Fixes #20794 #20795 

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

## How Has This Been Tested?
- Manual
- JUnit TC to be added via separate PR. Another issue it open to track
it.

### Test Plan
[Test plan
links](https://github.com/appsmithorg/TestSmith/issues?q=is%3Aopen+is%3Aissue+label%3A%22Oracle+SQL+DB%22)

### Issues raised during DP testing
https://github.com/appsmithorg/appsmith/issues/21487


## 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
- [x] 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
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Added Test Plan Approved label after reviewing all Cypress tests
- [ ] Added Test Plan Approved label after developers review JUnit tests
2023-04-28 17:43:54 +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
Nidhi
7d1c4d87b6
ci: Fixed external dependencies in tests partially (#22639) 2023-04-26 13:44: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
Abhijeet
971eb06c08
feat: Update the Installation Setup Complete event to better track the analytics (#22572)
## Description
This PR adds/updates the fields which are getting reported as a part of
`Setup Complete Event` as a part of onboarding revamp project.

Fixes https://github.com/appsmithorg/cloud-services/issues/675

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

## 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
- [ ] 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-20 11:58:04 +05:30
dependabot[bot]
75f4e04b40
chore: bump json from 20220924 to 20230227 in /app/server/appsmith-interfaces (#22443)
Bumps [json](https://github.com/douglascrockford/JSON-java) from
20220924 to 20230227.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/douglascrockford/JSON-java/releases">json's
releases</a>.</em></p>
<blockquote>
<h2>20230227</h2>
<table>
<thead>
<tr>
<th>Pull Request</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/723">#723</a></td>
<td>Protect JSONML from stack overflow exceptions caused by
recursion</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/720">#720</a></td>
<td>Limit the XML nesting depth for CVE-2022-45688</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/711">#711</a></td>
<td>Revert pull 707 - interviewbit spam</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/704">#704</a></td>
<td>Move javadoc comments above the interface definition to make it
visible</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/703">#703</a></td>
<td>Update Releases.md for JSONObject(Map): Throws NPE if key is
null</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/696">#696</a></td>
<td>Update JSONPointerTest for NonDex compatibility</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/694">#694</a></td>
<td>Pretty print XML</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/692">#692</a></td>
<td>Example.md syntax highlight and indentation</td>
</tr>
<tr>
<td><a
href="https://redirect.github.com/douglascrockford/JSON-java/issues/691">#691</a></td>
<td>Create unit tests for various number formats</td>
</tr>
</tbody>
</table>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md">json's
changelog</a>.</em></p>
<blockquote>
<p>20230227    Fix for CVE-2022-45688 and recent commits</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/douglascrockford/JSON-java/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.json:json&package-manager=maven&previous-version=20220924&new-version=20230227)](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:04:17 +05:30
Nayan
67a8d3b7fd
fix: Moved gitSyncId from BranchAwareDomain to BaseDomain (#22335)
## Description
Moved `gitSyncId` from `BranchAwareDomain` to `BaseDomain` because it's
changing property order in the git files.

Fixes #22282

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)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- Jest
- 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
- [ ] 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 13:52:09 +05:30
Nayan
a859f76343
chore: Move Git related meta data to new base domain class (#22065)
## Description
This PR creates a new base class `BranchAwareDomain` from the
`BaseDomain` class. This new base class will contain the Git related
metadata. Any domain class that needs to be tracked by git should extend
`BranchAwareDomain` class instead of `BaseDomain` class.



Fixes #22063
2023-04-08 23:39:54 +06:00
Abhijeet
f66410ebcb
feat: Add functionality to opt out plugin from airgap instance (#22098)
## Description

As a part of supporting airgap instances we want to restrict the plugins
which have any public dependency. This PR introduces a config setting
for plugins to opt out of airgap.
Also as a part of this exercise we are also adding a setting for CS
dependency which can be utilised in future if our customers wants to opt
out of CS dependent plugins.
Corresponding EE PR:
https://github.com/appsmithorg/appsmith-ee/pull/1258

> TL;DR: Provide a way for plugins supported in Appsmith to opt-out of
airgap instances

Fixes https://github.com/appsmithorg/appsmith/issues/21499

## Type of change

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

## 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
- [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
- [ ] New and existing unit tests pass locally with my changes

### 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-06 23:15:03 +05:30
Nayan
22737e0aa5
chore: Add default view for JsonView (#21766)
## Description

This PR sets the `Public` as default view class for JsonView. It'll be
overridden if the controller has it's another view set. This will
prevent any accidental case when JsonView annotation is missing.

Fixes #21948
2023-04-03 15:37:14 +06:00
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
sneha122
86cbda5a8b
fix: fetch gsheet project id from cs added (#21361)
## Description

File picker implementation for Limiting Gsheet Access requires google
sheet project id. The changes in this PR gets the gsheet project id from
cloud-services and returns it back to client. Client then uses this
project id to open file picker and select required files.

Fixes https://github.com/appsmithorg/appsmith/issues/21298,
https://github.com/appsmithorg/appsmith/issues/21362


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

### 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-21 12:53:05 +05:30
sidhantgoel
214fb1705a
feat: migrate JsonIgnore to JsonView (#20086)
In summary, the change comprises adding `JsonView` annotations on
domain/model fields, controller methods, and arguments.
applying JsonView annotation on controller methods will include fields
which are marked with the same view in domain objects.
Similarly, usage on controller method arguments will only deserialize
the fields which are marked with same view in Domain object, which is
helpful in case we don't want the client to send some fields for
security reasons.
This change replaces the previous use of JsonIgnore for restricting
fields in API response and allows for more flexibility and will enable
us to have fine-grain control over fields serialized for different
contexts, such as API response, export, and import.
The following views are defined as of now.
`View.Internal` - View used to serialize for internal use. It inherits
from `Views.Public` and `Views.Export`, so it will also include those
fields.
`Views.Public` - View used for API request/response.
`Views.Export` - View used for making field exportable, like in the case
of Git sync and file export.
Also, we can define more views by adding an interface inside the Views
class and Views can also inherit fields marked with different view by
simple interface inheritance.

A small tutorial on JsonView - [Jackson JSON Views |
Baeldung](https://www.baeldung.com/jackson-json-view-annotation)

---------

Signed-off-by: Sidhant Goel <sidhant@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Nayan <nayan@appsmith.com>
2023-03-17 17:19:24 +06:00
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
sneha122
0f838535c3
feat: file picker added and access token generation (#20778)
## Description

This PR includes following changes:

- In case of limiting google sheet access project, when user selects specific sheets as an option, they should be shown file picker UI once the authorisation is complete, In this file picker UI, users can select the google sheet files that they want to use with appsmith application and allow access to only those files.
- This PR contains the changes for file picker UI and updating datasource auth state based on the files selected by user.


TL;DR
Steps to test this PR:

- Create Google Sheet datasource
- In the datasource config form, select specific sheets as an option from the scope dropdown.
- Click on save and authorise
- This will take you to google oauth process

<img width="467" alt="Screenshot 2023-02-20 at 1 24 24 PM" src="https://user-images.githubusercontent.com/30018882/220045493-57b0ca6c-3f08-4963-af55-d603cf79bc43.png">

- Select the google account
- This will take you to google oauth2 consent screen

<img width="451" alt="Screenshot 2023-02-20 at 1 24 55 PM" src="https://user-images.githubusercontent.com/30018882/220045641-9f70dd29-6664-489a-b77b-df65445491df.png">

- Click on allow for all requested permissions
- This will take you back to appsmith's datasource config page in view mode and load the file picker UI
<img width="425" alt="Screenshot 2023-02-20 at 1 25 47 PM" src="https://user-images.githubusercontent.com/30018882/220045828-8b3e3e46-4ddc-4e30-b2f8-f12865395817.png">
- Select the files that you want to share with appsmith app
- Click on select
- You should see the new query button in enabled state, as datasource authorisation is complete

<img width="800" alt="Screenshot 2023-02-20 at 1 27 28 PM" src="https://user-images.githubusercontent.com/30018882/220046131-6ce99a85-cddc-4529-ae45-f9833aefd71b.png">

- In case you select cancel on google oauth2 consent screen, you should error message on datasource config page with new query button being disabled

<img width="810" alt="Screenshot 2023-02-20 at 1 28 49 PM" src="https://user-images.githubusercontent.com/30018882/220046385-6b8d636c-b517-44c3-a596-b52bc0084b94.png">

- In case you do give all the permissions but do not select any files in google file picker, then also you should see error message on datasource config page with new query button disabled.

Fixes #20163, #20290, #20160, #20162


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

### 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 10:55:17 +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
Anagh Hegde
4f9fe83646
feat: file structure v2 for actions (#20606)
## Description

> Ignore the body field while committing the JS Object related actions
to git repo.


Fixes https://github.com/appsmithorg/appsmith/issues/20550
https://github.com/appsmithorg/appsmith/issues/19546


## Type of change

- 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
- [ ] 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-02-28 23:54:38 +05:30
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
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