Commit Graph

2897 Commits

Author SHA1 Message Date
Shrikant Sharat Kandula
3eb1bfb63c
chore: Add migration to cleanup of invalid plugins in workspaces (#33102)
The migration takes 3.5mins on production database.

Reason and details at [Slack
conversation](https://theappsmith.slack.com/archives/C02GAUE9P5H/p1714451552333709?thread_ts=1714425219.357599&cid=C02GAUE9P5H).

/ok-to-test tags="@tag.Sanity"
2024-05-02 13:10:16 +05:30
Shrikant Sharat Kandula
809710245d
chore: Add an internal request ID for logging (#33086)
/ok-to-test tags="@tag.All"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8918415111>
> Commit: f902355ece5445d27fd8a65dcf4607afb4c5d656
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8918415111&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-05-02 13:00:23 +05:30
Nilansh Bansal
c0aaab89bf
chore: added function overloading to remove redundant db call (#33060)
## Description
This PR overloads the function `getTenantConfiguration()` to avoid
calling `getDefaultTenant()` multiple times and eventually reducing the
number of database calls.
Subsequent EE PR - https://github.com/appsmithorg/appsmith-ee/pull/4073

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

## Automation

/ok-to-test tags="@tag.Settings,@tag.Perf,@tag.IDE"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8893900698>
> Commit: 446e4f7c38525568249496bd6bd1ba5d1a920486
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8893900698&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->




## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-01 07:33:47 +05:30
Anagh Hegde
0d89168d00
fix: collection id not updated in import block API response (#32933)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


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

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8892306251>
> Commit: 6b2c1c8e637dc89eebf51d431f5e78f92ae9ac23
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8892306251&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->







## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced functionality to set collection IDs during partial imports.
- **Tests**
- Improved testing for partial imports by adding new assertions to
verify action names.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jacques Ikot <jacquesikot@gmail.com>
Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com>
2024-04-30 11:03:46 +01:00
Nidhi
ef89875ca2
fix: Empty plugin ids in workspaces are breaking application load (#33042) 2024-04-30 04:44:35 +05:30
Shrikant Sharat Kandula
0d0341165e
chore: Use default repo methods when possible (#32997)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced new functionalities to count and retrieve Git-connected
applications within a specific workspace.
  
- **Bug Fixes**
- Removed outdated method for counting applications by workspace ID to
enhance performance and accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-29 12:12:43 +05:30
subratadeypappu
1330485f4f
fix: NPE in analytics service (#33005)
## Description
This is to resolve the NPE introduced in this
[PR](https://github.com/appsmithorg/appsmith/pull/32552)


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved handling of null values in event tracking properties to
ensure more reliable analytics data.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-29 10:57:35 +05:30
subratadeypappu
cc306b0c84
chore: add code split for refactoring inputs (#32928) 2024-04-29 10:56:04 +05:30
Shrikant Sharat Kandula
e71876f3b6
chore: Add search method to Bridge API (#32999)
We're abstracting the search function here, as a search query, instead
of a generic regex query, so that is can be implemented with regex on
MongoDB, but with SQL's `LIKE` operator on Postgres.

/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8859444126>
> Commit: 60f0086858a8add161f483572d0cd0dbd41e9217
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8859444126&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced new methods for enhanced search capabilities, including
case-insensitive searches.
  - Improved entity field filtering using custom query methods.

- **Refactor**
- Updated entity field references in `Workspace` and `Application` for
consistency.
- Replaced traditional criteria with custom query classes to simplify
logic in filtering processes.

- **Deprecations**
- Deprecated older methods for case-insensitive regex matching in favor
of new search methods.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-28 17:31:42 +05:30
Shrikant Sharat Kandula
f8a3a54df9
chore: Use CS to get Appsmith server IP (#32998)
We're currently relying on ipify.org for this, and this PR will move to
using CS for this information. This is so that all external
communication from the core of the product's backend, is only to
cs.appsmith.com, which makes whitelisting easier for users.

Also removing the unused variables `APPSMITH_CLOUD_SERVICES_USERNAME`
and `APPSMITH_CLOUD_SERVICES_PASSWORD`.

⚠️ This will cause conflicts on sync.

/ok-to-test tags="@tag.Sanity"
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8859016811>
> Commit: 46576ca46adcba288693c3d5aaa9cc547c1e8f57
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8859016811&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Removed username and password fields from cloud services configuration
to enhance security.
- Updated network utilities to initialize with new cloud services
configuration, improving integration and functionality.
  
- **Bug Fixes**
- Adjusted the method of fetching and handling IP address data to
improve reliability and accuracy of network services.

- **Chores**
- Updated application properties and deployment scripts to align with
the new configuration and address retrieval methods.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-28 17:31:13 +05:30
Shrikant Sharat Kandula
e4b6363712
chore: Remove BaseController on PluginControllerCE (#32996)
Remove the `BaseController`, not used anymore, and have the Plugin
controller only define the routes used by the client.

Unit tests and All tag Cypress passes on EE.

[Slack
conversation](https://theappsmith.slack.com/archives/C03RPDB936Z/p1714194492847219).

/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8857896676>
> Commit: be346ec2892fa70727e3b686c251c914ef998615
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8857896676&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-28 17:30:46 +05:30
Goutham Pratapa
947add2f20
[ops]: get infra details (#32552)
Outputs on having the container up and running

On kubernetes:
```
root@ce32552-appsmith-66fc68d7f-97tjn:/opt/appsmith# cat /tmp/appsmith/infra.json
{"cloudProvider":"amazon","Tool":"kubernetes","EFS":"present","Hostname":"ce32552-appsmith-66fc68d7f-97tjn"}
```

On local setup:
```
root@26327db8d65a:/opt/appsmith# cat /tmp/appsmith/infra.json
{"cloudProvider":"local","Tool":"docker","EFS":"absent","Hostname":"26327db8d65a"}
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced infrastructure detection to enhance system insights,
including cloud provider, deployment tools, and host details.
- Enhanced analytics by incorporating deployment properties into event
tracking.

- **Refactor**
- Modified server configuration and initialization to integrate new
deployment properties.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2024-04-26 18:56:45 +05:30
Nidhi
fe1839a132
fix: NOOP spans when context is missing (#32987) 2024-04-26 18:25:21 +05:30
Shrikant Sharat Kandula
bba0ecb112
chore: Remove blockNavigation in Page create API body (#32859)
1. The `blockNavigation` parameter in request body isn't being used, so
removing it.
2. We're sending the page `id` in both the URL path as well as the
request body. This is confusing, and may lead to a security regression
in the future. Removing it from the body.

All tag Cypress tests pass on EE, with no extra changes over the diff
here.
Ref: https://github.com/appsmithorg/appsmith-ee/pull/3698

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced page creation process with streamlined parameters and
validation constraints.

- **Refactor**
	- Simplified navigation and page creation logic in the application.
- Updated method parameters and logging to improve clarity and
maintainability.

- **Bug Fixes**
- Fixed the issue where unnecessary data was included in page update
requests.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-25 21:31:51 +05:30
Nidhi
7edd5c5a2f
Revert "chore: GitSynced and BranchAware are two different types (#32… (#32965) 2024-04-25 17:26:52 +05:30
Nidhi
5823e06057
chore: Added indices for collection id in actions (#32953) 2024-04-25 15:27:54 +05:30
Nidhi
b69de462b9
chore: GitSynced and BranchAware are two different types (#32932) 2024-04-25 11:22:17 +05:30
Nidhi
58671d6e8b
CE equivalent for removing js obj action id map (#32917) 2024-04-24 19:10:53 +05:30
Abhijeet
6cc4b028e5
chore: Remove un-necessary test from NewPageServiceTest (#32895)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Removed a test case related to default page creation with specific
permissions and policies.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-24 11:09:15 +05:30
Abhijeet
9406439bbb
chore: Add separate DTO class for projection and move CustomNewActionRepo method to NewActionRepo class (#32818)
## Description
PR to move to class based projection for NewActionRepo method instead of
relying of list of fields. Also as the permissions were not required
converted the existing method to JPA based query.

## Automation

/ok-to-test tags="@tag.Sanity, @tag.Binding, @tag.Datasource,
@tag.GenerateCRUD"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8782210714>
> Commit: 80e40e840989db48954aafed914a801fbba995aa
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8782210714&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->




## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced data fetching capabilities for actions within applications,
improving performance and efficiency.

- **Refactor**
- Optimized data source validation process during application creation
to ensure smoother user experiences.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-23 12:51:22 +05:30
Abhijeet
a6daa4838d
chore: Deprecate recentlyUsedWorkspaceId and recentlyUsedAppIds from user data (#32756)
## Description
PR to remove usage of `recentlyUsedWorkspaceIds` and
`recentlyUsedAppIds` from the codebase. We need to clear this debt as
after the homepage revamp project, we have updated the fields to store
entities in [separate DTO
class](https://github.com/appsmithorg/appsmith/blob/release/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/RecentlyUsedEntityCE_DTO.java)
instead of bare list of strings.

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

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8752116697>
> Commit: 0be31ca9c9a02030b215f4c5c19f188b2ed481d9
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8752116697&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
	- Introduced a new interface for managing user release notes.
- Added functionality to handle removal of entities from recently used
lists more efficiently.

- **Bug Fixes**
- Corrected API call errors for deprecated methods in application
controllers.

- **Refactor**
- Updated various classes to use new user release notes management
system.
- Renamed methods to better reflect their functionality related to
recent workspace and application usage.

- **Tests**
- Updated unit tests to align with the new changes in application and
user data management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-23 10:14:31 +05:30
Shrikant Sharat Kandula
71867f9bcd
chore: Page name validation closer to file name validation (#32830)
1. Introducing a custom validation annotation, `@FileName` to be used on
fields that are used as file/folder names as part of the product.

2. Updated the validation logic to only accept valid file names on
Linux, macOS as well as on Windows.



/ok-to-test tags="@tag.Settings, @tag.IDE"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8784587443>
> Commit: a13f700d490845a9d3c53d0da9c1a763fde6be9b
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8784587443&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->











<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced page name validation to include more special characters and
reserved names, ensuring compatibility and preventing errors.

- **Bug Fixes**
- Updated regular expression for replacing disallowed characters in page
names to improve system stability and user experience.

- **Tests**
- Expanded testing for invalid page names to cover a broader range of
scenarios, enhancing reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-22 19:22:41 +05:30
Shrikant Sharat Kandula
7fb01b31e3
test: Better assertion failure message for duplicate error test (#32834)
Currently, when this fails we see this:

```
org.opentest4j.AssertionFailedError: 
expected: 156L
 but was: 155L
Expected :156L
Actual   :155L
```

(It's comparing the count vs distinct-count).

This PR makes the failure show up like this:

```
java.lang.AssertionError: 
Expecting empty but was: ["AE-APP-4001"]
```

Making the failure message much more useful.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Tests**
- Updated the method for verifying the uniqueness of error codes in the
system to enhance reliability by using a new approach.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-22 11:22:10 +05:30
Shrikant Sharat Kandula
489255f3ca
fix: Fix duplicate error code 2024-04-22 08:19:34 +05:30
Shrikant Sharat Kandula
9649d8561c
chore: Remove unneeded fields in snapshot response body (#32813)
These extra fields don't hold much semantic value, and are completely
ignored by the client. This PR removes them and only keeps the one field
that's used by the client.


/ok-to-test tags="@tag.All"<!-- This is an auto-generated comment:
Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8755978321>
> Commit: 9b680799db0d30fb56c908f02260abbb4b590ac3
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8755978321&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->










<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved consistency in naming conventions related to snapshot details
across the platform.
- Enhanced data handling in snapshot fetching and updating processes for
better performance.
- Streamlined snapshot-related data structures and service responses to
focus on relevant information.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-22 08:08:45 +05:30
Shrikant Sharat Kandula
37696bb3ec
chore: Don't mask 405 as 500 (#32829)
/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced handling for "HTTP method not allowed" errors to improve
user feedback on unsupported actions.

- **Refactor**
- Optimized error handling structure by using annotations and removing
outdated constructors.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-20 13:46:43 +05:30
Shrikant Sharat Kandula
efc088e509
chore: Fix star-imports (#32826)
/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated import statements across various services to enhance code
efficiency and maintainability.
- Introduced advanced image processing capabilities in asset management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 18:59:53 +05:30
Shrikant Sharat Kandula
b25d36fdf7 chore: Fix build error in ApplicationForkingServiceTests 2024-04-19 17:07:45 +05:30
Shrikant Sharat Kandula
3d5e240a3f
chore: Remove PEMCertificate and fix @Document annotations (#32705)
/ok-to-test tags="@tag.Sanity"<!-- This is an auto-generated comment:
Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8748422171>
> Commit: 5e44cffe2a66b8bb932162f4292ac0957c28d89f
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8748422171&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
- Improved maintainability of the PEMCertificate class by streamlining
annotations.
- **New Features**
	- Enhanced database integration for Git deployment keys.
- **Bug Fixes**
- Removed redundant fields from SSLDetails class, improving logic
related to PEM certificates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 16:29:17 +05:30
Manish Kumar
8749cf1f92
chore: added CE changes for second set of apis (#31898) 2024-04-19 12:48:53 +05:30
Shrikant Sharat Kandula
1298423125
fix: Snapshot response DTO missing fields (#32798)
The response from `GET /api/v1/applications/snapshot/{id}` currently has
`isNew`, `chunkOrder` and `userPermissions` (which is always set to an
empty list). This PR brings that behavior back. We'll raise a separate
PR to clean up the ones not being used on the client, `userPermissions`
being especially likely, but not now.


/ok-to-test tags="@tag.Sanity, @tag.Git, @tag.IDE,
@tag.MobileResponsive, @tag.Settings"<!-- This is an auto-generated
comment: Cypress test results -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8749078413>
> Commit: b7546820a2a10eeaecb75a1e1df58f390be60468
> Cypress dashboard: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8749078413&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank"> Click here!</a>
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js
>
<li>cypress/e2e/Regression/ClientSide/SettingsPane/PageSettings_spec.ts
</ol>
> To know the list of identified flaky tests - <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">Refer here</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-19 12:29:54 +05:30
Shrikant Sharat Kandula
c2ba4fd093
fix: Add isHidden to PageUpdateDTO (#32802)
/ok-to-test tags="@tag.IDE, @tag.Git, @tag.Settings, @tag.GenerateCRUD"
2024-04-19 12:27:18 +05:30
Shrikant Sharat Kandula
4ce31870c2
chore: Replace more new ObjectId with UUIDs (#32793)
This refactor is in an effort to reduce the diff between `release` and
`pg` branches.

/ok-to-test tags="@tag.Sanity"
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8747276123>
> Commit: 1d34803416f34b17959c5b3b11c7c9eefc3e07ed
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8747276123&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
- Updated identifier generation from `ObjectId` to `UUID` across various
services for consistency and improved performance.
- Simplified method signatures and removed unnecessary overloads to
enhance code maintainability and readability.
- **Bug Fixes**
- Adjusted method parameters from `Optional` types to direct assignments
to fix logical errors in entity fetching processes.
- **Chores**
- Removed deprecated code segments and unused dependencies to clean up
the codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 11:53:37 +05:30
Shrikant Sharat Kandula
f339f9d4f2
chore: Page rename API client validation (#32788)
1. The page names can accept any character except for `/`, backslash and
`:`. This is the validation that the server does now. This PR fixes the
regex that checks the page name to align with this.
2. When typing a character that's not allowed, we end up with a space at
the beginning or end of the page name, that doesn't really make sense,
and is confusing. Then we end up with trailing or leading spaces in the
page name, making the page name display look misaligned. This PR will
make it so that the disallowed characters just can't be typed, and just
don't make a difference in the page name.
3. We're also adding server-side validation for the icon slug.

[Slack
conversation](https://theappsmith.slack.com/archives/C03RPDB936Z/p1713161688607509).

/ok-to-test tags="@tag.Sanity"
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8746416301>
> Commit: 21e8d3a0060b9b4721b49149f307354b073332d7
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8746416301&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced page name validation to improve naming consistency across the
application.
- Updated validation for page icons and custom slugs to allow more
flexibility and ensure inputs meet new standards.

- **Bug Fixes**
- Fixed issues in page naming functions to prevent the use of certain
special characters and limit the length, enhancing data integrity and
user experience.

- **Tests**
- Added new tests to verify the handling of invalid and empty custom
slugs, ensuring robustness in page management functionalities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 11:23:14 +05:30
Abhijeet
01510d6f26
chore: Introduce IdPoliciesOnly record to handle projections (#32767)
## Description
PR to add IdPolicies record to make it easier to translate existing
queries using the projections to JPA.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8736013169>
> Commit: c2a024129eb899057db4dc1598515b90be567076
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8736013169&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-19 10:19:37 +05:30
Nidhi
3b45db6df6
fix: Make git push operation atomic (#32777) 2024-04-19 10:16:32 +05:30
Abhijeet
6e21516900
chore: Move non-permission repository method to generic repo class (#32738)
## Description
PR to add separate record class to implement the projection on
ApplicationSnapshot repository.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8735912421>
> Commit: 5baf4317e0bdb7179fe855c4fe108f9129a31f6b
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8735912421&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->






<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **Refactor**
- Enhanced the application snapshot feature to improve performance and
reduce data load by excluding unnecessary data from snapshots.
- **Documentation**
- Updated import statements and method return types for clarity and
consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-18 22:15:49 +05:30
Shrikant Sharat Kandula
dcada4522d
fix: Input validations on page update API (#32692)
[Slack thread with
details](https://theappsmith.slack.com/archives/C03RPDB936Z/p1713161688607509).
Not including details here.

Sanity passes on EE.

/ok-to-test tags="@tag.Sanity"<!-- This is an auto-generated comment:
Cypress test results -->
> [!WARNING]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8704837594>
> Commit: fb1724a0e93f21e25dd09f821b101438a8bee52f
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8704837594&attempt=1"
target="_blank">Click here!</a>
> It seems like **no tests ran** 😔. We are not able to recognize it,
please check workflow <a
href="https://github.com/appsmithorg/appsmith/actions/runs/8704837594"
target="_blank">here.</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced page update capabilities with new fields for page name, icon,
and custom slug.
- **Improvements**
- Improved text handling support for non-Latin characters and
punctuation in page names.
- **Tests**
	- Added test cases for new page creation scenarios and page updates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-18 16:14:07 +05:30
Rajat Agrawal
d9a95c0427
chore: Add tags for consolidated api spans (#32739)
This PR adds tags for consolidated api spans so that slow spans can
debugged using pageID, applicationID and branchName

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8732019146>
> Commit: 3fc5d68fe08d6f68cce2ecd68ee55502b935a15b
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8732019146&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced data tagging in API controller methods for improved data
management and retrieval.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-18 09:38:10 +05:30
Anagh Hegde
313338899e
fix: Unable to publish forked app to community portal (#32671)
## Description
The publish to community template flow does not allow users to publish
the same app multiple times to the portal. This is controlled via a
boolean flag in the Application object. But when the user forks this
app, it should be allowed for the new application to be published. This
PR fixes this issue by making sure the flag value is reset to null
during the fork flow.

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

## Automation

/ok-to-test tags="tag.Templates"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8684335987>
> Commit: 23acf129c6da337c8a198cdca63a1b0b3fbc9444
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8684335987&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-17 20:55:06 +05:30
Shrikant Sharat Kandula
8fe1e8c854
fix: Fix support for custom SSH port in Git URLs (#32678)
Support for custom SSH ports in Git URLs broken when we introduced the
regex to match the URLs. The tests were also checking for invalid URLs.
Ref: https://stackoverflow.com/questions/5767850/git-on-custom-ssh-port.

This PR fixes that validation error, and introduced tests with the
correct Git SSH URL with a custom port.

[Slack
thread](https://theappsmith.slack.com/archives/C0341RERY4R/p1713178681476249?thread_ts=1713175069.330019&cid=C0341RERY4R).

/ok-to-test tags="@tag.Git"
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8704854792>
> Commit: 48809d88619fa5d7d170e8f7d71297cccaecb353
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8704854792&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced SSH URL parsing and conversion to support more URL formats
and custom SSH ports, improving compatibility with browser-supported
HTTPS URLs.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-17 19:18:15 +05:30
Shrikant Sharat Kandula
048e3b0220
chore: Remove BaseController on WorkspaceControllerCE (#32254)
Continuation on https://github.com/appsmithorg/appsmith/pull/32216, for
`WorkspaceController`.

Cypress Sanity and Workspace tags passed on EE.
2024-04-17 11:49:01 +05:30
Nidhi
c51e4b810d
chore: Introduce changes to minimize git footprint (#32595) 2024-04-16 21:34:24 +05:30
Nirmal Sarswat
bc3d46d8c1
feat: Vision models support in Anthropic (#32103)
## Description
Adding new vision models support in Anthropic
<img width="1134" alt="Screenshot 2024-04-12 at 15 59 06"
src="https://github.com/appsmithorg/appsmith/assets/25587962/49110b9d-00ee-4210-9d43-bf2a832aee20">

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

## Automation

/ok-to-test tags="@tag.Datasources"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8704175377>
> Commit: 2c393e7ffaf3d08fd8e945761206de76d3a13845
> Cypress dashboard: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8704175377&attempt=3&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank"> Click here!</a>
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts
</ol>
> To know the list of identified flaky tests - <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">Refer here</a>

<!-- end of auto-generated comment: Cypress test results  -->







<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced chat functionality with version upgrade and refined message
creation process.
- Added vision-related commands for handling image and text data in the
Anthropic plugin.
    - Expanded constants to support new messaging and vision features.
- Introduced new fields in request models to support system prompts and
messages, while deprecating older fields.
- Implemented a `VisionCommand` in method strategy for better handling
of vision tasks.
- Improved utility functions for message handling and configuration
value extraction.

- **Refactor**
- Streamlined request URI construction to support new vision
functionality alongside chat commands.
    - Removed unused constants and methods to clean up the codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-16 13:41:28 +00:00
sneha122
520cfa10a6
fix: Revert "feat: suggest queries query type added in action DTO" (#32711)
Reverts appsmithorg/appsmith#32593

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8705514361>
> Commit: 5788f9731859cffc7ec1e7ab8dd61effa17d6a66
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8705514361&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->




## Summary by CodeRabbit

- **Refactor**
- Removed unused `DatasourceQueryType` field and associated methods to
streamline backend services, enhancing overall system performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-16 19:07:45 +05:30
Manish Kumar
e98b824ecd
chore: uncommented the fix (#32703) 2024-04-16 17:01:14 +05:30
Jacques Ikot
0118051301
feat: implement dropping building blocks on canvas (#31857)
## Description
> [!TIP]  
**Goal**
To drag any building blocks from the explorer and drop at any position
on the users canvas with full implementation.

**Implementation**
- Show skeleton widget when building block is initially dragged unto the
canvas.
- Make API call to add datasources, queries, and JS to existing page of
users app
- Get returned widget DSL and use existing copy paste logic to display
widgets on the canvas
- Remove loading state, handle clean up for copy paste
- Run all queries newly created by the dropped building block

**Limitations**
- There is a loading state and the process is not instant like dropping
a widget

This PR is followed by this one
[here](https://github.com/appsmithorg/appsmith/pull/31406), which
displays the loading state when a building block is dragged unto the
canvas.

Fixes #31856
## Automation

/ok-to-test tags="@tag.Templates, @tag.MainContainer, @tag.Visual,
@tag.Widget"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8701664455>
> Commit: 456a7a0a322e76974a7f5c41a6c1e274ef82e4ea
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8701664455&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->















<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new "Building Blocks" category in the widget sidebar for
enhanced organization and accessibility.
- Added functionality to resize building blocks with new horizontal and
vertical limits.
- Implemented a "see more" button for "Building Blocks" to display all
associated widgets.
- Enhanced drag and drop functionality for building blocks on the
canvas.

- **Enhancements**
- Improved sorting logic for widgets, prioritizing "Building Blocks".
    - Enhanced widget search functionality within the sidebar.

- **Bug Fixes**
- Adjusted default rows and columns settings for explorer building
blocks to improve layout and usability.

- **Documentation**
- Updated messages and constants related to new features for clarity and
consistency.

- **Refactor**
- Refactored drag and drop handling logic to support new building block
constraints and features.
- Updated application state management to include building blocks
related data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com>
2024-04-16 09:41:09 +01:00
Nidhi
e6c9efce50
chore: Move feature flag annotation and enum to interfaces (#32694) 2024-04-16 13:15:53 +05:30
Shrikant Sharat Kandula
f910a528e3
chore: Add separate request/response views (#32448)
This PR gets finer control into what fields are allowed in
request-body-only, vs what's allowed in response-body-only. This leaves
the fields to separately controlled regarding what can go into the
database and what can't.

[Slack thread](https://theappsmith.slack.com/archives/CPQNLFHTN/p1710125307810949).
2024-04-16 12:47:16 +05:30
Nilansh Bansal
11ef1fcf70
feat: added updatedAt in actions (#32650)
## Description
> This PR introduces the updatedAt field in the consolidated api
response, `unpublishedActions` list.
The value of updatedAt will be consumed by the client to sort the
actions based on the recently updated ones in the suggested fetch
queries for widgets learnability task.

Fixes #32553 

## Automation

/ok-to-test tags="@tag.ImportExport, @tag.Datasource, @tag.Fork,
@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8700455540>
> Commit: 45d7516ccf2b245bf93d66c767306732262ab131
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8700455540&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->














<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Updated the display of the "Last Updated" timestamp with a specific
format and timezone across the application.
- **Bug Fixes**
- Ensured the "Last Updated" timestamp is accurately updated and
displayed when actions are modified.
- **Tests**
- Added and modified tests to verify the correct handling and display of
the "Last Updated" timestamp for actions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-16 11:45:06 +05:30
Shrikant Sharat Kandula
60790e2dc4
chore: Remove unused API route (#32676) 2024-04-15 15:15:54 +05:30
Shrikant Sharat Kandula
795db148da
chore: Fix warnings on @EqualsAndHashCode (#32667)
Fixes build warnings like these:

```
Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
```

Why is this important?

1. Warnings are always a worse thing than errors, because they only fail
at runtime. And this is quite a significant warning, so should be fixed.
2. This _incorrect_ `equals` method screws up Hibernate's dirty checking
when working with Postgres.



/ok-to-test tags="@tag.Sanity"<!-- This is an auto-generated comment:
Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8679350830>
> Commit: 4f697fc3f9431fcfd35fc0f9814fce763382d06c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8679350830&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced data consistency across various models by ensuring that
equality and hash code calculations now consider superclass fields.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-15 13:46:37 +05:30
Manish Kumar
13ca80e91d
chore: flaky git test fix (#32606) 2024-04-15 13:02:22 +05:30
Shrikant Sharat Kandula
39fae54f67 chore: Revert all recent changes to SegmentConfig 2024-04-15 12:10:43 +05:30
Abhijeet
4848805364
chore: Use update clause from Bridge API (#32411)
PR to update Field usage and adding a UpdateBridge API while saving the
datasource structure.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8642139106>
> Commit: 90a85e25480d9a58ecdc64c24dd88ca9ee3367fd
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8642139106&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced the data model to support default resources for pages and
actions, improving the management and organization of these elements.
- **Refactor**
- Improved code quality and maintainability by utilizing static
references and utility methods for field access in database queries,
leading to more robust and error-resistant code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-12 16:39:16 +05:30
sneha122
76266d808a
feat: suggest queries query type added in action DTO (#32593)
## Description
This PR adds query_type to actionDTO, when fetching queries, query type
indicates whether it is a fetch query or any other query, this
information can be further used to suggest queries to user when they
bind data to widgets. This way we can suggest relevant queries to users
first and their chances of success with Appsmith are higher.

Note: This PR only introduces the field in actionDTO and returns
UNKNOWN, in subsequent PRs we will be adding plugin specific
implementation to return relevant query_type. I have not added any unit
tests as of now, we can add those once plugin specific implementations
are done.

Fixes #`Issue Number`  
_or_  
Fixes [`Issue
URL`](https://github.com/appsmithorg/appsmith/issues/32554)
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8643950238>
> Commit: 08e28bca9e4054ae78d4f4188cfecfc708a62608
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8643950238&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-04-12 13:04:16 +05:30
Abhijeet
cc0912b546
chore: Move migration helper method to respective class (#32607)
## Description
PR to move helper methods for actions to separate class, which can be
re-used in PG branch for JsonSchema migration.
 
## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8646294762>
> Commit: 8b22cfed9b98a283fab72ca54eea5723b505086c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8646294762&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-12 09:21:24 +05:30
Rudraprasad Das
f7118422c6
feat: granular git status (#31619)
## Description
Lists down changes in entity with level 1 granularity

Fixes #31644 

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8642841391>
> Commit: dd9dd7abb619a4e62edd950cbc6e64e15b4a42e2
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8642841391&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->









<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced granular tracking of Git changes, including added,
modified, and removed pages, datasources, queries, JS objects, and JS
libraries.
- Implemented a new feature flag `release_git_status_granular_enabled`
to toggle granular Git status tracking.
- Added new components to display detailed Git changes with expandable
views for different types of entities.

- **Enhancements**
- Simplified the logic for determining if a commit is required by
enhancing the Git status checks.
- Enhanced Git status display to include specific messages and icons for
various types of changes.
- Improved the Git sync feature's user interface with updated components
and styling for displaying Git changes.
	
- **Bug Fixes**
- Corrected the display logic to accurately reflect when a JS library is
added instead of modified.

- **Refactor**
- Refactored Git status handling logic on both client and server sides
for improved performance and readability.
- Updated test suites to align with the new Git status tracking and
display functionalities.

- **Tests**
- Added and updated tests to cover new Git status functionalities and
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-11 18:26:09 +05:30
Shrikant Sharat Kandula
c831644764
fix: Don't send events with null to Segment (#32600)
Recently, we made two fixes to `SegmentConfig` to fix NPEs that were
preventing some events from being sent to Segment.

1. https://github.com/appsmithorg/appsmith/pull/32498
2. https://github.com/appsmithorg/appsmith/pull/32351

But this ended up sending _too much_ to Segment now. That, and clearly
we weren't missing anything by not sending those events with `null` in
them.

So we're bringing back that protection of NPEs. The protection of not
sending value-less events to Segment. But in a more, educated way.

We're adding `null` checks, and not sending anything when we see a
`null`.

Considering that context, a more accurate diff to review would be
between the [`SegmentConfig` before those two
PRs](d6e74bf012/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SegmentConfig.java),
and the `SegmentConfig` in this PR. This diff can be seen here.
2024-04-11 17:21:00 +05:30
Aman Agarwal
d8b07c4ce1
fix: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
Nidhi
51b4a162bb
chore: Added NOOP behaviour for observation helper (#32534)
## Description
Make sure that observation helper bean can be created even when tracing
is turned off.

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-10 12:05:06 +05:30
Nidhi
6339b05670
chore: Added metrics on File I/O wrt git (#32433) 2024-04-09 21:16:10 +05:30
Manish Kumar
807f5606f0
chore: Git spans changed from enum to string (#32454) 2024-04-09 19:59:21 +05:30
Shrikant Sharat Kandula
eb84d5a537
chore: Remove stack trace in logs for action timeouts (#32523)
Remove stack trace for action timeout logs, since they don't add any
value. Example log here:


![shot-2024-04-08-13-37-10](https://github.com/appsmithorg/appsmith/assets/120119/cbe2b43c-bffe-4adb-a947-dc0b7934c740)
2024-04-09 19:09:43 +05:30
subratadeypappu
795b8a3aa1
chore: add code split for sending analytics for packages (#32516) 2024-04-09 12:24:27 +05:30
Shrikant Sharat Kandula
f2f52e2f48
fix: NPE in SegmentConfig (#32498)
Fixing this NPE:


![shot-2024-04-08-14-01-00](https://github.com/appsmithorg/appsmith/assets/120119/ad97ac2c-246a-46cd-82eb-95970914677b)
2024-04-08 20:04:24 +05:30
Shrikant Sharat Kandula
b8f0bfb0b3
chore: Add more Bridge APIs needed for EE (#32496) 2024-04-08 18:33:14 +05:30
Anagh Hegde
a10d26debd
fix: template name usage in analytics (#32446)
## Description
Fix NPE caused by the template name used for analytics PR. 

Fixes #32437 

## Automation

/ok-to-test tags="tag.Templates"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8567991310>
> Commit: `8e04b161dcacb89fb4c08ec8a32cbd4c2e7c4129`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8567991310&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
- Improved how the application name is handled when merging templates
with applications for enhanced reliability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-05 16:10:25 +05:30
Abhijeet
780884182a
feat: Add signature verification for user level flags (#32426)
## Description
PR to add signature verification for user flags to make it secure.

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

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/8565508847>
> Commit: `90c695be64856d5599a0798bc4f8e39498e2ce8b`
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved security by validating signatures for feature flags. Invalid
signatures now result in a clear error message.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-05 05:54:08 +00:00
Shrikant Sharat Kandula
e8c24d4fd8 Revert "chore: Add separate request/response views (#31781)"
This reverts commit 261700076e.
2024-04-05 11:08:26 +05:30
Manish Kumar
fbae2dc83c
chore: server autocommit (#32387)
## Description
The purpose of this test file is to detect if code in Appsmith has
changed in a way which would reflect as uncommitted changes in
git-connected applications.

This test case would fail if we have added new domains, changed the
underlying structure of the domains, or how it's represented in domains.

It is intentionally kept to fail so that developers could identify if
their code has brought about these changes.

In order to make the test case pass, we would need to add the following
steps:

Once the test starts failing, that would mean that we need to increment
the serverSchemaVersion which is a constant in JsonSchemaVersions.java
by 1 count. After that, do the needful in JsonSchemaMigrations to update
the version number in incoming imports.
This is important so that the server code could detect that an
auto-commit is required for git-connected applications for a seamless
experience.

After step 1, this test case would still fail. In order to make the test
case work again, please replace the respective JSON with the updated
application JSON. Please take note that the Serialisation Objective
should be VERSION_CONTROL. In order to retrieve the updated JSON, one
could simply copy the serialized files from the test case itself.

After this there would be one issue left to deal with:
https://github.com/appsmithorg/appsmith/issues/32401

Fixes #32416
## Automation

/ok-to-test tags="@tag.Git"

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added functionality to reconstruct metadata from a Git repository for
workspace, application, repository, and branch information.
<!-- end of auto-generated comment: release notes by coderabbit.ai
--><!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8552624183>
> Commit: `48c393eb726f8ecc32b9b5fe01a0e4d4606f6333`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8552624183&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->
2024-04-05 01:15:24 +05:30
Sumit Kumar
615992c4d9
chore: remove unused methods (#32252) 2024-04-04 15:59:18 +05:30
Anagh Hegde
8471ea6037
chore: add analytics events (#32385)
## Description
Add analytics event

Fixes https://github.com/appsmithorg/appsmith/issues/32018
## Automation

/ok-to-test tags="tag.Templates"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8540471637>
> Commit: `0a121e609363c33955d6abd36260ac13bcf7ae10`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8540471637&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new analytics event `TEMPLATE_FORK` to better track
template forking activities.
- **Refactor**
- Updated the event tracking in template forking processes to use the
new `TEMPLATE_FORK` event for enhanced clarity and specificity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-04 15:38:59 +05:30
Shrikant Sharat Kandula
261700076e
chore: Add separate request/response views (#31781)
This PR gets finer control into what fields are allowed in
request-body-only, vs what's allowed in response-body-only. This leaves
the fields to separately controlled regarding what can go into the
database and what can't.

[Slack
thread](https://theappsmith.slack.com/archives/CPQNLFHTN/p1710125307810949).

 Server and Cypress **Sanity** tests pass on EE.
2024-04-04 15:10:38 +05:30
Shrikant Sharat Kandula
d12422dfdc
chore: Support localhost in git repo URLs (#32379)
Fixes two things in the way we're parsing the Git repo URL:

1. Allow hosts that don't have a `.` in them. Like `localhost`.
2. Support absolute repo paths, that is, ones that start with a `/`.

Added test cases for both of these.
2024-04-04 13:21:56 +05:30
Nidhi
9571ff0f7b
chore: Added trace and span info to context (#32399) 2024-04-04 12:02:06 +05:30
Shrikant Sharat Kandula
57b62797ff
chore: Minimal surface API for HealthCheckServiceCE (#32347) 2024-04-04 11:56:21 +05:30
Shrikant Sharat Kandula
b220151d3e
chore: Remove more MongoDB API uses in tests (#32403)
Removes a lot of API uses from MongoDB libraries, that don't strictly
have to depend on MongoDB dependencies.
2024-04-04 11:32:28 +05:30
Trisha Anand
68049d2ce0
fix: Moving datasource context creation synchronized call to boundedElastic threadpool (#32384)
## Description

Synchronized blocks shouldn't ever run on the main event loop threads.
Moving all the synchronized blocks during datasource context creation to
elastic thread pool to ensure event loop threads are always available to
servicing new requests.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8539901946>
> Commit: `6d23c5604ebd848dc7c934fb852ae9cb326fb131`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8539901946&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved the efficiency and thread safety in managing datasource
connections.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-04 10:24:22 +05:30
Anagh Hegde
9b14d13af8
feat: add form config for reading certs for PG (#31895)
## Description
Form config changes for the PG datasource to support reading certs from
user

Fixes #31400 

## Automation

/ok-to-test tags="tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8538007537>
> Commit: `0fb57fe78e973db8a3df5f2e407b85eef4adb4e2`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8538007537&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced SSL configuration options for database connections, including
support for client and server CA certificate files.
- **Refactor**
- Improved handling and encoding of SSL certificate content for database
connections, ensuring compatibility and security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com>
2024-04-03 20:04:49 +05:30
Shrikant Sharat Kandula
5767501060
chore: Refactor API for hiding logs (#32358)
Sorry for quickly changing the signature(s) of this.

1. The generic method in the super class just wasn't working well. The
generic return type needs to be set explicitly in some places, and is
inferred in some, and is just too volatile. So we replicate the method
definition in both the subclasses for better API usage code.
2. The field already has a getter with Lombok, I didn't need to write a
new one. 🤦
2024-04-03 13:08:29 +05:30
Shrikant Sharat Kandula
bfb424743a
chore: Get control over what stack traces show up in logs (#32352)
This should give us control over what exceptions print a stack trace and
what exceptions don't need to. Should help us get more control over our
logs and reduce noice.


![shot-2024-04-02-12-33-05](https://github.com/appsmithorg/appsmith/assets/120119/26214102-373a-452f-baa9-7c6492604e83)
2024-04-03 11:33:29 +05:30
Shrikant Sharat Kandula
0959160554
chore: Remove typecast (#32346) 2024-04-03 10:43:08 +05:30
Shrikant Sharat Kandula
8f478ce920
chore: Fix NPE in Segment exception logging (#32351)
NPE found in logs:


![shot-2024-04-02-13-02-58](https://github.com/appsmithorg/appsmith/assets/120119/dc0346e9-6218-45bc-a111-276eef454d84)
2024-04-03 10:38:55 +05:30
Manish Kumar
d0162013f6
chore: analytics for GIT FS (#32302) 2024-04-02 20:55:19 +05:30
Trisha Anand
12e36c97e9
fix: Scheduling synchronized block on bounded elastic threadpool instead of main event threadpool (#32343)
…

## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8523943321>
> Commit: `03dc817039ee24159438e613320550620353a2b7`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8523943321&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
- Improved backend scheduling for datasource operations to enhance
performance without blocking the main thread.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-02 20:20:51 +05:30
Shrikant Sharat Kandula
7a90619b63
chore: Remove use of ErrorProne transitive dependency 2024-04-02 16:18:37 +05:30
Shrikant Sharat Kandula
640096870b
chore: Use Bridge.update() API (#32314) 2024-04-02 13:19:14 +05:30
Shrikant Sharat Kandula
d294b58e2c
chore: Add comment on using annotation injections of beans 2024-04-02 12:43:19 +05:30
Shrikant Sharat Kandula
d857d5d46d
chore: Autowire MongoDB beans with annotation (#32294)
The heart change of this PR is in
[`BaseAppsmithRepositoryCEImpl`](https://github.com/appsmithorg/appsmith/pull/32294/files#diff-5b9270d513f9654dd47da330dca88f1426fdbedf35dde0d5823ac29795b1bebb).

By using `@Autowire` annotation to inject the `mongoOperations` and
`mongoConverter` beans, we remove MongoDB imports and injections in all
the `Impl` classes. This is a whole lot of diff that shows up on
Postgres, that holds no semantic value.
2024-04-02 12:07:39 +05:30
Shrikant Sharat Kandula
4629dcf222
chore: Add Bridge Update APIs (#32291)
Just as we've developed querying APIs with `Bridge` to get rid of
MongoDB specific APIs, this PR introduces an update API to move away
from MongoDB specific `Update` APIs.

/ok-to-test tags="@tag.Sanity"
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8506783476>
> Commit: `644c923c6462e6cd6887c2ac44895dd3d4eda58c`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8506783476&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉
2024-04-01 17:04:28 +05:30
Shrikant Sharat Kandula
6bbf33bf9f
chore: Simpler sequence implementation (#32264)
Don't use MongoDB API to decide the key name to use for the sequence
name. This API is currently used only for datasources, so this
implementation will be compatible with both MongoDB and Postgres.

The actual sequence number generation, in the `getNext` method, will
basically need to be rewritten in the Postgres branch.
2024-04-01 10:17:23 +05:30
Shrikant Sharat Kandula
c6a3afdeac
test: Remove MongoDB API injections in tests (#32245) 2024-04-01 09:39:04 +05:30
Shrikant Sharat Kandula
970ac5d912
chore: Remove unused getIdCriteria 2024-03-30 20:46:50 +05:30
Shrikant Sharat Kandula
7e18b9e9c2
chore: Remove BaseController on ThemeControllerCE (#32243)
Continuation of https://github.com/appsmithorg/appsmith/pull/32216, for
`ThemeControllerCE`.

Server and Cypress Sanity passed on EE.
No conflicts or extra changes needed on EE for build to pass.
2024-03-29 17:05:59 +05:30
Sumit Kumar
c92dc4775e
chore: migrate CacheableRepositoryHelperCEImpl to use BridgeQuery (#32207) 2024-03-29 15:43:31 +05:30
Shrikant Sharat Kandula
af69c69f5c
chore: Don't use .subList like it's a List (#32238)
Instead or getting the sub-list and returning that, which would be an
instance of `ArrayList$SubList`, we instead remove the extra items in
the original `ArrayList` and return that itself.

This is because the `SubList` objects are just _views_ on the underlying
`ArrayList` object, and cannot be serialized by Hibernate directly.
2024-03-29 11:34:01 +05:30
Shrikant Sharat Kandula
77e7ebcd3d
chore: Remove BaseController on ApplicationControllerCE (#32236)
Continuation of https://github.com/appsmithorg/appsmith/pull/32216, for
`ApplicationController`.

Server and Cypress (Sanity and Git tags) tests verified to pass on EE.
No conflicts going to EE and no extra changes needed for build to pass.
2024-03-29 10:49:39 +05:30
Shrikant Sharat Kandula
adc999f542
chore: Remove varargs and List signatures for .criteria() (#32208)
These signatures don't translate very to the Postgres branch.

Server and Cypress tests verified on EE.
2024-03-29 09:20:47 +05:30
Shrikant Sharat Kandula
4d2594b894
chore: Remove BaseController on UserControllerCE (#32216)
The `BaseController` is used by only five controller classes. Regarding
the `GET /` route in the base controller,

- two override and block it (`Application` and `User`).
- two override with a custom implementation and logic, completely
ignoring the `params` object (`Theme` and `Workspace`).
- one appears to be using it (`Plugin`).

This makes it confusing and hard-to-maintain. This common route is
overridden more times than it's reused.

This PR removes the `BaseController` on `UserController` as step 1. We
intend to remove it from the remaining 3 in subsequent PRs.

Server and Cypress tests verified on EE.
2024-03-29 08:08:48 +05:30
Nidhi
a763a226a3
fix: Make sure order of vertices does not make opl calculations flaky (#32227) 2024-03-29 07:40:28 +05:30
Shrikant Sharat Kandula
773d0e718d
fix: Limit email length as per RFC 5321 (#32155)
Adds a length check on validating email addresses, as per [RFC
5321](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1),
quoting here:

>
[4.5.3.1.1](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.1).
Local-part
> 
>    The maximum total length of a user name or other local-part is 64
>    octets.
> 
>
[4.5.3.1.2](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.2).
Domain
> 
>    The maximum total length of a domain name or number is 255 octets.
2024-03-28 13:35:25 +05:30
Shrikant Sharat Kandula
eba60585ab
chore: Move StringUtils to interfaces module (#32129)
This is a utility class with static methods, and we need them in domain
classes in the `interfaces` module as well.
2024-03-28 10:53:41 +05:30
Shrikant Sharat Kandula
062b67642b
chore: No X-Request-Id handling (#32128)
1. Don't copy request's `X-Request-Id` value in the response.
2. If missing in request, don't add a generated values either, but do
retain in internal request context.
2024-03-28 10:51:07 +05:30
Manish Kumar
8d45847b11
chore: git remote autocommit (#32111)
## Description
 - This Pr adds a remote comparison check in `autocommit` flow.
- When the remote is ahead of the local repository, the application
should not be commited to remote, local should pull the changes first
and then the respective commit & push should happen. Likewise in
autocommit the remote check has been placed.
- The check is meant to silently abort the autocommit if the remote is
found to be ahead of the local.

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

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8451614719>
> Commit: `4f696b752a8f3f847f2e6f8ff5acf9ef0e67a276`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8451614719&attempt=2"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced auto-commit functionality for Git integration, including
better handling based on branch and application states, and improved
remote changes fetching.
- **Refactor**
- Refactored Git-related services to support new auto-commit logic and
remote changes fetching.
- **Tests**
- Added new tests for the updated auto-commit functionality, ensuring it
behaves as expected under various scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-28 10:30:13 +05:30
Shrikant Sharat Kandula
9ef8398a97
chore: Remove unnecessary duplicate interface method definition (#32121) 2024-03-27 21:19:04 +05:30
Shrikant Sharat Kandula
54e2991f7b
chore: Cleanup unused, unneeded code (#31855) 2024-03-27 19:57:47 +05:30
Shrikant Sharat Kandula
062621f949
chore: Migrate CustomWorkspaceRepositoryCEImpl to Bridge API (#31767) 2024-03-27 18:38:27 +05:30
Shrikant Sharat Kandula
d02c1edf6a
chore: Inject AuthenticationPrincipal in controller method (#31742)
Instead of using `sessionUserService.getCurrentUser()`, or the
`ReactiveSecurityContextHolder.getContext` directly (which we are doing
in several places), this injection will let us get the principal
directly at controller-level.

Yes, it produces the anonymous user, when there's no session.

Why? Less code. More relying on letting Spring do the right thing for
us. 😛

Why aren't we making this change across the board everywhere? Sure,
eventually. Small PR like this helps me get consensus, be less daunting
to review, and most important of all, easy to revert if we notice
something going wrong. In a week or two, if we want to do this, we can
start rolling it out to more places in code.

/ok-to-test tags="@tag.Sanity"
2024-03-27 11:23:03 +05:30
Shrikant Sharat Kandula
69df22e218
chore: Migrate CustomDatasourceRepositoryCEImpl to Bridge APIs (#31741) 2024-03-27 09:25:50 +05:30
Shrikant Sharat Kandula
36577ad7cc
chore: Remove QueryDSL (#32074)
Another attempt at removing QueryDSL. This time, it seems to be working
without very many shenanigans, which throws question on what the hell I
was doing in the previous attempt. 😭

All tests and Sanity Cypress passes on EE at
https://github.com/appsmithorg/appsmith-ee/pull/3805.
2024-03-26 21:28:16 +05:30
Anagh Hegde
062aaeb6b5
fix: logic for fetching onPageLoadActions for blocks import (#32073)
## Description
Fetch the actions from database and populate the ids for onPageLoad
actions for the building block.


## Automation

/ok-to-test tags="tags.ImportExport"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8435259797>
> Commit: `8b5e06e3b97ef2795f7664c026c5f67f1d2e8886`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8435259797&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the import functionality to correctly update onPageLoad
actions with their respective IDs for both action collections and new
actions, ensuring a smoother integration and setup process for users.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 19:51:04 +05:30
Anagh Hegde
4a260b577b
chore: add new fields of block metadata (#32072)
## Description
Building blocks within the app explorer do not have information about
their spatial requirements in terms of rows and columns.
To address this issue, we propose incorporating metadata into the
template schema within the CS platform. This metadata will specify the
number of rows and columns each building block needs to occupy on the
main canvas, enabling smoother handling during drag-and-drop operations
of the blocks.

Fixes https://github.com/appsmithorg/appsmith/issues/32051
## Automation

/ok-to-test tags="tags.Templates"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8435206653>
> Commit: `a89f7950bca57c68b0b3caea9fbd4639cf915a92`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8435206653&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced grid row and column size customization options for
application templates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 19:29:43 +05:30
Sumit Kumar
607672efcb
chore: migrate ActionCollectionRepositoryCEImp APIs to Bridge API format (#32044) 2024-03-26 15:45:30 +05:30
Shrikant Sharat Kandula
66a24c692a Revert "chore: Remove QueryDSL and add Errorprone (#31754)"
This reverts commit 7f9d31adbc.
2024-03-25 19:20:22 +05:30
Shrikant Sharat Kandula
7f9d31adbc
chore: Remove QueryDSL and add Errorprone (#31754)
Two things happening in this PR.

1. We're removing QueryDSL.
2. We're adding [Errorprone](http://errorprone.info/).

Why both together? Because I can't get the build to work, if I remove
QueryDSL, and not add any other annotation processor. Lombok is refusing
to do its thing, unless there is at least one other annotation
processor, which QueryDSL was filling in for. I wanted to add Errorprone
anyway in a separate task, so didn't investigate further and just added
it here.

But adding Errorprone is not the idea for now. So all lint rules are
disable, and it has no affect on build time either. We'll slowly roll
out some of the checks and lint rules in the coming weeks.
2024-03-25 17:05:34 +05:30
Shrikant Sharat Kandula
14463e8370
chore(deps): Update httpclient ahead of upgrading Spring (#31778)
All tests pass on [EE
PR](https://github.com/appsmithorg/appsmith-ee/pull/3698).
2024-03-25 14:25:18 +05:30
Shrikant Sharat Kandula
c85bf7ec0a
chore: Remove unused import missed by spotless 2024-03-25 11:12:11 +05:30
Sumit Kumar
be3ecb3b01
chore: Revert "chore: migrate few APIs to bridge API model" (#32020) 2024-03-22 15:52:12 +05:30
Sumit Kumar
921f7a4972
chore: migrate few APIs to brige API model (#31987) 2024-03-22 14:33:09 +05:30
Nilesh Sarupriya
856c2ced59
chore: use published or unpublished DTO based on input (#31888)
## Description
> [!TIP]  
> Update the `generateActionCollectionViewDTO` to take into account the
`viewMode`.

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

## Automation

/ok-to-test tags="@tag.Sanity @tag.JS"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8326337566>
> Commit: `f2c67c2c3153c5240891be6216db174bcd22c5c1`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8326337566&attempt=2"
target="_blank">Click here!</a>
> It seems like **no tests ran** 😔. We are not able to recognize it,
please check workflow <a
href="https://github.com/appsmithorg/appsmith/actions/runs/8326337566"
target="_blank">here.</a>

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the application's ability to switch between published and
unpublished collections based on the view mode, providing a more dynamic
user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-22 14:31:18 +05:30
Anagh Hegde
967148999b
feat: Migrate ApplicationSnapshot to bridge API (#32000)
## Description
* Migrate ApplicationSnapshot Repo class to use the bridge API for the
mongo to postgres migration


## Automation

/ok-to-test tags="tag.Visual"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8379807833>
> Commit: `1cfebd4f4d27d2bfd4fff29e182941a39381e999`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8379807833&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Enhanced query capabilities with the addition of new `equal` methods,
allowing for more precise data fetching based on string and integer
values.
- **Refactor**
- Improved data querying in application snapshots by utilizing the new
`equal` method for cleaner and more efficient code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-22 13:04:01 +05:30
Anagh Hegde
6b3c9f4dca
feat: add layout on load actions to import block API response (#31993)
## Description
* After importing the block into a page, the browser does not have the
updated values on the on page load actions.
* The newly created actions, actionCollections which needs to run after
adding the block to canvas are missing.
* This is because unlike normal flow, here the server fetch the Block
data from DSL and then has to import it and send the widget DSL from the
block to client so that the widgets are visible on the canvas. Hence
adding this to response to make the experience same as other widgets

Fixes #31992 

## Automation

/ok-to-test tags="tag.ImportExport"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8379501235>
> Commit: `a6599b14c4027179f79a31b3d6a8e1dad1cc96f0`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8379501235&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new data structure to enhance building block imports,
including widget layouts and onPageLoad actions.
- **Refactor**
- Updated the import functionality to utilize the new data structure for
building blocks, improving the handling of layout data and onPageLoad
actions.
- **Tests**
- Modified unit tests to align with the new data structure for building
block imports, ensuring compatibility and correctness.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-22 12:34:05 +05:30
Anagh Hegde
43f58f2ef3
chore: migrate customJs Lib query to bridge class (#31932)
## Description
Migrate the mongo criteria to bridge class API

## Automation

/ok-to-test tags="tag.ActionCollection"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8373394313>
> Commit: `31db4207be1c94445c7237a6131c43987459adf4`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8373394313&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->






<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced criteria building abstraction in server repository operations
for improved code maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-21 16:34:31 +05:30
Anagh Hegde
77a9cc06af
chore: migrate permission group class to bridge API (#31952)
## Description
Migrate the mongo criteria to bridge class API

## Automation

/ok-to-test tags="tag.NewAction"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8372699694>
> Commit: `f57eea5e174a3b97b2d2e68d41a0cae87f918596`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8372699694&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->







<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved query building logic in the server for enhanced performance
and control flow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-21 15:27:48 +05:30
Anagh Hegde
dcda9bc0fe
feat: Add file validation for partial import (#31907)
## Description
Add validation flow for partial import, to avoid user importing the
fully exported app in the partial import.

Fixes #31829 

## Automation

/ok-to-test tags="tag.ImportExport"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8371031960>
> Commit: `8a501dd49d3793eade3ef3b425c55714e6720a46`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8371031960&attempt=2"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->









<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit



- **New Features**
- Enhanced import functionality to include a check for importable
resources, improving error handling and user feedback during the import
process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-21 15:27:39 +05:30
Nilesh Sarupriya
3d799ad1f9
chore: add information about event tag generation for analytics (#31931)
## Description
> [!TIP]  
> Add code comment block about how event tags are generated for
Analytics service.

Fixes [[Task]: Add clarification on Analytics Events, when is resource
type added as a suffix to the analytics
events.](https://github.com/appsmithorg/appsmith/issues/31582)

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Enhanced clarity on event tag generation in analytics with detailed
comments, including examples and references.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-21 15:22:54 +05:30
Goutham Pratapa
d3acb4ba8f
feat: add ability to change application logs location (#31926)
Fixes [31877](https://github.com/appsmithorg/appsmith/issues/31877) 

```
sudo docker run -it -d --name ap -e APPSMITH_LOG_DIR=/logs --pull always appsmith/appsmith-dp:ce-31926


(base) ➜  appsmith-ee git:(release) ✗ docker exec -it -u root ap bash
root@3d17510be0d7:/opt/appsmith# ls /logs/*
/logs/backend:
backend-3d17510be0d7.log

/logs/editor:
access-3d17510be0d7.log  error-3d17510be0d7.log

/logs/rts:
rts-3d17510be0d7.log
root@3d17510be0d7:/opt/appsmith#

```
2024-03-20 19:45:48 +05:30
Abhijeet
3cdd2a97e6
fix: Filter Appsmith exceptions from feature flagged aspect to provide context based exception (#31913)
## Description
PR to provide more contextual exception when Appsmith exception is
thrown within method marked with `@FeatureFlagged`.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8339550893>
> Commit: `e5a0be3166e7ede54240c8981683f61e09f506f8`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8339550893&attempt=2"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
- Improved handling of specific exceptions during method invocations to
directly rethrow known exceptions for clearer error reporting.
- **Bug Fixes**
- Enhanced an error message in the system to provide more detailed
information about encountered issues.
- **Tests**
- Added new tests to verify the correct handling and messaging of
exceptions under different conditions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-19 14:33:55 +05:30
Nilesh Sarupriya
819d414e7a
chore: extend the update recently used workspaces to workflows and packages (#31738)
## Description
> [!TIP]  
> Code split the recently used workspaces code to other workspace
children

Fixes [[Task]: Workflows to get sorted based on recently used objects
per user in a
workspace](https://github.com/appsmithorg/appsmith/issues/30841)

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8323719016>
> Commit: `af46466b7d88662d656fcaf8034ccda9dd72f657`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8323719016&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Enhanced tracking for user interactions across applications,
workflows, and packages to improve the user experience.
- **Refactor**
- Updated user data service to support the new tracking feature,
ensuring a more personalized and efficient user interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-19 02:37:56 -05:00
Nirmal Sarswat
997326774b
chore: Add after delete hook for Appsmith AI datasource (#31466)
## Description
Created a pre delete hook to delete datasource files on Appsmith AI
server when datasource is deleted in Appsmith instance.

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

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

## Automation

/ok-to-test tags="@tag.Datasource"

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new method `preDeleteHook` in the `PluginExecutor`
interface to serve as a hook after deleting a datasource.
- Added a new method `disassociateDatasource` in the AI plugin to notify
the AI server about datasource deletion and provide file context if
available.
- **Refactor**
- Enhanced the AI plugin by refactoring methods to use a new
`createAssociateDTO` method for generating `AssociateDTO` instances,
improving code readability and maintainability.
- **Chores**
- Updated the `archiveById` method in DatasourceServiceCEImpl to include
a `flatMap` operation that triggers a `preDeleteHook` method on the
plugin executor before archiving the datasource. Also added a new
private method `findPluginExecutor` for retrieving the plugin executor.
<!-- end of auto-generated comment: release notes by coderabbit.ai
--><!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8338230830>
> Commit: `800915ea99c93663af34d08e8bcf4a14ad1356d0`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8338230830&attempt=2"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->
2024-03-19 12:52:32 +05:30
Shrikant Sharat Kandula
821f179bec
chore: Remove ready banner (#31903)
Removing the banner, now that we have the starting page that shows up on
the browser itself, and unfortunately, the unicode characters in this
banner are screwing up some log aggregations systems. 🤦

[Slack conversation for more
context](https://theappsmith.slack.com/archives/C059R5RGFAN/p1710827561442049?thread_ts=1709690960.711109&cid=C059R5RGFAN).
2024-03-19 11:58:48 +05:30
Anagh Hegde
cc739d7afd
chore: migrate plugin repository class to use Bridge API (#31798) 2024-03-19 11:13:42 +05:30
Rudraprasad Das
621e719110
fix: removing unnecessary status api call (#31229)
## Description
Removing duplicate status API on opening modal

#### PR fixes following issue(s)

Fixes #31228


## Automation

/ok-to-test tags="@tag.Git"

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Improved the initialization process of Git status during deployment
and merge operations for enhanced performance.
- Optimized logging and code flow in the `getStatus` method for better
monitoring and troubleshooting.
- Introduced elapsed time logging for various operations within the
method.
<!-- end of auto-generated comment: release notes by coderabbit.ai
--><!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8328565497>
> Commit: `b8138d55279aaa943e8d747286663c0d5c71d705`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8328565497&attempt=2"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->

---------

Co-authored-by: subrata <subrata@appsmith.com>
Co-authored-by: manish kumar <manish@appsmith.com>
Co-authored-by: manish <manish@manishs-MacBook-Pro.local>
Co-authored-by: sondermanish <sonder.manish@gmail.com>
2024-03-18 22:06:57 +05:30
Anagh Hegde
997fd96dce
feat: captcha for invite user flow (#31715)
## Description
Add captcha for the invite user flow. 

Fixes https://theappsmith.slack.com/archives/CGBPVEJ5C/p1710134091696379
https://github.com/appsmithorg/appsmith/issues/31789

## Automation

/ok-to-test tags="@tag.Workspace"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]  
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8321963367>
> Commit: `769030f0a3deb09e256c38cba7d6d30a9a80a379`
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8321963367&attempt=1"
target="_blank">Click here!</a>
> All cypress tests have passed 🎉🎉🎉

<!-- end of auto-generated comment: Cypress test results  -->



















<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Integrated Google reCAPTCHA in the user invitation form to enhance
security during form submissions.
- **Enhancements**
- Improved handling of URL parameters in utility functions for more
robust data processing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
2024-03-18 19:55:41 +05:30
Nilansh Bansal
56936866e1
fix: trigger instance re-registration if not already registered (#31610)
## Description

Ref:
https://theappsmith.slack.com/archives/C040LHZN03V/p1700206435426579
## Background 
At the start of the new appsmith server, we register the instanceId with
cloud services by invoking the cloud services api. For some of the
instances, if this register api call didn't go through, the cloud
services db will not have the instanceId.

While connecting to GSheets, we do a check if the request is coming from
a valid registered instance, and if it is not present this api fails.

The appsmith mongo database config collection, keeps a record of whether
this instance was registered or not.
In some scenarios, the appsmith_registered field shows that the instance
is registered but it is not as instanceId is missing in CS, i.e. the
appsmith server has the info that the instance is registered with CS but
the CS db has not registered the instance.

> This PR triggers the re-registration flow to the cloud services if the
instance is not registered.
> When calling the google sheets API to cloud services, if the response
received is 403 FORBIDDEN, it indicates the instance is not registered,
in which scenario we retrigger the registeration flow and call the CS
again.

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

#### Media
> DEMO

https://drive.google.com/file/d/1cVluIAQlzxwb7A2bgBBMJ0I4awSV6fKp/view?usp=sharing
#### Type of change
- Bug fix (non-breaking change which fixes an issue)

## Testing
#### How Has This Been Tested?

- [x] Manual
- [ ] JUnit
- [ ] 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
- [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/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

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->
2024-03-15 14:31:35 +05:30
Manish Kumar
fbdb1d655c
chore: ce split for permission scoping for CD (#31761) 2024-03-14 12:56:28 +05:30
Shrikant Sharat Kandula
89f3107621 Revert "chore: Add separate request/response views (#31640)"
This reverts commit 4cdbe89586.
2024-03-14 11:56:59 +05:30
Shrikant Sharat Kandula
41a66a1168
chore: Tiny NodeJS script as a linter for field name constants (#31766)
The point is to prevent unfortunate field name problems like this:
https://github.com/appsmithorg/appsmith/pull/31760/files.

This NodeJS script does a very rudimentary analysis on all Java files,
with a few regular expressions, and finds anomalies. As such, since it's
not very smart, it's quite strict. I intend to make it a little more
strict in the coming days, but it's a start.

It's not hooked into any processes/CI yet, but that will also come in
next. Since it's not very smart, it actually runs quite fast (.8s on
EE).

The script also doesn't exit with a non-zero exit code when it finds a
problem. Also will be solved as part of integrating it into CI.
2024-03-14 06:30:40 +05:30
Shrikant Sharat Kandula
f3c0673822
fix: Incorrect field constants (#31760) 2024-03-13 20:44:53 +05:30
Shrikant Sharat Kandula
4cdbe89586
chore: Add separate request/response views (#31640)
This PR gets finer control into what fields are allowed in
request-body-only, vs what's allowed in response-body-only. This leaves
the fields to separately controlled regarding what can go into the
database and what can't.

[Slack
thread](https://theappsmith.slack.com/archives/CPQNLFHTN/p1710125307810949).
2024-03-13 14:50:03 +05:30
Shrikant Sharat Kandula
37bc2d3c72 chore: Fix missing FieldNameConstants on Layout
This was caused due to two separate PRs
getting merged togather, but had a
disagreement.
2024-03-13 13:54:32 +05:30
Shrikant Sharat Kandula
1000de9503
chore: Fix NPE in finding page without branch name (#31722)
Fixes https://github.com/appsmithorg/appsmith/issues/31725.
2024-03-13 13:47:57 +05:30
Shrikant Sharat Kandula
e5bf52a3c5
chore: Remove BaseDomain on Layout (#31544)
Migration takes ~24s on release, and ~210s (3.5 mins) on prod.

That makes this a slightly long migration, so I'd like reviewers'
opinion on if this PR's changes are worth dealing with that migration
time.

This change is needed in the Postgres branch. Some of the fields on
this, especially the fact that the `id` field has a persistence-specific
`@Id` annotation, is throwing Hibernate off in weird ways that I didn't
spend much time diving into. Removing `BaseDomain` on `Layout`, was a
much simpler/smaller change than that, and it got Hibernate to behave
again.
2024-03-13 13:40:22 +05:30
Shrikant Sharat Kandula
0d206ebfbd
chore: Migrate NewPageRepositoryCEImpl to use Bridge APIs (#31693) 2024-03-13 11:11:12 +05:30
Shrikant Sharat Kandula
32640eea0b
fix: NPE in LoginRateLimitFilter (#31687)
We get an NPE when there's a request to the login API endpoint, with a
missing `username` field. This PR fixes that.
2024-03-13 11:08:44 +05:30
Shrikant Sharat Kandula
65f7bfcc97
chore: Move Application repo to Bridge API (#31684) 2024-03-13 11:05:22 +05:30
Shrikant Sharat Kandula
d820e5df4b
chore: Remove deprecated API uses in SecurityConfig (#31310)
These APIs are getting deprecated and are setting up for removal soon.
This PR changes such API uses to ones that aren't deprecated. This is
needed towards upgrading Spring to get rid of a few CVEs on Appsmith
image.
2024-03-13 10:49:26 +05:30
Nidhi
658ea94ae6
chore: Split changes for overridden package import (#31712) 2024-03-13 10:34:44 +05:30
Manish Kumar
f65d9d0ead
fix: added error handling for updateLayout failure while importing (#31694) 2024-03-12 20:41:38 +00:00
Nidhi
2670128bce
chore: Split changes for mi dr values (#31677)
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2024-03-12 23:21:44 +05:30
Shrikant Sharat Kandula
1eb7f0e171
chore: Remove "Save theme" functionality (#31481)
This is deleting a defunct feature.

[Slack
thread](https://theappsmith.slack.com/archives/CGBPVEJ5C/p1709621165627549).
2024-03-12 18:54:39 +05:30
Shrikant Sharat Kandula
0af7c7ecbb
chore: Remove non-static or API in Bridge (#31678)
Removing the `BridgeQuery.or` API since

1. it reads confusing. Are the passed-in items applied with an `or`, or
the current queries applied with the parameters with an `or`. Unlike
`and` method, this difference with `or` can change the meaning of the
query drastically.
2. it doesn't translate very well into Postgres world. Multiple hoops to
manage the same API, just not worth it.

The static `Bridge.or` looks, reads, and works much better. That's the
suggested alternative for this.
2024-03-12 15:53:49 +05:30
Nilesh Sarupriya
127e96c3f1
chore: code split refactor of generateActionCollectionViewDTO and setAutoGeneratedHeaders (#31620)
## Description
> code split methods to support native triggering of workflows.

#### PR fixes following issue(s)
Fixes # (issue number)
> 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
>
>
>
## 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
- [ ] JUnit
- [ ] 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/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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the action collection view with additional parameters for
better access control and view mode handling.
- Improved action execution process by enabling the setting of
auto-generated headers dynamically, enhancing the flexibility and
customization of action executions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-12 15:35:28 +05:30
Shrikant Sharat Kandula
350d89b98e
chore: Migrate NewAction repo to Bridge APIs (#31632) 2024-03-12 11:24:15 +05:30
Shrikant Sharat Kandula
86f0ebe9fe
chore: Remove unnecessary call to get default tenant ID (#31521) 2024-03-12 06:36:16 +05:30
srix
eba9cad9f6
Revert "chore: code split to support other contexts" (#31666)
Reverts appsmithorg/appsmith#31623

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated method signatures and parameters related to OAuth2
authentication to simplify and enhance the redirect URL population
process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-11 19:33:20 +05:30
Nilesh Sarupriya
b08d100185
chore: code split to support other contexts (#31623)
## Description
> Datasource Controller's getTokenRequestUrl() is currently bounded to
Pages.
> This is a code split to support generation of token request url for
other contexts like modules and workflows.

#### PR fixes following issue(s)
Fixes [[Bug]: Authenticated API & Authenticated graphQL API with OAuth2
throws 404 error in
workflows](https://github.com/appsmithorg/appsmith/issues/31554)

#### 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?
- [x] JUnit
Existing test cases should pass.
- [ ] 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/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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated OAuth2 authorization process to use context-specific
parameters for enhanced flexibility and security.
- **Refactor**
- Modified `getTokenRequestUrl` and
`getAuthorizationCodeURLForGenericOAuth2` methods to accept
`contextType` and `contextId`, improving the OAuth2 flow.
- Adjusted logging and method parameters across various classes for
consistency with new OAuth2 process.
- **Tests**
- Updated test cases to reflect changes in method parameter orders and
OAuth2 authorization enhancements.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-11 19:29:04 +05:30
Anagh Hegde
c4e73c475a
chore: Add compound index to user class (#31649) 2024-03-11 18:47:05 +05:30
Shrikant Sharat Kandula
9afcf84d0d
chore: Fix double-brace-initialization (#31643)
This PR fixes all uses of double brace initialization, with ordinary
normal code.

It is usually advised to avoid Double brace initialization, especially
for building collections as it can cause very hard-to-troubleshoot bugs
with systems that use reflection a lot, like Spring, Hibernate, Jackson,
etc.

Almost every Java linter out there recommends to avoid this.

This can be configured in IntelliJ to show up as an error with the
following configuration. Please **please** do this.

![shot-2024-03-11-04-14-16](https://github.com/appsmithorg/appsmith/assets/120119/cc3d8c67-5dfc-4884-a36a-8f9e1aeea19f)
2024-03-11 11:54:25 +05:30
sneha122
1da73775b8
chore: create action source instrumentation added (#31585)
## Description

Added server side create action instrumentation for following cases:
Action | Source | Frontend/Backend | Tests Added?
-- | -- | -- | --
Create Action / query from any other place in app (entity explorer /
datasource preview / ombinar) | self | source sent from frontend |
Cypress
Drag a table widget → Click connect data → Select datasource → select
table → click on connect data | one-click-binding | source sent from
frontend | Cypress
Generate CRUD triggered from new page menu or datasource preview |
generate-crud-page | source set in backend | No
When page is cloned | clone-page | source set in backend | No
When application is forked | fork-application | source set in backend |
No

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced event tracking capabilities by introducing an enumeration to
track the source of action creation for analytics.

- **Enhancements**
- Improved action creation flow by specifying the source in various
components, aiding in precise analytics and debugging.
- Streamlined analytics properties method across services for
consistency and simplicity.

- **Bug Fixes**
- Adjusted assertion logic in Cypress tests to validate the source of
action creation accurately, ensuring reliability in automated testing.

- **Refactor**
- Simplified method signatures and logic in server-side analytics
handling for better maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-03-11 10:22:24 +05:30
Abhijeet
0c2f1a27e0
feat: Add functionality to enforce strong password for form signups (#31605)
**PR to selectively enable strong password requirements.**

Fixes: https://github.com/appsmithorg/appsmith/issues/31525
2024-03-11 09:39:01 +05:30
Shrikant Sharat Kandula
20bc0844ac
chore: Don't print hashed password in logs (#31624) 2024-03-11 09:38:00 +05:30
Shrikant Sharat Kandula
583c478ab3
chore: Use Bridge API for user, config, theme repos (#31460)
Managed to remove the `Criteria` and `where` imported from MongoDB APIs.
The `Bridge` API calls should work the same on Postgres as well as here.
We'll be moving more repository methods over to this API soon.

Notice that the `Update` import is still there. Bridge API for `Update`
objects is also almost ready, and is coming up soon.
2024-03-08 13:27:11 +05:30
Anagh Hegde
ac742bc668
fix: Add page from template custom js lib is not saved (#31579)
## Description
When a page is added from template using the new page via template CTA,
the customjs lib used is not saved. This is because of the condition
used in Import Export flow for append to application flow.

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

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced import functionality to better handle Custom JavaScript
Libraries, ensuring smoother re-imports and updates.
- **Tests**
- Added new tests to verify the improved handling and integrity of
Custom JavaScript Libraries during the import process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-08 12:02:26 +05:30
Nilesh Sarupriya
53f355a830
chore: change saas authentication to context based (#31064)
## Description
> Add context based authentication instead of being bounded by page.

#### PR fixes following issue(s)
Fixes # (issue number)
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> N/A

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

## Testing
>
#### How Has This Been Tested?
- [x] Manual

#### Test Plan
> N/A

#### Issues raised during DP testing
> N/A

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced request handling for Appsmith tokens with additional
parameters for broader context.
    - Streamlined integration processes with new data transfer objects.
- **Refactor**
- Consolidated integration functionalities for improved code
reusability.
    - Optimized authentication process with updated method signatures.
- **Documentation**
- Updates in user and developer interactions with the API, focusing on
token requests and integrations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayushpahwa96@gmail.com>
2024-03-07 15:36:31 +05:30
Manish Kumar
193f071982
chore: git refactor first set of apis (#31548) 2024-03-07 14:00:43 +05:30
Nilesh Sarupriya
addb809823
chore: code split to support action execution without permission (#31465)
## Description
> Code split and refactor to support action execution without
permissions

#### PR fixes following issue(s)
Fixes [[Task]: Permission less way of executing a workflow trigger query
securely](https://github.com/appsmithorg/appsmith/issues/30231)

#### 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
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
>
#### How Has This Been Tested?
- [x] Manual
Manually tested the execution of an Action (with and without datasource)
by a curl command on a user who is in no way associated to the
workspace.
- [x] JUnit
Existing unit tests should pass.

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a feature to optionally bypass permission checks in
specific scenarios, enhancing flexibility in operations.

- **Refactor**
- Updated method signatures across several classes to support
conditional permission checks.
  
- **Tests**
- Added new tests to validate the behavior of permission retrieval with
the bypass option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-03-07 10:56:21 +05:30
Anagh Hegde
0fd2d5111d
feat: building block canvas dragging (#31398)
## Description
The primary aim of this feature is to empower users by enabling them to
seamlessly integrate building blocks along with their associated
components (queries, JavaScript, datasources, and widgets) into their
existing applications through drag-and-drop functionality.
This PR adds change to create a Partial IE engine to download the json
file from CS, then add all DS, JS, Queries and Custom JS Libs. Also
handle the name refactoring in js, queries and dsl and then return
modified widget dsl to frontend.

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

#### Media

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

## Testing
#### How Has This Been Tested?
- [ ] Manual
- [ ] JUnit

#### Test Plan

https://www.notion.so/appsmith/Test-planning-Drag-and-drop-building-blocks-030b0a5e944a478c9598ad65ba5096e2?pm=c

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Added `BuildingBlockDTO` import.
	- Added `ApplicationTemplateService` and `WidgetRefactorUtil` services.
	- Added `importBuildingBlock` method.
	- Introduced partial import functionality for building blocks.
- Added capability to refactor widget and action names during import to
avoid name clashes.

- **Enhancements**
	- Improved logic for importing resources within a page.
- Enhanced name refactoring in DSL bindings to ensure consistency across
the application.

- **Refactor**
- Updated methods to handle new import structures and services more
efficiently.

- **Tests**
- Added new tests to verify partial imports and name refactoring
functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-06 12:08:33 +05:30
Nidhi
9d500bf448
chore: Split changes for idempotent exports with module instances (#31526) 2024-03-06 11:08:16 +05:30
Shrikant Sharat Kandula
d7d0eb381c
chore: Remove unused anonymous user cache (#31456)
1. This is unused.

2. Such perma-caching is better owned by the repository, whose data is
being cached. For example, `UserRepository*` in case of
`getAnonymousUser`. Having all cached resources in one place doesn't
scale. Besides, doing it this way means we have do hit the DB directly
with `mongoOperations`, because injecting any repository beans will
cause cyclic injections.
2024-03-06 09:25:16 +05:30
Nidhi
ea3af81e21
chore: Compatibility changes for import apps with mi downgraded experience (#31488) 2024-03-05 17:15:53 +05:30
Shrikant Sharat Kandula
b49fbbf81f
chore: Static and generified bridge API (#31427)
Migration the Bridge APIs to static+non-static versions for a more
fluent API, and to make it extendable to get `Bridge.or` and
`Bridge.and`.

We're also making the API generified, which isn't strictly needed here,
but is needed for the `CriteriaBuilder` API on Postgres.
2024-03-04 12:53:04 +05:30
Shrikant Sharat Kandula
8d311ea6c8
chore: Remove unused mongoTemplate bean 2024-03-04 10:28:37 +05:30
Shrikant Sharat Kandula
76de6761d6
chore: Use queryBuilder for count op (#31328) 2024-03-02 18:46:08 +05:30
Nidhi
6dd8b4995c
chore: Split companion to package import (#31394) 2024-03-01 11:29:51 +05:30
Shrikant Sharat Kandula
458f3c332d
chore: Remove mongoTemplate from custom action repo impl (#31369)
1. We remove the `mongoTemplate` and replace it with `mongoOperations`,
which we get from the base impl class anyway. One less thing to port.

2. We also move the actual _publish_ logic to a separate protected
method so it can be reused in the EE repo impl class, which has this
logic duplicated.
2024-03-01 10:28:18 +05:30
Shrikant Sharat Kandula
45b81f95e2
chore: Remove upsert in setting last release notes version (#31324)
Instead of `upsert`, we `update` first, which is arguably the most used
operation in this context, and if that fails, then we attempt an insert.

We're not expecting a performance hit, since most operations here would
be an actual `update` only.
2024-02-29 12:18:27 +05:30
Shrikant Sharat Kandula
e387aa2f4a
chore: No upsert when saving datasource structure (#31320)
Instead of `upsert`, we `update` first, which is arguably the most used
operation in this context, and if that fails, then we attempt an insert.

We're not expecting a performance hit, since most operations here would
be an actual `update` only.


cherry picked from commit 75d2f2a8c4,
which was accidentally pushed to `release` branch.
2024-02-29 12:17:57 +05:30
Shrikant Sharat Kandula
2eb14cad7c
ci: Collect failed server tests from Surefire reports (#31366)
The current `TestResultLoggerExtension` extension only finds failed
tests from the server module, and not from any of the plugin or other
modules.

To fix this, this PR collects failed tests using the Surefire XML test
reports already generated by the `mvn test` command.
2024-02-29 07:10:39 +05:30
Shrikant Sharat Kandula
9f3ac2c561
chore: Revert Upgrade Mockito and surefire plugin (#31073) (#31334)
This reverts commit 5647916478.

This seems to have broken our ability to re-run failed tests on server
workflow. We'll bring the changes back after we figure out how to not
lose that capability.
2024-02-28 14:49:41 +05:30
Nilesh Sarupriya
f715cfd502
chore: code split for entity search (#31332)
## Description
> Code split for entity search.
> 1. Move the methods to SearchEntityHelper to be readily available for
re-use.
> 2. Rename SearchEntitySolutionTest -> SearchEntitySolutionCETest

#### PR fixes following issue(s)
Fixes [[Task]: Add search functionality for workflows
#30843](https://github.com/appsmithorg/appsmith/issues/30843)

#### 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
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
>
#### How Has This Been Tested?
> None, as this is just a refactor.

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved code efficiency in search functionality by centralizing the
logic for creating pageable and sort objects.
- **Tests**
	- Renamed a test class to better reflect its purpose.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-02-28 14:12:59 +05:30
Abhijeet
d25ae858e9
fix: Add as a query param for workspace invite email as per updated format after homepage revamp (#31295)
#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/appsmith/issues/31280

#### Media
<img width="1471" alt="Screenshot 2024-02-27 at 11 04 33 AM"
src="https://github.com/appsmithorg/appsmith/assets/41686026/a7b574fb-5a9e-4be5-a3f1-18afd3f4f956">

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

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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Modified the way workspace URLs are constructed to enhance link
handling.
- **Tests**
- Added tests to ensure the reliability of workspace invite URL
generation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-28 02:22:08 -06:00
Sumit Kumar
3e29634cbb
chore: enable Micrometer metrics conditionally (#31204) 2024-02-28 13:42:55 +05:30
Shrikant Sharat Kandula
e2d226f127 Revert "chore: Use queryBulider for count op"
This reverts commit 70cd65ec7d.
2024-02-28 11:09:53 +05:30
Shrikant Sharat Kandula
70cd65ec7d chore: Use queryBulider for count op 2024-02-28 10:58:56 +05:30
Shrikant Sharat Kandula
e7573a7b81 Revert "chore: No upsert when saving datasource structure"
This reverts commit 75d2f2a8c4.
2024-02-27 22:00:13 +05:30
Shrikant Sharat Kandula
75d2f2a8c4 chore: No upsert when saving datasource structure 2024-02-27 21:58:13 +05:30
Shrikant Sharat Kandula
be027e8434
chore: Remove ineffectual user change handler (#31286)
This whole flow is not affecting anything. At the end, in the repo
methods, the change is applied to a `Workspace.userRoles` field, which
doesn't even exist today. Effectively making this flow ineffectual and
unnecessary.
2024-02-27 20:02:58 +05:30
Shrikant Sharat Kandula
e1f9f13dc4
chore: Replace remaining Q* usage with Fields (#31299)
Continuation of https://github.com/appsmithorg/appsmith/pull/31269.

We're not removing QueryDSL itself in this PR. That will happen after we
remove uses on the EE repo as well.
2024-02-27 17:39:05 +05:30
Shrikant Sharat Kandula
d59c8344c7
chore: Remove mongoTemplate in BaseService (#31283)
The `BaseService` keeps references to a `ReactiveMongoTemplate`, a
`MongoConverter` and a `Scheduler`.

For the first two, they shouldn't be directly used at all in Service
classes, that's an abstraction leak. That's what repositories are for.

The third one isn't really used anywhere in `BaseService` at all.

This PR removes all three of these from `BaseService`.
2024-02-27 16:48:02 +05:30
Shrikant Sharat Kandula
8f5efc94b5
chore: Remove simple mongoOperations uses in repo classes (#31285)
Replace simple uses of `mongoOperations` in repo classes with equivalent
operations using `queryBuilder` API.
2024-02-27 12:25:36 +05:30
sneha122
c9582f5e21
chore: instrumentation added for generate crud create action (#31277)
## Description

This PR adds `create_NEWACTION` instrumentation for generate crud flow.
Today generate crud flow is handled by `/crud` API, this API is
responsible for creating actions, widgets and everything that is needed
for generating crud app. When actions are created in generate crud flow,
`create_NEWACTION` event is triggered, we wanted to add details like
`isUserCreated` and `accelerator` to this event, which will help us in
segregation of actions based on whether they were created manually or by
generate crud accelerator.

In this PR, we are passing the event context of generate crud when
calling create action function, this context is then eventually added to
the event properties.

**Test cases:**
- When generate crud flow is triggered, `create_NEWACTION` event should
have two more props `isUserCreated: false` and `accelerator:
"generate-crud`
- When actions are created by any other method, these two properties
wont be there.

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new event type `GENERATE_PAGE` for enhanced analytics and
event tracking capabilities.
- **Refactor**
- Modified analytics properties generation across various services to
include context-specific information, improving the accuracy and
relevance of analytics data collected.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-02-27 11:50:20 +05:30
Shrikant Sharat Kandula
b5e9ce8718
chore: Use Lombok's FieldNameConstants instead of QueryDSL (#31269)
QueryDSL will be replaced with Lombok's `FieldNameConstants` here. Why?

1. QueryDSL with JPA on relational databases doesn't lend itself very
well to nested data structures. But with MongoDB, it works quite well.
So we've come to rely on it quite a bit. Since we intend to move towards
a more flat, relation-ed and normalized DB design once we get to
Postgres, dealing with nested data structures should be seen as
temporary.

2. We only use QueryDSL for field name constants, and absolutely nothing
else. QueryDSL is a far more capable and powerful system, and is
overkill for this purpose. Lombok's annotation is exactly tuned for this
purpose and is more concise and easy-to-use.

3. QueryDSL query generation current doesn't work in IntelliJ, but
Lombok's does. So this will free us up from having to run a Maven build
when sometimes switching branches.

**PS**: This PR doesn't remove QueryDSL entirely. Only a part of it.
That'd become a much bigger PR and I'm already uncomfortable with the
size of this PR. Once this is merged, I'll open further PRs until we
completely remove QueryDSL.

**PPS**: QueryDSL is a powerful querying mechanism that we don't use
today. Perhaps once we're comfortable with Postgres in the future, we
will very likely revisit.
2024-02-26 16:33:07 +05:30
Shrikant Sharat Kandula
a97c41ac43
chore: Add updateFirstAndFind to Fluent repo API (#31165) 2024-02-26 15:40:00 +05:30
Shrikant Sharat Kandula
aeee1fa697
chore: Remove mongoOperations use in Application repo (#31181)
Porting `CustomApplicationRepositoryCEImpl` to use the Bridge API, where
possible, and not use `mongoOperations` at all.
2024-02-26 14:34:06 +05:30
Shrikant Sharat Kandula
a690d15990
chore: Remove leaks of UpdateResult outside of repository layer (#31166)
This is a MongoDB-specific API class that won't be available with
Postgres, and we don't use its contents much either.
2024-02-26 11:22:32 +05:30
Shrikant Sharat Kandula
5647916478
chore: Upgrade Mockito and surefire plugin (#31073)
Upgrading Mockito ahead of upgrading Spring itself.
2024-02-25 00:24:51 +05:30
Nirmal Sarswat
0dce1ee470
fix: Add missing policies field in Appsmith AI Default datasource (#31102)
## Description
Add missing fields in Appsmith AI Default datasource

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

## Testing
#### How Has This Been Tested?
- [x] Manual
- [ ] JUnit
- [ ] 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
- [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
- [ ] 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced tracking for creation and update times (`createdAt` and
`updatedAt`) for Actions and Datasources to enhance data management and
auditing capabilities.
- Enhanced the default Appsmith AI Datasources with necessary fields and
default permission groups to ensure seamless operation and access
control.
- **Refactor**
- Consolidated and refined migration scripts to add missing fields and
configurations to Appsmith AI Datasources, improving their functionality
and reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-16 21:07:13 +05:30
Shrikant Sharat Kandula
712a28e059
fix: Signup error redirect to wrong path (#31179)
On signup failure, we need to redirect the client to same signup page
they were on, for the error message to show up. So instead of
redirecting to the homepage, we get the path from the incoming request
and use that.
2024-02-16 14:19:30 +05:30
Shrikant Sharat Kandula
91fea4fbe0
chore: use repo method to update workspace (#30998)
Reducing our use of `mongoTemplate` and kind-of undoing
https://github.com/appsmithorg/appsmith/pull/22549.
2024-02-16 10:08:21 +05:30
Shrikant Sharat Kandula
1cb53c4e8e
chore: Introducing the Bridge API (#31147)
The Bridge API is an alternative to building `Criteria` objects for
running operations on the database.

**Why do we need/want this?** The Bridge API will have the same
interface in Appsmith MongoDB, and in Appsmith Postgres. This means when
we write a function that uses the Bridge API to run a query, we enjoy
the guarantee that the function will work with both MongoDB and
Postgres.

**Why is that important?** As new features are being developed, and
changes made, the Postgres branch is having to play catch-up in porting
the queries to Postgres. But with this, that won't be necessary.
Besides, the diff between MongoDB and Postgres versions of Appsmith
would be significantly smaller with this.

**What conditions will be supported?** The Bridge API is intentionally
non-exhaustive. It is intended to replace the most commonly used
criteria definitions. For the rest, falling back to the way we used to
build Criteria is just fine. We're only changing the ladder used to get
to the ceiling. The hammers to break the ceiling to go further, is still
there.

**Can I start using it?** Yes please. I'm only adding one condition
here, but I have changes for ~4 more (`in`, `isNull`, etc.) that I'll be
pushing as PRs next up. I'm also only using it in one place in this PR.
I'll start moving more direct uses of Criteria API to the Bridge API in
future PRs.

**Why does Bridge have `.equal()` instead of `.where().is()`?** Two
reasons. One, an API like `.equal` is easier to implement, and since the
Bridge API is code that we will have to maintain, I voted for
simplicity. Two, once we move to Postgres, we'll be using the
`CriteriaBuilder` API, which uses the `.equal()` style, so might as well
get used it. 🙂
2024-02-16 05:46:04 +05:30
Manish Kumar
2a1ba8083c
chore: aforce issue for multipart file upload (#30376)
## Description
> small change to fix the issue of file uploads

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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Increased the maximum in-memory size for multipart requests to 150MB,
enhancing file upload capabilities.
- Added the ability to control the max size of multipart files in
request objects.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-15 21:25:40 +07:00
Nidhi
4dd9d77c8b
chore: Refactored importables to be artifact agnostic (#31123) 2024-02-15 19:42:35 +05:30
Shrikant Sharat Kandula
7d55eaabfb
chore: Remove mongoOperations in updateById method (#31141) 2024-02-15 19:25:21 +05:30
Shrikant Sharat Kandula
565dab4a62
fix: Request referer shouldn't influence redirect URL (#31155)
The form signup API responds in a failure state, with a redirection URL.
That URL blindly uses the `Referer` header as passed-in. This shows up a
security issue in a few places, although it's not very exploitable.


![shot-2024-02-15-11-13-01](https://github.com/appsmithorg/appsmith/assets/120119/9c4ea8b4-d028-4cbd-a348-f2483fad0f49)

Nonetheless, we don't need the host to show up in the redirection URL at
all. The signup success API is already using a redirect URL without
host, for example.


![shot-2024-02-15-11-11-41](https://github.com/appsmithorg/appsmith/assets/120119/5eb62c42-cf09-4c1f-8269-775f26af2dce)

With the changes in this PR, the failure response also uses a host-less
redirect.


![shot-2024-02-15-11-14-04](https://github.com/appsmithorg/appsmith/assets/120119/d0640ea2-f934-4f57-ade4-189964d6d11a)
2024-02-15 19:24:34 +05:30
Shrikant Sharat Kandula
1278287609
chore: Remove mongoOperations in two more methods (#31136)
It's doing exactly the same thing, but with a lot of the code
duplicated.
2024-02-15 13:37:25 +05:30
Shrikant Sharat Kandula
5c879230fc
chore: Fluent API for update methods (#31104) 2024-02-15 10:25:24 +05:30
Manish Kumar
0d77289e9c
chore: added split for permission provider (#31111) 2024-02-14 14:43:14 +05:30
Nilesh Sarupriya
c267965090
chore: refactor curl import API to support context type (#30934)
## Description

Support curl imports for different contexts. 

### Server changes

Previous API: 

`/api/v1/import?type=CURL&pageId={pageId}&name=Api2&workspaceId={workspaceId}`

New API: 
With context type, it will create for the specific context.

`/api/v1/import?type=CURL&contextId={contextId}&name=Api1&workspaceId={workspaceId}&contextType={contextType}`

Without context type, it will create for the page.

`/api/v1/import?type=CURL&contextId={contextId}&name=Api1&workspaceId={workspaceId}`

### Client changes
- Integrate api changes for curl import. Updated request params type and
interfaces for the saga functions
- Updated the form value types for the curl import editor



#### PR fixes following issue(s)
Fixes [[Task]: Curl Import isn't
working.](https://github.com/appsmithorg/appsmith/issues/30933)

#### Media
> N/A

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

## Testing
>
#### How Has This Been Tested?
- [x] Manual (using postman)
- [x] JUnit (existing test cases should work)

#### Test Plan
> N/A

#### Issues raised during DP testing
> None

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced API import functionality with a new context-aware mechanism,
allowing for more flexible integration within different parts of the
application.
- Updated various components and services to support the new contextId
and contextType parameters for improved data handling and redirection
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayushpahwa96@gmail.com>
2024-02-14 12:18:30 +05:30
Manish Kumar
a5f3ff9ba0
chore: deleted import and export Application file (#31084) 2024-02-13 15:22:27 +05:30
Shrikant Sharat Kandula
99f919303d
chore: Don't expect .save() to return given object (#31049)
The `.save()` method currently returns the given object as is. But with
Hibernate, it returns the corresponding object from the persistence
store, if any, which _may_ be different. This is causing some very hard
to debug and subtle bugs.

This fix here, to just ignore the result of `.save()` is not a permanent
fix, it's just a workaround that works well in both worlds, MongoDB and
Hibernate. Once we move though, we may need to revisit.



![shot-2024-02-12-07-14-37](https://github.com/appsmithorg/appsmith/assets/120119/095d32fc-5009-4203-b906-df3d34a40818)
2024-02-13 09:47:05 +05:30
Sumit Kumar
334da091f6
chore: link Micrometer traces and metrics with NewRelic (#30957) 2024-02-13 00:21:42 +05:30
Shrikant Sharat Kandula
cdc5a358bb
chore: Remove InsertManyResult and BulkWriteResult (#31037)
These are MongoDB specific data structures and we don't actually use the
data we get in them. This PR removes their references entirely.
2024-02-12 13:33:44 +05:30
Shrikant Sharat Kandula
632c8a7b69
chore: use common function for building query (#31018)
The query execution methods, `queryAllExecute`, `queryOneExecute` etc.,
aren't using the same function to build the `Query` object. This PR
fixes it by using the common function.

But the common function has a problem. Check this out, this is the
current implementation:

```java
Query query = new Query();
criterias.stream().forEach(criteria -> query.addCriteria(criteria));
if (aclPermission == null) {
    query.addCriteria(new Criteria().andOperator(notDeleted()));
} else {
    query.addCriteria(new Criteria().andOperator(notDeleted(), userAcl(permissionGroups, aclPermission)));
}

if (!isEmpty(projectionFieldNames)) {
    projectionFieldNames.stream().forEach(fieldName -> query.fields().include(fieldName));
}

return query;
```

Here, we use `addCriteria` to add each of the criteria items given to
us, into the `query`. After that, we use `.andOperator` to add the
not-deleted and permission checks.

Looks good on the surface. Let's take an example. If the given criteria
list has `fieldName = "abc"` as the condition, this will end up in the
final query as (pseudo-code representation):

```javascript
{
	fieldName: "abc",
	$and: {
		$and: {
			deleted: false or missing,
			deletedAt: null
		},
		policies: {
			$elemMatch: permission check here,
		}
	}
}
```

Perfectly working query. Now, what if the incoming criteria list is a
little more complex, and has an `or` condition in it. This is what we
end up with:

```javascript
{
	$or: {
		field1: "val",
		field2: "val"
	},
	$and: {
		$and: {
			deleted: false or missing,
			deletedAt: null
		},
		policies: {
			$elemMatch: permission check here,
		}
	}
}
```

We end up with a `$or` and `$and` next to each other. This doesn't make
sense to MongoDB.

The way the query is built in the `queryAllExecute` method previously,
actually doesn't fall into this. That's the version we're changing the
common method into now. This is what it looks like:

```java
final ArrayList<Criteria> criteriaList = new ArrayList<>(criterias);
criteriaList.add(notDeleted());

final Criteria permissionCriteria = userAcl(permissionGroups, aclPermission);
if (permissionCriteria != null) {
    criteriaList.add(permissionCriteria);
}

final Query query = new Query(new Criteria().andOperator(criteriaList.toArray(new Criteria[0])));

if (!isEmpty(projectionFieldNames)) {
    query.fields().include(projectionFieldNames.toArray(new String[0]));
}

return query;
```

With this, the resulting query looks something like this:

```javascript
{
	$and: {
		$or: {
			field1: "val",
			field2: "val"
		},
		$and: {
			deleted: false or missing,
			deletedAt: null
		},
		policies: {
			$elemMatch: permission check here,
		}
	}
}
```

This isn't new code. This is how we've been building the query for
`queryAll` today. By moving this to the common method, we have this
resilient query building for `queryOne` and `queryFirst` as well.
2024-02-12 12:58:42 +05:30
Nidhi
2147b9fcea
chore: Moved datasource exportable to appropriate package (#31046) 2024-02-12 11:52:23 +05:30
Nidhi
010699e379
chore: CE companion to pkg export (#31039) 2024-02-12 11:29:59 +05:30
Nidhi
54091e255c
chore: Split changes for interface difference in generalizing exportable flow (#31017) 2024-02-09 16:18:49 +05:30
Shrikant Sharat Kandula
88c95b434b
chore: remove BaseDomain on WorkspacePlugin (take 2) (#31009)
Same as https://github.com/appsmithorg/appsmith/pull/30958, now with a
brand new migration to clean up!

The migration take 1.2 seconds on release and 0.1 seconds on
production-representative databases.
2024-02-09 13:03:07 +05:30
Manish Kumar
d1d13807e1
chore: Start Consumption for import and export (#30819) 2024-02-09 12:58:17 +05:30
Shrikant Sharat Kandula
ca5631e02c
test: Fix user used for test (#31012)
The test has a `@WithUserDetails(value = "admin@solutiontest.com")`
annotation, which means that's the logged-in user for the test's scope.
But the setup method calls `inviteUserToWorkspaceWithViewAccess`, which
tries to invite `usertest@usertest.com` and `admin@solutiontest.com` to
a just-created workspace. But since the workspace was just created by
`admin@solutiontest.com`, that user is already an admin on the workpace.
So we get this error:

```
com.appsmith.server.exceptions.AppsmithException: The user admin@solutiontest.com has already been added to the workspace with role Administrator - Source Workspace. To change the role, please navigate to `Manage users` page.
```

The test method's doesn't even get called. This error is from the
`setup` phase.

This PR fixes it by using `api_user` for the session instead of
`admin@solutiontest.com`.
2024-02-09 11:51:54 +05:30
Shrikant Sharat Kandula
8e62506524
chore: Fluent API for strict permission query (#31001)
Extending the fluent repository API to
`queryAllWithStrictPermissionGroups`.
2024-02-09 05:00:51 +05:30
Shrikant Sharat Kandula
45caf60b29 Revert "chore: remove BaseDomain on WorkspacePlugin (#30958)"
This reverts commit df6dce26e9.
2024-02-08 17:50:31 +05:30
Nidhi
e622836794
fix: Split changes for git support in apps with mi bugs (#30997) 2024-02-08 14:07:51 +05:30
sneha122
a13d3d82be
feat: expires in field added in oauth2 api datasource (#30866)
## Description

This PR adds `expires_in` field for authenticated API datasource. This
field will be used for all OAuth2 datasources, with use of this field
refresh token flow can be triggered.

This fixes the problem of [Salesforce not refreshing the tokens
automatically](https://github.com/appsmithorg/appsmith/issues/30239).

More about the issue can be found in this
[thread](https://theappsmith.slack.com/archives/CNQ9Q91C0/p1702972094026239)
and
[notion](https://www.notion.so/appsmith/Salesforce-OAuth2-problem-with-refresh-token-ea4b318eebb3420f89a47d87f94ef49a)
doc.

Server unit tests have been added in this PR itself.

Client unit tests will be added as part of #30829.

**Note: If we populate expires_in field for Monday.com OAuth2 provider,
it will not work as monday does not have refresh token flow.**

#### PR fixes following issue(s)
Fixes #30830 
#### 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
>
>
>
## 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
- [ ] JUnit
- [ ] 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/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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Added the ability to specify the expiration time for OAuth2
authorization in seconds when configuring REST API datasources. This
allows users to define how long the authorization should last before
needing a refresh.

- **Enhancements**
- Improved OAuth2 token generation logic to accurately handle expiration
times, enhancing the security and reliability of connections.

- **Tests**
- Updated application forking tests to account for the new OAuth2
authorization expiration time configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-02-07 18:26:21 +05:30
Shrikant Sharat Kandula
df6dce26e9
chore: remove BaseDomain on WorkspacePlugin (#30958)
The `WorkspacePlugin` is not a top-level entity. Yet, it extends
`BaseDomain`. It gets all the fields from `BaseDomain`, but since it
doesn't have a collection of its own, nothing is ever used.

This is fine today, with the `@Document` annotation, but with Postgres,
with `@Entity` annotation, querydsl is getting confused and is creating
a `QWorkspacePlugin` class, which is producing a compile error in
`QWorkspace.plugins` field.

This PR removes this unneeded inheritance.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
	- Updated the structure of the Workspace Plugin to enhance performance.
- **Bug Fixes**
- Ensured all plugins, including previously inaccessible ones, are now
correctly retrievable.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-07 15:43:26 +05:30
Shrikant Sharat Kandula
fb520fc817
test: better size assertions in tests (#30937)
Instead of a failure showing up like this:

```
org.opentest4j.AssertionFailedError: 
expected: 2
 but was: 0
Expected :2
Actual   :0
```

We get something like this:

```
java.lang.AssertionError: 
Expected size: 2 but was: 0 in:
{}
```

Which is a better insight into the test failure.
2024-02-07 12:14:10 +05:30
Akhil Varma
078f450d81
fix: Updated auto-commit message to be <72 characters (#30938) 2024-02-07 11:23:15 +05:30
Shrikant Sharat Kandula
dbe138778a
ci: Add server failed tests as PR comment (#30888)
And, don't show duplicates. Not sure why we're seeing duplicates though.
2024-02-06 16:07:43 +05:30
Shrikant Sharat Kandula
1afd321e13
chore: Fluent API for count() (#30898)
There's three signatures for `count()`, and the query building code is
duplicated from the `query*` methods. This PR fixes both.
2024-02-06 13:01:40 +05:30
Nirmal Sarswat
479f9132bd
feat: Add knowledge retrieval in Appsmith AI (#30725)
## Description
Frontend Changes
- Remove Appsmith AI Query as a default datasource query
- Add Appsmith AI Datasource in the AI section of Datasources screen
- ~~Creation of Appsmith AI datasource to mimic the mock datasource
flow. This was necessary because we are using a trigger in the
datasource edit form and inorder for the trigger to function the
datasource needs to be created before the trigger call.~~ (We are using
the plugin trigger to upload files and hence this change is not required
anymore)
- Add a new Form control element to support multiple file uploads. The
multiple file upload control type can either upload the files to the
trigger end point (multipart-form trigger api) or save the files as
base64 string in the datasource configuration. If the files are uploaded
in the trigger, only the file metadata (name, size, mimeType and id) is
saved in the datasource configuration.
- Fix a bug in Dropdown control. This fix makes sure that the options
that are disabled as infact disabled on the UI.
- Add preview for the new Multi file picker control type.

Backend Changes
- Add a new trigger end point for datasource to support multipart form
data
- Add trigger for Appsmith AI datasource to upload files during
datasource creation/edit flow
- Associate the file ids with the datasourceId in AI Node server
- Add Knowledge retrieval implementation in text generation action for
Appsmith AI datasource
- Add form.json for Appsmith AI Datasource
- Add a fetch files trigger for populating the files in the Text
generate action.

#### 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
>
>
>
## 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
- [ ] JUnit
- [ ] 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/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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a multiple file picker control for users to select and
upload multiple files with options for file types and size limits.
- Added new AI Query functionality with enhanced file upload
capabilities, including timeout settings.
- Enhanced datasource editor to display the number of uploaded files or
a message if no files are uploaded.
- **Bug Fixes**
- Simplified the logic for showing the datasource selector by removing
specific conditions related to the Appsmith AI Plugin.
- **Refactor**
- Removed unused imports and functionalities related to Appsmith AI
across various components.
- Updated plugin handling to dynamically determine button text based on
plugin type.
- **Chores**
- Implemented backend support for file upload and association with
datasources and workspaces.
- Added new utility functions and DTOs for handling file uploads and AI
plugin interactions.
- **Documentation**
	- No visible changes to end-users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Diljit VJ <diljit@appsmith.com>
2024-02-05 17:15:45 +05:30
Nayan
4167cc288f
chore: Add all the changes as part of the auto commit (#30644)
## Description
Instead of writing only the pages during auto commit, this PR makes the
change to write all the application resources. If there's any migration
change in DSL, the following auto commit will include all the server
side changes due to change in data structures.
#### PR fixes following issue(s)
Fixes #30466

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

## Testing
>
#### How Has This Been Tested?
- [x] Manual
- [x] 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
- [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
- [ ] 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new system for tracking and managing updated resources
within applications.

- **Refactor**
- Streamlined the process of checking if specific resources have been
updated.
- Enhanced the logic related to exporting application components such as
action collections, custom JavaScript libraries, and pages.

- **Bug Fixes**
- Fixed issues with resource tracking to ensure accurate reflection of
changes.

- **Tests**
- Added test cases to verify the functionality of the new resource
management system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-05 16:58:59 +05:30
Shrikant Sharat Kandula
9e0a7c71d7
chore: Use standard spring-data query method (#30883)
This query doesn't need a custom query implementation. Switching to
standard spring-data query method, so it can translate to Postgres easy.
2024-02-05 12:17:44 +05:30
Shrikant Sharat Kandula
24ebc4aaa4
chore: Fluent API for queryOne and queryFirst (#30846) 2024-02-05 12:13:53 +05:30
Shrikant Sharat Kandula
6d0b7af54e
chore: Use Spring projection for workspace user pics (#30804)
We use Spring's native support for projections here, instead of setting
the `.fields()` ourselves. The advantage is that this way translates
directly to Postgres.

The cost is that, the field names in projection are duplicated. For
example, if `profilePhotoAssetId` is renamed or otherwise changed, we
won't see a compile error. This can be prevented with a test. The
`findPhotoAssetsByUserIds_WhenPhotoAssetIdExist_ReturnsPhotoAssetId`
test is able to catch this case perfectly well.
2024-02-02 05:46:49 +05:30
Rudraprasad Das
fe7e4e8216
fix: allowing custom username is git url validation (#30738)
## Description
Fixes the validation issue with custom usernames in Git origin URL

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

#### Media
<img width="1728" alt="image"
src="https://github.com/appsmithorg/appsmith/assets/8724051/a0f52354-a876-4066-9d2c-1226b00b82f2">

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Enhanced support for a wider range of git remote URL formats in the
Git synchronization feature.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nayan <nayan@appsmith.com>
2024-02-01 13:45:28 +05:30
Shrikant Sharat Kandula
5c4f2d28f6
chore: Fluent interface for queryAll method (#30758)
There is ~13 signatures of the `queryAll` method with parameters ranging
from 2 to 7, different combinations of the same superset. This is
extremely hard to grok and the resulting uses of `queryAll` aren't very
readable either. This PR introduces a fluent interface for this method.
If this works better for us, I'll look to move more such
over-signature-ed methods to a fluent interface.

This sprang from a frustration in trying to understand this method's
usages, to port to Postgres, and pulling my hair apart in the process.

Here's an example of the fluent API compared to current API:

![shot-2024-01-27-10-37-57@2x](https://github.com/appsmithorg/appsmith/assets/120119/ed11a4c6-a433-4e92-824c-7db00880a24a)
2024-02-01 11:19:25 +05:30
Shrikant Sharat Kandula
66d08eea77
chore: use default spring query instead of custom one (#30778) 2024-01-31 15:54:55 +05:30
Shrikant Sharat Kandula
d9835d5444
chore: Fix equals on TenantConfiguration (#30749)
Lack of checking fields in parent's class meant that the `.equals()`
method from `@Data` annotation in `TenantConfiguration` never compared
the values of fields in parent class. This meant that some part of
Hibernate's dirty-checking is getting thrown off, and changes to
TenantConfiguration aren't getting saved to database in Postgres.

Lombok even warns about this exact thing, but it's unfortunate we don't
take warnings as seriously as errors.

![shot-2024-01-30-13-11-41](https://github.com/appsmithorg/appsmith/assets/120119/fe3ba2c5-949d-47d0-ac81-8fe5a08c988c)

So instead, I added a test which would fail when this annotation is
missing in cases like this.
2024-01-31 11:33:16 +05:30
Nayan
00efa008b2
chore: Store only boolean flag to save auto deployment enabled or disabled state (#30727)
## Description
Instead of storing a list of branch names, we only need to store a
boolean flag.

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

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

## Testing
>
#### How Has This Been Tested?
- [ ] Manual
- [ ] JUnit
- [ ] 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
- [ ] 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
	- Streamlined deployment settings for improved Git integration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-30 21:32:37 +05:30
Shrikant Sharat Kandula
e473070045
chore: Slim seed data (#30671) 2024-01-30 19:19:53 +05:30
Shrikant Sharat Kandula
9cd2e74038
chore: Remove unused UserRepository.findAllByEmails method (#30645)
This repository query method is unused in both repos, except for a test
which is only asserting the behaviour of this method istelf.
2024-01-30 18:45:04 +05:30
Shrikant Sharat Kandula
1842d1495c
chore: remove unused role graph (#30641) 2024-01-30 18:44:12 +05:30
Shrikant Sharat Kandula
13971fe18b
chore: Remove deprecated fields in Policy (#30556)
This PR removes the `Policy.users` and `Policy.groups` fields, that
aren't used, and are deprecated.
2024-01-30 15:42:44 +05:30
Nidhi
cc5598f573
fix: Only consider non-public apps and workspaces when searching entities in home page (#30711) 2024-01-30 08:47:21 +05:30
Nayan
1ff704f6f6
fix: Return default collection ID in update collection API response (#30667)
## Description
Return default collection id in the response of update action collection
API

#### PR fixes following issue(s)
Fixes #
[(ZH-68)](https://app.zenhub.com/workspaces/git-pod-63b7f52c55408d0011ef1e64/issues/zh/68)

#### 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?
- [x] Manual
- [x] JUnit
- [ ] 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
- [ ] 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Improved the update logic for action collections to ensure more
reliable data handling.
- **Tests**
- Added tests for verifying the correct behavior of action collection
updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-29 22:12:13 +05:30
Aman Agarwal
cc620b3ab3
feat: removing delete multiple apps feature (#30661)
## Description
Removing the bulk delete applications feature as it not generally used
by many users and this was creating some UI conflicts rather than giving
us some valuable output.

Please follow this thread for more context :
https://theappsmith.slack.com/archives/C02Q4B2AGM8/p1706249168968689

#### PR fixes following issue(s)
Fixes #30660 
> 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
>
>
>
## 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
- [ ] JUnit
- [ ] 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/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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Streamlined the application deletion process to handle multiple
deletions more efficiently.
- **Bug Fixes**
- Removed redundant code and unused features related to the multiple
selection and deletion of applications.
- **Chores**
- Cleaned up various files by removing unused imports, constants, and
state variables.
- **Documentation**
- Adjusted code comments and documentation to reflect removal of
multiple application deletion features and related UI elements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-29 19:51:01 +05:30
Manish Kumar
0c16ce02a0
chore: refactor export (#30521)
## Description
Pr for making a common interface for exporting application, packages,
and workflows

A few interfaces and classes have been added to support the refactor as
listed below:
- `ExportableArtifact & ExportableArtifactCE` : the base interface which
should be implemented by application, packages and workflows for
exports.
- `ExportServiceCE & ExportService` : This interface is for exporting
implementation of `ExportableArtifacts`, the exported class would
implement `ArtifactExchangeJson`.
- `ContextBasedExportService` : This interface is designed to abstract
out the common methods which each ArtifactExportService implementation
should implement.
- `ApplicationExportService` : this service implements
ContextBasedExportService for export of applications

# Fixes: 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced export functionality for applications and related entities,
allowing users to export their applications to a standardized JSON
format.
- Implemented a new transactional interface for applications, enhancing
the management and manipulation of application properties during export
operations.

- **Enhancements**
- Renamed key terminologies to better reflect the broader scope of
exportable and importable artifacts, aligning with the new export
service capabilities.

- **Bug Fixes**
- Adjusted method parameters and logic to ensure consistent behavior in
exporting and importing applications and their associated artifacts.

- **Documentation**
- Updated method names and references in the codebase to match the new
terminology and functionality related to application and artifact
exports.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-29 13:23:27 +07:00
subratadeypappu
1d4cf0d2a4
chore: Add code split in clone page (#30504) 2024-01-29 10:51:29 +05:30
Nidhi
354cdb7eef
chore: Split for git with mi in apps (#30672) 2024-01-28 06:57:46 +05:30