Commit Graph

2809 Commits

Author SHA1 Message Date
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
Sumit Kumar
94ba4852b6
chore: consolidated API: return AppsmithAiPlugin's form config by default (#30601) 2024-01-26 19:16:17 +05:30
sneha122
692c2b8636
chore: added logs in update action flow (#30600)
## Description

This PR adds logs to update action flow, so that we can debug a-force
issues faster.

#### PR fixes following issue(s)
Fixes #30282
#### 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

- **Chores**
- Enhanced logging for better debugging and monitoring of action
updates.
- Optimized import statements in test files for improved code
maintainability.
	- Refactored code for improved performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-01-26 17:42:11 +05:30
Anagh Hegde
41e51c4703
feat: preserve datasource non sensitive config values while forking (#30597)
## Description
Preserve the non sensitive values like host name during forking. This
improves the user exprince when the reconnect modal is shown to enter
the credentials.

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

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

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

#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


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

- **Bug Fixes**
- Enhanced the security of datasource configurations by refining the
conditions under which sensitive fields are removed during the forking
process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-26 11:24:40 +05:30
Shrikant Sharat Kandula
fec8144034
fix: Fix unused imports in test 2024-01-25 20:12:18 +05:30
Shrikant Sharat Kandula
e9610b5ace
chore: Remove unused query variable
This snippet uses `archivedAt`, another deprecated field which needed to go away.
2024-01-24 16:47:24 +05:30
Abhijeet
80d5c2baf6
chore: Add workspaceId to the redirect url for auth datasource flow (#30463)
## Description
> Add a TL;DR when description is extra long (helps content team)
>
> Please include a summary of the changes and which issue has been
fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change
>
> Links to Notion, Figma or any other documents that might be relevant
to the PR
>
>
#### 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**
- Integrated workspace identification into authentication services for
enhanced multi-workspace support.

- **Refactor**
- Improved internal handling of workspace-specific data during
authentication processes.

- **Tests**
- Updated tests to include workspace identification checks in
authentication scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-01-24 15:16:12 +05:30
Shrikant Sharat Kandula
17546f86a1
chore: don't use CE repository directly (#30581) 2024-01-24 14:17:16 +05:30
Anagh Hegde
ab64bf29af
fix: duplicate name issue in partial import for queries and jsobjects (#30457)
## Description
When the queries and js objects are imported in the same page, the names
were not updated properly which ended up with duplicate names for
queries and jsobjects. This PR adds a fix which will append the number
in the increasing order to avoid the duplicate entries for the above
scenario.
Example - jsObject will be jsObject1

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

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

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

#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [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 support partial imports, allowing
users to selectively import components into their applications.

- **Refactoring**
- Codebase refactored to improve the clarity and efficiency of the
import services.

- **Tests**
- Expanded test coverage to include new cases for partial imports and
ensure the integrity of import operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-24 13:36:19 +05:30
Shrikant Sharat Kandula
a0563b71e1
chore: Remove deprecated Action and Page classes (#30524)
These classes are deprecated and have been replaced with `NewAction` and
`NewPage`.

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

## Summary by CodeRabbit

- **Refactor**
  - Updated permissions handling to support new page and action classes.
- Replaced deprecated page and action classes with their new
counterparts in various service implementations and policy generation
methods.
  
- **Tests**
- Adjusted test cases to align with the updated permissions and entity
references.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-24 05:54:05 +05:30
Abhijeet
2aa263a145
feat: Handle invalid workspaceId for fetching applications on homepage (#30374)
## Description
PR to throw no resource found exception if the invalid workspace id is
provided for fetching the applications for homepage.

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

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

## Testing
>
#### How Has This Been Tested?
- [x] Manual
- [x] 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
- [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**
- Enhanced application management by integrating workspace-related
permissions.
  
- **Bug Fixes**
- Resolved an issue where a null `currentUser` could disrupt application
tests.
  
- **Tests**
  - Added a test to ensure proper handling of invalid workspace IDs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-23 18:01:33 +05:30
Shrikant Sharat Kandula
92993cccef
chore: Remove unused services (#30292)
I've been doing this in pieces bit by bit, not to rock the boat too much
too fast, but it's taking too long, and too much effort. Instead opting
for a rip-the-bandaid style, hopefully without the pain.
2024-01-23 05:43:16 +05:30
Shrikant Sharat Kandula
d25b94fe50
chore: Remove unneeded exposing of 9001 port (#30499)
We're already using `/supervisor` for this, and don't expect anyone to
hit the port directly.
2024-01-22 15:06:08 +05:30
Pawan Kumar
c035806edf
feat: add icon style in application settings (#30418)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new setting for users to select icon styles within the
application theme.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-19 14:51:12 +03:00
Nidhi
e4456aabac
chore: use single page id in repo layer (#30446)
avoid in clause

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

- **New Features**
- Enhanced action collection retrieval to support view mode and user
permissions.
- Improved methods for fetching unpublished actions by page ID,
considering user access rights.

- **Refactor**
  - Streamlined action collection and action retrieval processes.
  - Removed unnecessary imports to optimize codebase.

- **Bug Fixes**
- Fixed issues with fetching action collections in different view modes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-19 15:57:59 +05:30
Manish Kumar
20d6dfb591
chore: Import export application refactor (#29691)
## Description
First draft for Import export flow refactor
Steps for refactoring the application import flow to context agnostic
flow
         /**
         * Step 1: Schema Migration
         * Step 2: Validation of context Json
         * Step 3: create placeholder objects for internal stuffs
         * Step 4: set schema version and other stuffs common misc
         * Step 5: get workspace and user with right set of permission
         * Step 6: get application specific import entities
* Step 7: get allImportEntities like plugins, datasource, action and
other stuffs
* Step 8: get update page and new action with already created
references.
         */
 

fixes: https://github.com/appsmithorg/appsmith/issues/29748, #29819 ,
#29820, #29821, #29822

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

- **New Features**
- Introduced comprehensive application import capabilities, allowing
users to import and manage application artifacts easily.
  
- **Improvements**
- Enhanced artifact management with new functionalities for syncing
client and schema versions, updating artifacts, and permission handling.
  
- **Documentation**
- Added new interfaces and classes to support the import process,
ensuring clarity in the import service's operations.

- **Refactor**
- Streamlined import services by renaming and updating method signatures
for consistency and improved artifact-centric logic.
  
- **Bug Fixes**
- Addressed issues in the import logic to cater to different artifact
types, ensuring a smoother import experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-18 18:46:40 +07:00
Shrikant Sharat Kandula
81561a8c52
fix: Allow request headers up to 16KB (#30405)
This is so that large headers like JWT tokens can be accepted.

[Relevant Slack
conversation](https://theappsmith.slack.com/archives/C023V5Y0STH/p1705472948243609?thread_ts=1705395384.537429&cid=C023V5Y0STH).
2024-01-17 21:15:30 +05:30
Anagh Hegde
186d9934e8
fix: Queries do not get exported in a git connected app, by using partial export. (#30368)
## Description
The issue happens on a feature branch for a git connected application.
Works fine on master branch.
The reason is how the ids are handled for a git connected application.
We use the defaultResource and map the actual id with defaultResourceId
when sending the data to client. So for a git connected app the backend
code was using the mongo _id to filter the selected action but the
client sent the defaultResourceId in the request payload. Hence even
though the mongo query returned the correct result the filter on the
list was returning the empty list.

Used the default resource id for filtering

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

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

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

#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [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 export functionality in git-connected applications to allow
filtering by branch name.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-17 21:09:44 +05:30
Nirmal Sarswat
811a342267
feat: Appsmith AI as datasource plugin (#29794)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced Appsmith AI capabilities for enhanced data query
functionalities.
- Added a new "Appsmith AI Query" creation operation with a dedicated
icon and description.
  - Implemented a new component for AI plugin datasource management.
- Launched default configurations for the Appsmith AI feature
integration.

- **Enhancements**
- Updated the query editor to conditionally render datasource selectors
based on plugin type.

- **Bug Fixes**
- Removed the redundant `NO_DATASOURCE_FOR_QUERY` constant to streamline
the user interface.

- **Documentation**
- Added detailed constants and service implementations for Appsmith AI
plugin development.

- **Refactor**
- Improved code structure to accommodate AI features and data source
checks across components.

- **Style**
- Integrated new styles for AI-related components and controls within
the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: arunvjn <arunvjn10@gmail.com>
Co-authored-by: Diljit <diljit@appsmith.com>
2024-01-16 20:19:08 +05:30
Nayan
7b977abe4e
feat: Added model fields for auto deployment configuration (#30297)
## Description
Adds the model fields for auto deployment configuration. 

#### PR fixes following issue(s)
Partially Fixes #30068
2024-01-16 19:21:14 +06:00
Nidhi
4d9264444e
fix: Split changes to allow access to all entities when refactoring something (#30344) 2024-01-16 18:19:58 +05:30
Aman Agarwal
64f8a7d31e
fix: removed ab_mock_mongo_schema_enabled, ab_gsheet_schema_enabled flag code (#30113)
## Description
Removed the code for `ab_mock_mongo_schema_enabled`,
`ab_gsheet_schema_enabled` feature flags as they both have been rolled
out to 100% of the users on Nov 20, 2023

#### PR fixes following issue(s)
Fixes #28971 
> 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**
- Streamlined the process for generating CRUD pages from various data
sources.
- Enhanced the test suite for better coverage of data source
functionalities.

- **Bug Fixes**
- Fixed issues with the CRUD generation logic and improved the
reliability of deployment mode verification.

- **Refactor**
- Removed deprecated feature flags related to data source schema
previews.
  - Simplified the logic for determining if a plugin can preview data.

- **Chores**
- Updated Cypress tests to align with the latest CRUD generation methods
and removed unnecessary feature flag setups.
  - Cleaned up test code for better maintainability and readability.

- **Documentation**
  - No visible documentation changes for end-users.

- **Style**
  - No visible style changes for end-users.

- **Tests**
- Refined end-to-end tests to reflect changes in feature flag
management.

- **Revert**
  - No reverts in this release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-16 14:00:51 +05:30
Nidhi
6470a9456b
chore: Allow executable repo optionals to be nullable (#30298) 2024-01-15 12:12:46 +05:30
Abhijeet
efc303e760
chore: Update the build process to refer the Appsmith version from the info.json in all build artifacts (#29903)
Fixes #29623

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2024-01-12 19:44:58 +05:30
Nilesh Sarupriya
7fcbb44d7d
chore: refactor executeActions and create plugin trigger which supports queries w/ and w/o datasources (#30001)
## Description
> Refactor code changes.
> 1. refactor `executeActions` so that Appsmith headers can be
transiently added to actionConfiguration, which is used as a parameter
in `executeParameterizedWithMetrics`. This would render the Appsmith
headers usable in the PluginExecutor.
> 2. Introduce a new plugin API `POST /plugins/<plugin_id>/trigger` to
replace the `POST /datasource/<datasource_id>/trigger`. This is done to
decouple the trigger API from `datasource_id` which can then be used for
fetching the dynamic data for queries (w/ or w/o datasources).

#### PR fixes following issue(s)
Fixes [[Task]: Create basic workflow plugin
structure](https://github.com/appsmithorg/appsmith/issues/30120)
Fixes [[Task]: Trigger API to populate workflow names
dynamically.](https://github.com/appsmithorg/appsmith/issues/30134)

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

## Testing
>
#### How Has This Been Tested?
- [x] JUnit - Existing test cases should pass.

## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [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**
- Introduced a new `INTERNAL` plugin type for enhanced integration
capabilities.
- Added trigger functionality for plugins, enabling dynamic data
fetching for query forms.

- **Enhancements**
- Improved the plugin execution flow with additional parameters to
better handle action and datasource triggers.

- **Bug Fixes**
- Standardized request header naming across the application for
consistency and to prevent potential conflicts.

- **Documentation**
- Added new error types and codes for better error handling and user
feedback.

- **Refactor**
- Updated method signatures to include HTTP headers for more robust
action execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-01-12 19:05:41 +05:30
Rajat Agrawal
891d766030
chore: Add indexes to Application/Workspace/DatasourceStorage domains for pe… (#30190)
Fixes #30191
2024-01-12 13:22:57 +05:30
Sumit Kumar
2c00b1b104
chore: consolidated API: add NewRelic OTLP trace (#30241) 2024-01-11 18:23:27 +05:30
Trisha Anand
d60b0b99dc
fix: Don't allow createApplication with any id set (#30167)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Ensured creating an application within a workspace does not allow
specifying an application ID, preventing potential conflicts.
- Added test coverage for application creation to validate the new
behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-11 12:37:17 +05:30
Nayan
4ac06937f9
fix: Created at field in action is set again during import (#30177)
## Description
Skips `createdAt` field of unpublished action from being reset when
application is imported.

#### PR fixes following issue(s)
Fixes #30178
2024-01-11 10:52:55 +06:00
Nidhi
bbead24cd3
fix: Use user executable names for exported actions and js objects (#30213) 2024-01-10 19:17:03 +05:30
Nidhi
861c6e0fa5
chore: Added changes for splitting git related files for mi (#30202) 2024-01-10 17:57:54 +05:30
subratadeypappu
d12b8ff820
chore: Add code split for disallowing forking (#30187)
> Pull Request Template
>
> Use this template to quickly create a well written pull request.
Delete all quotes before creating the pull request.
>
## Description

Required for https://github.com/appsmithorg/appsmith-ee/pull/3259

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

- **Refactor**
- Improved the application update process for enhanced performance and
reliability.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-10 16:00:02 +05:30
Sumit Kumar
c68b1cb27e
fix: consolidated API: fix Mockito error (#30182) 2024-01-10 15:44:15 +05:30
subratadeypappu
7c06cb2a50
chore: Add code split for deleting module instances on app or page de… (#30145) 2024-01-09 13:57:29 +05:30
Shrikant Sharat Kandula
85a31fa911
chore: Fix spotless error 2024-01-09 13:28:41 +05:30
Shrikant Sharat Kandula
4b5292a20f
chore: Remove deleted field on domain classes (#29900)
Use `deletedAt` only hereon.

We're not changing the `notDeleted()` query function, we still check for
boolean deleted there, for two reasons.

1. There may be objects that have `deleted: true`, but no `deletedAt`.
Safer to just include that in the query, than to migrate now.
2. A lot of indexes are built taking both these fields into
consideration. We don't know how the query without the boolean field
would perform with such indexes. Recreating indexes now, is also a
time-consuming migration.

Depends on #29924.
2024-01-09 12:36:38 +05:30
subratadeypappu
68b774c27e
chore: add code split for refactoring in module context (#30097) 2024-01-09 10:33:12 +05:30
Rajat Agrawal
b32b669daf
chore: Add migration for adding indexes to actionCollection collection (#30087)
Fixes #30088

This PR adds an index to actionCollection collection on
unpublished.defaultResources.pageId keypath.

This is the most used keypath in the mongo db queries that can use an
index.

Relevant slack thread here.

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

- **Refactor**
- Improved database query performance by adding an index to enhance the
search efficiency on collections.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-09 09:54:16 +05:30
Sumit Kumar
5d5bbb5add
chore: consolidatedApi: split endpoint to view and edit mode (#30094)
## Description
- Split consolidated API endpoint into two endpoints: view (`/view`) and
edit mode (`/edit`)
- Carry over changes that were merged directly to Vamsi's dev branch: 
  -  #29985 
  - #30044

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

#### 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 TCs are blocked due to TBP failure on EE. They will be picked up
next via another PR. Letting this PR go in would allow Vamsi to test the
FE changes while I work on the test cases. Tracking it
[here](https://github.com/appsmithorg/appsmith/issues/29988).

#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [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 separate data loading methods for edit and view modes to
enhance user experience.

- **Enhancements**
- Improved clarity in the consolidated API response structure for better
understanding of the data presented.

- **Security Updates**
- Adjusted security settings to allow access to a new view-only API
endpoint.

- **Bug Fixes**
  - Implemented error handling improvements in data migration processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-08 17:44:43 +05:30
Nayan
88cc05ac93
chore: Check new git permissions for respective git operations (#29981)
## Description
This PR uses the new Git permissions for Connect to Git, disconnect from
Git, Protect branch and manage auto commit settings.

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

#### 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
#### 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**
- Expanded Git-related permissions, including the ability to connect to
Git, manage protected branches, default branch, and auto-commit
settings.

- **Improvements**
- Enhanced Git permission checks for more granular access control within
the app.

- **Refactor**
- Updated components to utilize new Git permission hooks for better
permission management.
- Refined Git service logic to accommodate additional permission
parameter.

- **Tests**
- Adjusted test cases to align with the updated permission handling at
the application level.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: brayn003 <rudra@appsmith.com>
2024-01-05 10:27:56 +05:30
Shrikant Sharat Kandula
9818bfad37
chore: Use a single notDeleted method (#29950)
This was duplicated four times, and one of them was only checking for
the boolean field. :(
2024-01-05 05:50:46 +05:30
Nayan
bc6ad40482
chore: Push after auto commit (#29932)
## Description
This PR pushes the commit added by the auto commit. 

#### PR fixes following issue(s)
Fixes #29810
2024-01-04 11:00:10 +06:00
Nayan
e3e7623cae
chore: Fixed flaky test in partial export service (#30000)
## Description
Fixes flaky tests in partial export service.

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

- **Tests**
- Enhanced existing tests for partial export functionality to ensure
robustness and reliability.
	- Updated test assertions for better clarity and maintainability.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-03 19:23:56 +05:30
Sumit Kumar
db69149206
fix: fix error response returned from un-authorized page access (#29985) 2024-01-03 09:08:58 +05:30
Nayan
16ddb50ff5
chore: Send analytics event after branch protection (#29944)
## Description
Sends analytics events when branches are protected or un-protected.

#### PR fixes following issue(s)
Fixes #29410
2024-01-03 06:42:24 +06:00
Sumit Kumar
736c619c3d
fix: ublock TBP workflow on EE (#29972) 2024-01-02 12:35:55 +05:30
Aman Agarwal
fdf25bea50
fix: table version changed for crud (#29457) 2023-12-29 17:49:20 +05:30
Sumit Kumar
c214222cee
chore: First page load time optimization: Introduce server side changes for consolidated API (#29875) 2023-12-29 14:54:38 +05:30