Commit Graph

344 Commits

Author SHA1 Message Date
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
Vishnu Gp
bda10bb070
chore: Added extra analytics events for license (#20638)
## Description

Added extra events for license-related analytics events. Also did some
functional breakdown of code

## 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
- [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-02-15 21:43:52 +05:30
Nidhi
7e15d8b13d
feat: Server side observability (#19828)
## Description

TL;DR: This PR introduces metrics logging using native Spring support
for Micrometer. It includes a docker-compose to set up all the required
parts of this observability stack in the local environment as well.

In order to make use of this stack, please navigate to
`utils/observability` and execute the following command:
```
docker-compose up -d
```

The set up comes bundled with a default Grafana dashboard that can be
accessed at localhost:3001. Please feel free to switch the mapping ports
around in the docker-compose file.

This dashboard currently shows all http requests (sampled at 0.1 by
default), and the server side implementation has introduced some minimal
tracing for the `/api/v1/action/execute` endpoint. This means that you
can use the trace id from http server requests for this endpoint to
delve deeper into the spans exposed in this flow.

In case you would like to send trace information to another service,
please make use of the `APPSMITH_TRACING_ENDPOINT` variable. To override
the default sampling rate in your local (to say, 1), you can set that as
the value for the variable `APPSMITH_SAMPLING_PROBABILITY`.

Fixes #19153

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

## How Has This Been Tested?
- Manual

### Test Plan
No testing required, only needs regression after merge.

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

---------

Co-authored-by: Sumesh Pradhan <sumesh@appsmith.com>
2023-02-07 14:26:18 +05:30
Nidhi
5bb1a060f0
chore: Added total parameter size in execution DTO to analytics (#20129)
## Description
This property will give us an insight into what range of parameter sizes
users are working with.

Fixes #20128 

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

## How Has This Been Tested?
- Locally via Segment

## 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-02-01 11:18:14 +00:00
Nayan
89ae5ddf7f
fix: Forking fails when template has REST datasource with Bearer Token Authentication (#19930)
## 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
2023-01-20 15:36:49 +06:00
Anagh Hegde
52e4d32a3f
feat: Separate the js object code and metadata when used with git sync (#19156)
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.
2023-01-19 20:12:22 +05:30
Sumit Kumar
d33d35fbdb
fix: fix git sync related bugs for Custom JS Lib feature (#19352)
## 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
2023-01-10 19:26:48 +05:30
Vaibhav Tanwar
20cd7ee31d
feat: Google Sheet oAuth analytic events (#19118)
Added google sheet oAuth flow analytic events.
2023-01-10 11:48:03 +05:30
Nidhi
dfccd5a058
chore: Upgrade to Spring Boot 3.0.1 (#19044)
This upgrade takes care of our move to JDK 17, Spring Boot 3.0.1 and a
few other security upgrades along the way.

Fixes #18993 

TODO:

- [x] Check CI changes for Java 17
- [x] Check vulnerability report
- [x] Mongock needs an upgrade
- [x] Add JVM args at all possible places for exposing java.time module
- [x] Add type adapters everywhere / use the same config for type
adapters everywhere
2023-01-02 19:40:59 +07:00
Vaibhav Tanwar
94989d4bc3
fix: RestApiPlugin get request raw body fix (#18474)
## 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
2022-12-30 17:34:31 +05:30
Anagh Hegde
82489a3ecd
fix: Add error message for protected branch (#18737)
* Add error message for protected branch

* Added Junit Test cases

* Add error message for protected branch

* Added Junit Test cases

* chore: push failed warning

* Add reset command

* Fix test failures

Co-authored-by: Anubhav <anubhav@appsmith.com>
2022-12-16 12:07:40 +05:30
Nidhi
5329010415
fix: Refactor entities based on AST parsing logic (#18517)
* 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>
2022-12-12 08:12:21 +03:00
sneha122
c094a28c40
fix: gsheet multiline broken formatting fixed (#18552)
* gsheet multiline broken formatting fixed

* junit test added

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2022-12-09 15:53:55 +05:30
appsmithguru
b64df3e1c9
chore: rename_triggerUtils (#18405)
Refactored Renamed TriggerUtils.java to RestAPIActivateUtils.java and its usage
2022-12-07 15:03:50 +03:00
Nilesh Sarupriya
68bb871fa8
chore: add events related to roles and groups (#18611) 2022-12-01 20:53:30 +05:30
Vaibhav Tanwar
bc516a5583
fix: Google sheet datasource fix (#18199)
null check added for object value
2022-11-17 18:54:21 +05:30
subratadeypappu
eaf9b95bd6
fix: Internal server error in case of ARRAY type in MySQL (#17702) (#17838)
Fix internal server error in case of ARRAY type in MySQL (#17702)

This commit adds support for handling array like data in MySQL
- If the data type identified by the client side is of type ARRAY it will be treated as STRING as MySQL doesn't have support for ARRAY data type
2022-10-28 11:51:59 +05:30
Nidhi
204a187bc2
fix: Refactor entities with specific rules (#17523)
* 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>
2022-10-26 20:23:06 +05:30
amogh2019
9e1303905e
fix: ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (#17707)
* get a string casted value safely from form data

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

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

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

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

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

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

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

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

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

* Move BsonType to mongoplugin module (#16994)

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

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

* Refactor test case name (#16994)

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

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

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

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

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
2022-10-18 11:02:37 +05:30
Arpit Mohan
70f79ae69a
chore: Updating the tenant API to return the complete object instead of just the configuration (#17615) 2022-10-17 14:21:28 +05:30
Nidhi
c3e935ef40
fix: Remove datasource connection from cache when datasource is deleted (#17364)
* Changes to testDatasource interface method and archive flow

* Tests for plugin level testDatasource implementations

* Added test for refreshing cache on deleting datasource

* Modified warnings to errors in logs

* Fixed test

* Fixed test
2022-10-17 10:31:26 +05:30
Shrikant Sharat Kandula
0989aca511
Upgrade commons-text (#17566) 2022-10-14 19:36:16 +05:30
Vishnu Gp
0f73e43cd7
feat: Added analytics events for admin settings updates (#17491)
* feat: Added analytics events for admin settings updates

* Review changes - Variable name change
2022-10-13 12:13:29 +00:00
Nidhi
74c3dbbc1a
fix: Modified on page load actions calculation using AST (#17074)
* 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>
2022-10-11 11:02:44 +05:30
subratadeypappu
d2de8f7cec
feat: Implement data type handling in MySQL (#16621) (#17017)
* feat: Implement data type handling in MySQL (#16621)

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

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

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

* chore: Remove import shortening (#16621)

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

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

* Fix query in test case (#16621)

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

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

* additional cypress test cases for mysql

* updated test case object

* update for failing test cases

* mysql failure point fix

* mysql false spec failure point fix

* fix flacy test cases

* flacky JSON test cases

Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-10-04 10:45:10 +00:00