Commit Graph

2941 Commits

Author SHA1 Message Date
Nilesh Sarupriya
d99789c401
chore: set datasourceId in executeActionDTO during execution (#37626)
## Description
> Set the correct datasourceId to executeActionDTO when an action is
being executed.

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

## 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/11948824843>
> Commit: 458b5c0d90fa138c57ed7f1dd491d985bfe0b5df
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11948824843&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 21 Nov 2024 08:22:41 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Enhanced functionality to set the correct `datasourceId` based on the
action's context, improving action execution accuracy.

- **Refactor**
	- Improved code formatting for clarity without altering existing logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-11-21 02:25:02 -06:00
Trisha Anand
a5013ebd64
fix: Instance admin not updating when email added via env variable (#37568)
Using feature flagged function to evict cache to ensure correct cache
line gets evicted depending on the flag

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


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

/test all

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11914552417>
> Commit: d4aed1f340e907c588f156d83c32e67c1ab4da18
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11914552417&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> Spec: 
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/FormLogin/EnableFormLogin_spec.js
> <li>cypress/e2e/Regression/ClientSide/Github/EnableGithub_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
> <hr>Tue, 19 Nov 2024 15:04:20 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced migration functionalities for database schema updates and
permission management.
- Added methods for managing SSL settings for MSSQL datasources and
updating Oracle plugin configurations.
  - Improved query performance with the creation of new indexes.

- **Bug Fixes**
- Updated permission management for super users and system themes,
ensuring proper access.

- **Chores**
  - Minor formatting adjustments and import updates for code clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-20 13:20:06 +05:30
Shrikant Sharat Kandula
ac4c714932
chore: Require form data for login endpoint (#37402)
The Login API endpoint isn't checking for the request `Content-Type`,
and is attempting to parse the payload as form data (?) irrespective of
the incoming content type. So, if we attempt to make a JSON login
attempt, like:

```
http -v :8080/api/v1/login username=a@b.com password=dummy
```

<details>
<summary>We see the following lengthy useless error on the
server:</summary>
<pre>
[2024-11-15 07:22:12,040] [nioEventLoopGroup-3-8] requestId= userEmail=
traceId= spanId= - Can't find user
[2024-11-15 07:22:12,042] [boundedElastic-1] requestId= userEmail=
traceId= spanId= - In the login failure handler. Cause: Unable to find
username:

org.springframework.security.core.userdetails.UsernameNotFoundException:
Unable to find username:
at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:36)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.MonoLift] :
	reactor.core.publisher.Mono.error(Mono.java:299)

com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:37)
Error has been observed at the following site(s):
*__________________________________Mono.error ⇢ at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:37)
*__________________________Mono.switchIfEmpty ⇢ at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:37)
|_ Mono.onErrorMap ⇢ at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:38)
|_ Mono.map ⇢ at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:43)
|_ Mono.doOnNext ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:105)
|_ Mono.publishOn ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:106)
|_ Mono.filter ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:107)
|_ Mono.switchIfEmpty ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:108)
|_ Mono.flatMap ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:109)
|_ Mono.flatMap ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:110)
|_ Mono.doOnNext ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:111)
|_ Mono.map ⇢ at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:112)
|_ Mono.doOnSuccess ⇢ at
org.springframework.security.authentication.ObservationReactiveAuthenticationManager.lambda$authenticate$3(ObservationReactiveAuthenticationManager.java:58)
|_ Mono.doOnCancel ⇢ at
org.springframework.security.authentication.ObservationReactiveAuthenticationManager.lambda$authenticate$3(ObservationReactiveAuthenticationManager.java:61)
|_ Mono.doOnError ⇢ at
org.springframework.security.authentication.ObservationReactiveAuthenticationManager.lambda$authenticate$3(ObservationReactiveAuthenticationManager.java:61)
*__FluxOnErrorResume$ResumeSubscriber.onError ⇢ at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onError(MDCConfig.java:64)
*________________________Mono.deferContextual ⇢ at
org.springframework.security.authentication.ObservationReactiveAuthenticationManager.authenticate(ObservationReactiveAuthenticationManager.java:54)
*________________________________Mono.flatMap ⇢ at
org.springframework.security.web.server.authentication.AuthenticationWebFilter.authenticate(AuthenticationWebFilter.java:122)
|_ Mono.switchIfEmpty ⇢ at
org.springframework.security.web.server.authentication.AuthenticationWebFilter.authenticate(AuthenticationWebFilter.java:123)
|_ Mono.flatMap ⇢ at
org.springframework.security.web.server.authentication.AuthenticationWebFilter.authenticate(AuthenticationWebFilter.java:125)
|_ Mono.doOnError ⇢ at
org.springframework.security.web.server.authentication.AuthenticationWebFilter.authenticate(AuthenticationWebFilter.java:127)
*________________________________Mono.flatMap ⇢ at
org.springframework.security.web.server.authentication.AuthenticationWebFilter.filter(AuthenticationWebFilter.java:115)
Original Stack Trace:
at
com.appsmith.server.authentication.handlers.ce.CustomFormLoginServiceCEImpl.findByUsername(CustomFormLoginServiceCEImpl.java:36)
at
org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager.retrieveUser(UserDetailsRepositoryReactiveAuthenticationManager.java:45)
at
org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager.authenticate(AbstractUserDetailsReactiveAuthenticationManager.java:104)
at
org.springframework.security.authentication.ObservationReactiveAuthenticationManager.lambda$authenticate$3(ObservationReactiveAuthenticationManager.java:58)
at
reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:47)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2241)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
		at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245)
at
reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1865)
at
reactor.core.publisher.MonoCacheTime.subscribeOrReturn(MonoCacheTime.java:151)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:63)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:118)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:118)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxFlatMap$FlatMapMain.tryEmit(FluxFlatMap.java:547)
at
reactor.core.publisher.FluxFlatMap$FlatMapInner.onNext(FluxFlatMap.java:988)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:968)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
		at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:335)
at
reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:294)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.request(FluxPeekFuseable.java:144)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:373)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onSubscribe(FluxPeekFuseable.java:178)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201)
		at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2097)
at
reactor.core.publisher.FluxDefaultIfEmpty$DefaultIfEmptySubscriber.onComplete(FluxDefaultIfEmpty.java:134)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onComplete(FluxHandleFuseable.java:239)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1866)
at
reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.signalCached(MonoCacheTime.java:337)
at
reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onNext(MonoCacheTime.java:354)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onSubscribe(MonoCacheTime.java:293)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
		at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoCacheTime.subscribeOrReturn(MonoCacheTime.java:143)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:63)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:265)
at
reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:82)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:189)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onComplete(FluxFilterFuseable.java:171)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onComplete(FluxPeekFuseable.java:277)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2573)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.request(FluxPeekFuseable.java:144)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.request(FluxFilterFuseable.java:191)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2241)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onSubscribe(FluxFilterFuseable.java:87)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onSubscribe(FluxPeekFuseable.java:178)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
		at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:265)
at
reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:82)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:155)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:118)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.request(FluxFilterFuseable.java:191)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
at
reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2241)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onSubscribe(FluxFilterFuseable.java:87)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
		at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245)
at
reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2097)
at
reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:118)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onComplete(MDCConfig.java:69)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147)
at
reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:424)
at
reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:291)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.Operators$BaseFluxToMonoOperator.request(Operators.java:2067)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.MonoFlatMap$FlatMapInner.onSubscribe(MonoFlatMap.java:291)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at
reactor.core.publisher.Operators$BaseFluxToMonoOperator.onSubscribe(Operators.java:2051)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201)
		at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxFilterWhen$FluxFilterWhenSubscriber.drain(FluxFilterWhen.java:302)
at
reactor.core.publisher.FluxFilterWhen$FluxFilterWhenSubscriber.onNext(FluxFilterWhen.java:140)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onNext(MDCConfig.java:59)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
at
reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:335)
at
reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:294)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:152)
at
reactor.core.publisher.FluxFilterWhen$FluxFilterWhenSubscriber.onSubscribe(FluxFilterWhen.java:200)
at
com.appsmith.server.configurations.MDCConfig$MdcContextLifter.onSubscribe(MDCConfig.java:53)
at
reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:122)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201)
		at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:265)
at
reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51)
		at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at
reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:265)
at
reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:55)
at
reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)
at
reactor.netty.http.server.HttpServer$HttpServerHandle.onStateChange(HttpServer.java:1176)
at
reactor.netty.ReactorNetty$CompositeConnectionObserver.onStateChange(ReactorNetty.java:715)
at
reactor.netty.transport.ServerTransport$ChildObserver.onStateChange(ServerTransport.java:481)
at
reactor.netty.http.server.HttpServerOperations.handleDefaultHttpRequest(HttpServerOperations.java:829)
at
reactor.netty.http.server.HttpServerOperations.onInboundNext(HttpServerOperations.java:774)
at
reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:115)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at
reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:262)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at
io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
at
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:455)
at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.base/java.lang.Thread.run(Thread.java:833)
</pre>
</details>

In this PR, we're changing the matcher for the login endpoint to check
for the `Content-Type` explicitly. With this, the server doesn't log any
error, and responds with a `401 Unauthorized`.


## Automation

/test sanity authentication

### 🔍 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/11853152657>
> Commit: 3a4620da8af82b727e2fd91756318c5aa3cf9910
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11853152657&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Authentication`
> Spec:
> <hr>Fri, 15 Nov 2024 09:25:59 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced authentication mechanism for the login process, improving
request validation.
  
- **Bug Fixes**
- Refined matching logic for authentication requests to ensure better
security compliance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-20 10:38:08 +05:30
sneha122
7612e4f14d
chore: perf optimisation for js action creation phase 1 (#37391)
## Description

[During analysis of action creation flow
metrics](https://github.com/appsmithorg/appsmith/issues/37151#issuecomment-2468354426),
we observed that RefactoringService.isNameAllowed is taking 80-90% of
the total JS object action time. This PR optimises this part in a way
that for any jsobject action, instead of fetching all actions from DB
and comparing it
to see if current action name is allowed, we simply do that check in
memory where for current action collection, if any action names are
being duplicated, we throw the error.

We could make this change easily because recently we merged a
[PR](https://github.com/appsmithorg/appsmith/pull/36958) which removes
the actions with duplicate name from client payload whenever Js object
update API is called, with this change, we can guarantee that for any JS
object update call, all actions inside it will always have unique names.
This PR makes the similar check on backend where if any action has
duplicate name within collection, we throw an error and don't store that
action in the DB.

We may need to consider following test case in both before and after
implementation of this approach. This can be covered during PR testing:
What happens if the client sends multiple requests to add a new function
in an existing collection. That is, as a result of the debounce logic,
if the server receives 2 consecutive requests with a populated
collection but without actionId associated to either request.

Relevant thread:
https://theappsmith.slack.com/archives/C040LHZN03V/p1731571364933089

Fixes #37365 
_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.JS"

### 🔍 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/11911295324>
> Commit: d5c75edd301e75b2432b642f366bc80c6fea6b89
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11911295324&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Tue, 19 Nov 2024 11:14:16 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced validation to prevent the creation of actions with duplicate
names in action collections.
- Simplified handling of JavaScript actions, allowing them to bypass
certain validation checks.

- **Bug Fixes**
- Improved error handling during action updates and collection
modifications to ensure better logging and management of failures.

- **Tests**
- Added tests to verify that duplicate action names trigger appropriate
error messages, enhancing the robustness of the action collection
feature.

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

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-11-19 17:04:38 +05:30
dependabot[bot]
7f2c4c6dd2
chore(deps): Remove commons-io from /app/server/appsmith-server (#37403)
Not needed as it comes from `appsmith-interfaces` as a transitive
dependency anyway.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commons-io:commons-io&package-manager=maven&previous-version=2.13.0&new-version=2.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/appsmithorg/appsmith/network/alerts).

</details>

/test 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/11853130017>
> Commit: b103f148fe25d1ca33aea6bbc635c392a0c1acfd
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11853130017&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 15 Nov 2024 09:24:19 UTC
<!-- end of auto-generated comment: Cypress test results  -->

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2024-11-15 15:12:54 +05:30
Manish Kumar
6883e496e5
fix: added edge case fixes for consolidated api and publishing (#37399)
## Description

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.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/11851164290>
> Commit: 3a76919cab6a000ae1d2dcac76cbaf6afee33aa7
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11851164290&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Fri, 15 Nov 2024 07:01:40 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced handling of Git operations, including improved branch
management and artifact importation.
- Expanded analytics integration for tracking changes in branch
protection settings.

- **Bug Fixes**
- Improved error handling for various Git operations and
application/page retrieval scenarios.

- **Tests**
- Added new test cases for Git-related functionalities and improved
error handling in tests.
- Enhanced test coverage for the `getConsolidatedInfoForPageLoad`
method, particularly for feature branches.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-15 15:27:09 +06:00
Shrikant Sharat Kandula
a601acf173
chore: Fix string equality checks (#37397)
As well as fixed some warnings with unused function parameters and
unneeded initialization values.

/test sanity authentication

### 🔍 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/11850858814>
> Commit: 8e14037b4e72a4549ee3910113d4608623d71de3
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11850858814&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Authentication`
> Spec:
> <hr>Fri, 15 Nov 2024 06:06:57 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Improved handling of user email verification during authentication
processes.
- Enhanced robustness of string comparisons for signup and login
methods.

- **Bug Fixes**
- Refined logic for determining email verification requirements,
ensuring accurate updates to user properties.

- **Refactor**
- Simplified method signatures and internal logic for better clarity and
maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-15 13:34:06 +05:30
Shrikant Sharat Kandula
646f29fd5d
chore: Remove unused JSON signup API handler (#37387)
This PR removes the JSON-version of signup API handler, and its unused
references. We use the other Form-body-version of this API, but not
this. So this isn't needed.

Fewer things there are, fewer there are to protect.

## Automation

/test sanity authentication

### 🔍 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/11838832000>
> Commit: f27d2c9fa7d9b154eb6649b1f9885fd54d1921b5
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11838832000&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Authentication`
> Spec:
> <hr>Thu, 14 Nov 2024 14:49:54 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Introduced new Cypress commands for enhanced API interactions and UI
validations.
	- Added a method for handling user creation through form-encoded data.

- **Bug Fixes**
	- Improved error handling and validation checks in various commands.

- **Documentation**
- Updated type definitions and submit handler functions for better
clarity and maintainability.

- **Chores**
- Removed unused user management functionalities, streamlining the
codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-15 12:39:29 +05:30
Shrikant Sharat Kandula
4f6938923d
chore: Fix role field serialization 2024-11-14 19:38:28 +05:30
Shrikant Sharat Kandula
a007bd0f05
chore: Remove unused JSON superuser signup route (#37378)
The JSON payload version of the super user signup route is not used
anywhere significant. This PR removes it.


## Automation

/test sanity authentication

### 🔍 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/11830003644>
> Commit: d051ed852ff68727805a81b5b59b54bdb50f1d2e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11830003644&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Authentication`
> Spec:
> <hr>Thu, 14 Nov 2024 03:53:00 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Updated user creation process to use URL-encoded data instead of JSON
for super user creation.
  
- **Bug Fixes**
- Removed deprecated `createSuperUser` methods from the API and server
controllers, streamlining user management.

- **Chores**
- Modified setup scripts to reflect changes in user data transmission
for creating super users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-14 14:14:42 +05:30
Shrikant Sharat Kandula
7e209d2615
chore: Remove unused UserData.role (#37381)
The `role` field is not sent by the client and is not used by the server
anywhere.

We're not removing the `role` field in analytics payloads, since changes
like that in the past have broken other analytics pipelines (where a
field value was `null` instead of `""` started to throw NPEs in some
internal workflows). We can solve that as a separate problem later.


## Automation

/test sanity authentication

### 🔍 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/11830985060>
> Commit: 986fc8986a81aa212eaed455e22181cf927002f0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11830985060&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Authentication`
> Spec:
> <hr>Thu, 14 Nov 2024 05:59:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Simplified user update requests by removing the `role` field,
streamlining user data management.
  
- **Bug Fixes**
- Adjusted analytics tracking to exclude user role information, ensuring
compliance with updated data handling practices.

- **Documentation**
- Updated test cases to reflect changes in user role management,
focusing on name and use case updates instead.

These changes enhance the user experience by simplifying user management
and improving data privacy in analytics.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-14 13:36:45 +05:30
Nidhi
8773bdd1e9
chore: Update ObservationHelper to allow sampling of spans (#37345) 2024-11-12 19:43:43 +05:30
Nidhi
d4007e12bc
chore: Switch server tracing configs to use OTEL (#37333) 2024-11-12 13:49:00 +05:30
Manish Kumar
806c710ac3
chore: Modified default behaviour of consolidated API for missing url params and extra url params (#37274)
## Description
- PR for handling Consolidated API when url params are incomplete or
have extra params.

> [!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.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/11738054403>
> Commit: f6124cbc2003258953c52d1b06ec3fd806157fbf
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11738054403&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Fri, 08 Nov 2024 08:27:02 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Improved logic for application and page retrieval based on branch
names and application modes.
- Enhanced error handling and logging for better user experience during
page loads.

- **Bug Fixes**
- Resolved issues with application ID fetching when branch names are
present.

- **Tests**
- Added new test cases to cover various scenarios related to page
loading in Git-connected and non-Git applications, ensuring robust
functionality across different contexts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-08 17:00:20 +05:30
Nilesh Sarupriya
83e75583e3
chore: use spybean for SessionUserService and remove unused method for populating the userId in the ActionExecuteDTO (#37268)
## Description
> Fix test case for EE


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

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11717655239>
> Commit: 87131cbe02fa4e13ef4a88288ffa64a27846c9fc
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11717655239&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 07 Nov 2024 06:49:49 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Tests**
- Updated the `sessionUserService` field in the test class to utilize
partial mocking, enhancing the verification of interactions during
tests.
- **Bug Fixes**
- Removed the method responsible for populating user IDs in action
execution, streamlining user identification handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-11-07 01:23:20 -06:00
Trisha Anand
08ff8a99f8
fix: Using create action permission for schema generation (#37243)
Currently, schema generation uses execute permission on the datasource
to execute open ended queries for schema generation. Limiting it to
developers who have create action permission on the said datasource (and
hence have been given rights to run any query on the said datasource)
instead of execute datasource permission which is given to everyone.

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


Fixes #`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.All"

### 🔍 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/11702166169>
> Commit: 8946b48ca8cf2ffbb1ce2350c8ecc3fc19fff739
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11702166169&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 06 Nov 2024 12:46:12 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Updated permission model for accessing datasource schema previews,
enhancing security.
  
- **Bug Fixes**
- Improved error handling for specific exceptions, providing clearer
feedback during errors.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-07 07:14:33 +05:30
sneha122
756dc5421e
fix: skipped unnecessary code for js object updates (#37125)
## Description

This PR is in continuation to
[PR](https://github.com/appsmithorg/appsmith/pull/37062) which we had
merged earlier, In previous, we skipped the redundant calls to update
page layout when updating each js object action, as we already have a
call for [updating the page layout for
actionCollection](27bdeb92b6/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java (L411))

Since we have skipped the update page layout for each js action, we no
longer need the code part after this, which basically fetches page data
from DB and updates the `errorReports` in actionDTO based on layout
`layoutOnLoadActionErrors`. This PR skips this unnecessary part too for
each js action as we do [set the errorReport for actionCollection in the
end](27bdeb92b6/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutCollectionServiceCEImpl.java (L430))

### Will this have any impact on error messages shown to user?
In order to understand this, checked out the frontend code to see if
errorReports from individual js action is getting consumed on updating
js object, looks like [it is
not](e7e3d5e002/app/client/src/sagas/JSPaneSagas.ts (L316)),
so we can safely remove this piece of code.
However this points to existing bug in the code (as errorReports is not
even getting consumed from actionCollection), which is, when there is
cyclic dependency created for js object with a widget, we don't get any
toast message. Since this is existing issue which is not caused by any
of the above PR implementations, creating separate issue for it and
tracking it [here](https://github.com/appsmithorg/appsmith/issues/37129)

Fixes #37114 
_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.JS, @tag.JS"

### 🔍 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/11698258739>
> Commit: 9fbde996545451c1a12736e0b8a9252ad4ab69bd
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11698258739&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS, @tag.JS`
> Spec:
> <hr>Wed, 06 Nov 2024 06:50:05 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Streamlined layout update process for actions, enhancing performance
and clarity.

- **Bug Fixes**
- Improved test reliability by monitoring interactions with the layout
service and handling cyclic dependencies.

- **Documentation**
- Updated comments to clarify the logic behind layout updates for JS
actions.

- **Tests**
- Enhanced test descriptions and assertions for better clarity and
validation of method interactions, including cyclic dependency
scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-11-06 12:55:11 +05:30
Trisha Anand
4e18827512
fix: Only trigger restart if current user is an instance admin. (#37227)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


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

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11681598792>
> Commit: 4fa5ebcd78bc8206f9ce3ac5641d9e0605df25f0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11681598792&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 05 Nov 2024 10:24:09 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
	- Enhanced user context processing during the restart operation.
	- Improved error handling and configuration for sending test emails.

- **Bug Fixes**
- Addressed issues related to connection testing and email sending with
detailed error messages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-05 19:19:26 +05:30
Nidhi
7ccb2ea697
chore: Added instance identifiers to observation registry filter (#37209) 2024-11-04 23:53:53 +05:30
Nilesh Sarupriya
a647668814
base changes to populate system info to executeActionDTO (#37091)
## Description
> This PR is the base change for adding any system related info to the
ExecuteActionDTO.

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

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11610567421>
> Commit: 2f5ab4b54717c021b780490320924e9b4d93522e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11610567421&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 31 Oct 2024 11:33:58 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Introduced a new interface and implementation for enhanced action
execution solutions.
- Added functionality to populate action execution data with system and
user information.

- **Bug Fixes**
	- Improved structure and maintainability of action execution logic.

- **Tests**
- Updated test class to include a mock for the new action execution
helper, ensuring future compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-10-31 06:40:42 -05:00
Nidhi
e7e3d5e002
chore: Removed manipulation for custom traceparent header (#37121) 2024-10-30 11:27:25 +05:30
Rishabh Rathod
5bca179116
chore: Add JSObject creation flow metrics (#37064)
## Description

These changes add monitoring spans to analyze the JS action creation
flow.

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

## Test the changes
| Case | Screenshot  |
|---|---|
| newRelic metrics for create flow |
![image](https://github.com/user-attachments/assets/314cc1d6-9def-49fc-afe9-4c77e84eaf72)
|


## 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/11500044480>
> Commit: ebf826f21d3714774a6aa4f443d99d9d89fe6454
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11500044480&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 24 Oct 2024 13:46:02 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Introduced new constants to enhance action validation and repository
operations.
- Added functionality for improved observability in action creation and
validation processes.
- New constants related to data sources and pages for better tracking
and logging.

- **Bug Fixes**
- Updated existing constants for better alignment with method names,
enhancing clarity and functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-28 15:12:28 +05:30
sneha122
4f3645b47e
fix: avoiding unnecessary update page layouts in js action update (#37062)
## Description

When JS object is updated we have a JS object update API call going in
(api/v1/collections/actions) This API does mainly does following things:
1. Updates all actions (Js functions) of the JS object
2. Updates action collection (Js Object)
3. Updates the page layout and on load actions

The issue was with 1st part where, every time we would update the action
(JS function), we were also calling update page layout (3rd part), which
means if we are updating 20 actions, update page layout was getting
called 20 times for each action update. This is in addition to page
layout update that happens after action collection is updated.

This PR fixes that issue and removes those redundant calls for updating
page layout with each action update.

Fixes #37046 
_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.JS, @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/11513970737>
> Commit: 95cc7e7e2f4fecc399437d0b8ce64f3fa880e3d9
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11513970737&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS, @tag.Sanity`
> Spec:
> <hr>Fri, 25 Oct 2024 08:27:48 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Enhanced action processing by introducing conditional layout updates
based on action type, specifically for JavaScript actions.

- **Bug Fixes**
- Improved efficiency by preventing unnecessary layout updates when
actions are of type JavaScript.

- **Tests**
- Added new test coverage for layout update functionality, ensuring
correct invocation of layout services during action collection updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-10-25 23:12:28 +05:30
Nilansh Bansal
88b987fd18
chore: removed unwanted metrics (#37052)
## Description
> This PR removes the extra metrics that were added which clouded up the
newrelic.
Old PR https://github.com/appsmithorg/appsmith/pull/37010 is to be
closed because extra indentation was added due to the IDE configuration.

Fixes #37051 

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/11493693400>
> Commit: 51ecb28956b5c7fa6b12e18428161614017407ba
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`
> Spec: ``
> <hr>Thu, 24 Oct 2024 06:16:14 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-10-24 06:48:26 +00:00
Rishabh Rathod
dc5fbed66b
chore: Add spans attributes for no of lines and action count (#37001)
## Description


Fixes #36995

## 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/11455841055>
> Commit: 7285f3f04c37b0a78cf7fa8b9106c0fb5175bc29
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11455841055&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 22 Oct 2024 08:35:48 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Added new constants for layout operations and data extraction to
improve functionality.
- Introduced observability tracking for various methods to enhance
monitoring and performance insights.
- **Bug Fixes**
- Enhanced error handling and logging for action updates and layout
modifications.
- **Refactor**
- Improved clarity and maintainability of methods related to action
collections and layout updates.
- **Chores**
- Updated method signatures to include new observability parameters for
better tracking.
- Added metrics for line and action counts in action collection updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-22 14:22:29 +05:30
Nilansh Bansal
4f55f52c7f
chore: added instrumentation for js object update (#36999)
## Description
> This PR adds the granular level instrumentation for the JS Object
update calls.

Fixes #36996

## 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/11444602012>
> Commit: 2e31a47133ff22c6593e4274a648013ac83e4845
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11444602012&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 21 Oct 2024 17:07:30 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Introduced new constants for action spans, application spans, layout
spans, and page spans to enhance tracking capabilities.
- Enhanced observability features in services related to page load and
executable management.

- **Bug Fixes**
	- Improved error handling for page and layout ID retrieval.

- **Refactor**
- Updated constructors and method signatures to incorporate new
observability dependencies.

These changes aim to improve tracking, error handling, and overall
performance of the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-22 11:28:10 +05:30
Nidhi
add980838a
chore: Use Lettuce client to run clear keys across Redis nodes (#36862) 2024-10-14 17:11:01 +05:30
Trisha Anand
dfd5a5a780
chore: Refactor UpdateSuperUserMigrationHelperCE for re-use in EE (#36851)
## 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/11321563633>
> Commit: 402dfb3ae87383f87afc5b343971e5334b79a695
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11321563633&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 14 Oct 2024 06:12:25 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced user creation process with automatic generation of user
management permission groups and policies.
- Introduced a new method for creating permission groups associated with
user management.

- **Bug Fixes**
	- Streamlined the assignment of user policies during user creation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-14 13:52:50 +05:30
Trisha Anand
98ca4124e3 Revert "Empty line changes to raise PR"
This reverts commit aabdcbf5a0.
2024-10-09 18:19:59 +05:30
Trisha Anand
aabdcbf5a0
Empty line changes to raise PR 2024-10-09 18:19:09 +05:30
Apeksha Bhosale
28e54fe10d
chore: span push and sentry logs (#36682)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`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.All"

### 🔍 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/11182676913>
> Commit: c93c9dc7ad26a81f08ab99061e77c9a1b85bfc9e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11182676913&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 04 Oct 2024 16:45:18 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced error tracking for user creation, login, and sign-up
processes with Sentry integration.
- Added new constants for authentication and authorization processes to
improve logging and tracing.

- **Bug Fixes**
	- Improved error handling for user sign-up failures.

- **Documentation**
- Updated tracing configuration to include additional criteria for
Appsmith-specific spans, enhancing logging for login and signup
activities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-07 11:21:55 +05:30
Nidhi
67c9ae2a27
fix: Clear all session for Spring upgrade (#36695) 2024-10-07 10:31:11 +05:30
Nilansh Bansal
25e83f6603
fix: fixed mysql plugin tests by closing the connections (#36657)
## Description
- This PR fixes the MySql plugin server unit tests which started to fail
after increasing the max connection pool size from 5 to
[20](https://github.com/appsmithorg/appsmith/pull/36631/files). The
failures were due to the `Too Many Connections` error because of the
connections not getting closed.
- In this PR, I have added the code to close connections after each test
is executed.


Fixes #36656 
## 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/11147034776>
> Commit: 3b9f5791cbd8d95f74f4a89ad204d1d4152445e0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11147034776&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 02 Oct 2024 16:20:15 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the expected default value for the maximum connection pool
size in tests to ensure accuracy.

- **Chores**
- Improved management of MySQL connection context to prevent resource
leaks in tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com>
2024-10-02 21:58:14 +05:30
Nidhi
40c4a66844
chore: Bust OAuth2 client cache for spring boot 3.3 (#36660) 2024-10-02 20:06:40 +05:30
Nilansh Bansal
00fb934f34
fix: updated the max connection pool size and datasourceDestroy method (#36631)
## Description
- This PR updates the max connection pool size for MySQL datasource from
5 to 20 as from the logs we found out that the maximum connections are
always getting used.
- This PR also updates the datasourceDestroy method for MySQL plugin to
ensure the graceful shutdown of thread takes places and ensures the
connection is closed as opposed to immediate termination of the thread
earlier which does not ensure closure of existing connection.

<img width="1100" alt="SCR-20241001-lbq-2"
src="https://github.com/user-attachments/assets/1f9e5b10-3036-41bc-94a7-8fa39056bcd6">



Fixes #34028  

## 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/11129233985>
> Commit: 04617ce742961952b863cedaff60060bd46c02b0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11129233985&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Tue, 01 Oct 2024 16:44:48 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Increased the maximum connection pool size for MySQL from 5 to 20,
allowing for more concurrent database connections.
  
- **Bug Fixes**
- Improved the termination process of the SSH tunnel thread for better
handling during datasource destruction.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-02 10:21:53 +05:30
Arpit Mohan
17d5d6eb00
chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266)
Co-authored-by: Nidhi Nair <nidhi@appsmith.com>
2024-10-01 22:12:56 +05:30
Anagh Hegde
bb11bf5fca
chore: create appsmith schema for postgres (#36591)
## Description

The current state is default schema or public schema. This schema is
accessible by default when user connects to the pg database. Hence
create `appsmith` schema for Appsmith server to use. This is to avoid
anyone accidentally modifying the appsmith data.

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/11111681323>
> Commit: 32f91e8d7ce750e4a088996aff4abe6905aa982f
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`
> Spec: ``
> <hr>Mon, 30 Sep 2024 18:08:23 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Introduced a script to initialize the PostgreSQL database schema for
Appsmith.
- Added utilities for managing PostgreSQL database connections,
including availability checks and parameter extraction.
- Enhanced scripts for managing PostgreSQL connections and
initialization.
- Improved environment configuration for PostgreSQL database
connections, including automatic password generation for local setups.
- Updated JDBC URL handling to include schema parameters for PostgreSQL
connections.
	- Added support for proxy configuration in the application setup.

- **Bug Fixes**
- Improved error handling and connection retry mechanisms for PostgreSQL
setup.

- **Documentation**
- Updated comments and logging for better clarity on database
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2024-09-30 23:42:56 +05:30
Nilansh Bansal
e6cd97318d
feat: added LRU cache for mockDB connections (#36480)
## Description
This PR implements an LRU (Least Recently Used) caching mechanism for
the Mongo mockDB connections which get auto-cleaned up every 2 hours
based on their access time.
This is done to stop the overpopulation of the open dangling connections
to the mockDB resulting in the max connection limit.
The Caching Implementation used is [Google Guave
Cache](https://github.com/google/guava/wiki/CachesExplained).
Also refer - [Working of Guava cache
](https://medium.com/@alxkm/introduction-to-caching-with-google-guava-a-simple-and-flexible-solution-2c721427e72e)

<img width="811" alt="image"
src="https://github.com/user-attachments/assets/5abb3e05-13ea-421e-aaf0-22ac441f68e6">


Fixes #36474

## 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/11066462645>
> Commit: 38fcf572b32f1b5d7544828ccf00f2b6fbaa180e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11066462645&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 27 Sep 2024 08:01:28 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Introduced a new constant for the MongoDB plugin to enhance plugin
identification.
- Added a `DatasourcePluginContext` class to encapsulate datasource
plugin context, including connection details and creation time.
- Implemented a caching mechanism for datasource contexts to optimize
connection management and reduce excessive database connections.
	- Added functionality to identify mock MongoDB datasources.

- **Bug Fixes**
- Enhanced cleanup processes for stale connections in the caching
system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-27 14:00:01 +05:30
Manish Kumar
842443c267
chore: making autocommit GA (#36347)
## Description
- Removal of release_git_autocommit_feature_enabled flag
- Removal of fallback implementation to classes which was autocommit
flag annotated
- Removal of irrelevant test cases post removal of fallback
implementation.


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.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/10994151881>
> Commit: 42b43f19e4b47d70f8c9784ae1c4c67601d79412
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10994151881&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Mon, 23 Sep 2024 12:53:01 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Enhanced file operations for resource management in Git, including
methods for saving, deleting, and reading resources.
- Streamlined handling of auto-commit functionalities, making certain
features universally accessible.

- **Bug Fixes**
- Removed outdated fallback implementations for auto-commit eligibility
and Git auto-commit helpers.

- **Refactor**
- Simplified constructors and dependencies in file operation classes,
improving maintainability.
- Eliminated feature flag dependencies from various components,
including tests, focusing on core functionality.

- **Tests**
- Removed tests related to feature flags, streamlining the testing
process for auto-commit and migration functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: brayn003 <rudra@appsmith.com>
2024-09-25 14:32:01 +05:30
Manish Kumar
44f14865d7
fix: Unit test fix (#36471)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`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.ImportExport"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/10988998437>
> Commit: f59a3687d89d4e86a28c69fa7fec79190bc34ab3
> Workflow: `PR Automation test suite`
> Tags: `@tag.ImportExport`
> Spec: ``
> <hr>Mon, 23 Sep 2024 06:43:22 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **Bug Fixes**
- Updated error message for clarity when importing an invalid JSON file,
ensuring consistent phrasing and capitalization.
- Introduced a standardized error message constant for improved
maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-23 12:40:20 +05:30
Manish Kumar
9bbf794a85
chore: removed non reactive json migration (#36413) 2024-09-20 17:42:21 +05:30
Abhijeet
0388f634a0
chore: Add empty policyMap when policies are empty or null to fix NPE (#36374)
## Description
We have quite a lot of objects in the DB for which we expect the
policies should be present but that's not the case. This is causing
issues when we migrated to using `policyMap` where we didn't create
empty map if the policies object is empty expecting all such entries are
anyway not accessible to the user.
We can query mongodb to find such entries:  
```
db
	.collectionName
	.find({
		policies: [],
		deletedAt: {$exists: false}
	})
```
We expect collections like plugins, customJSlibs etc to have empty
values for policies and hence policyMap was not migrated for this, but
we are seeing the same pattern for other collections as well like
newAction, workspace etc. which is why we are seeing NPEs. With this PR
we intend to remove this NPE by adding a empty map to policyMap field.

With prod dump this is taking 340sec so we need to plan accordingly.

/test 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/10903942123>
> Commit: c1573a68be0da4ee78ae2cb1ece8deb9ce6b8cb4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10903942123&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 17 Sep 2024 13:41:53 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Implemented a database migration to ensure all relevant documents have
a defined policy map, improving data consistency.
  
- **Bug Fixes**
- Addressed issues where documents had null or missing policy maps by
updating them to an empty policy map.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-18 07:25:59 +05:30
Abhijeet
74217484d7
chore: Add null check for PolicyUtils (#36341)
## Description
Sorry forgot to add the null check in my previous PR
4c7ce27976

/test 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/10881430163>
> Commit: c6d853ace084fe2fe0d2cb4c53fd55e216af1a15
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10881430163&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 16 Sep 2024 10:11:20 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling in the permissions system by adding a null
check for policies, preventing potential crashes.
- **Refactor**
- Enhanced the robustness of the permission checking method to ensure
stability when handling null inputs.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-17 08:14:11 +05:30
Abhijeet
4c7ce27976
fix: NPE for policies when policyMap is not present (#36323)
## Description

/test all

### 🔍 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/10878646145>
> Commit: 5bbb0ad1b7a76a91540f401753dc588b440900d1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10878646145&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 16 Sep 2024 07:32:37 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **Bug Fixes**
- Improved the reliability of policies retrieval methods to prevent null
values, ensuring they always return a non-null result.
- **New Features**
- Enhanced API design with safer handling of collections by returning an
empty set when no policies are available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-16 14:50:52 +05:30
Manish Kumar
71261b1e6e
chore: autocommit migration for annotation and embedded datasource changes. (#36261)
## Description
- Added autocommit migration to avoid uncommited changes on some of the
applications.


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/10878546679>
> Commit: 0013cdec8894922d3cae386a8d8d7b8aebc3837d
> Workflow: `PR Automation test suite`
> Tags: `@tag.Git`
> Spec: ``
> <hr>Mon, 16 Sep 2024 06:20:40 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Updated the server version from 10 to 11, enhancing compatibility and
functionality related to JSON schema handling.
- Improved logic for default REST datasource migrations, making it more
robust and accessible.
- Added support for SSH connection configurations in datasource
management.

- **Bug Fixes**
- Added null checks to prevent potential errors during datasource
migrations, enhancing overall reliability.

- **Refactor**
- Streamlined filtering logic for actions, improving code readability
and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-16 13:24:08 +05:30
sneha122
31a6223d49
fix: consolidated api test file split to ce (#36318)
## Description
Split ConsolidatedAPIServiceImplTest file to CE as we need to write
modules related tests in EE.

EE Test PR: https://github.com/appsmithorg/appsmith-ee/pull/5140

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

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10872195570>
> Commit: fe51aaa8aa141cbbfc4c04d39422e1bcca01868c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10872195570&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Sun, 15 Sep 2024 15:46:52 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Refactor**
- The package structure for the test class has been reorganized to
better categorize services.
  
- **Tests**
- Enhanced test functionality by incorporating additional service
imports, potentially improving test coverage and functionality.

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

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-09-16 11:39:11 +05:30
sneha122
1c8712aa66
fix: fixed page data DB call getting called twice (#36247)
## Description
After perf updates made in PR
https://github.com/appsmithorg/appsmith/pull/36118/files, Page data DB
fetch call was getting triggered twice, one for PAGES_SPAN and one for
ACTIONS_SPAN. With this PR, we have replaced that a single Mono which is
being cached.

More details:
https://theappsmith.slack.com/archives/C024GUDM0LT/p1725960912325389


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

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10808901838>
> Commit: d36df4cb300653a51d10a09b3315aaa114b68034
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10808901838&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 11 Sep 2024 09:49:39 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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


- **Performance Improvements**
- Enhanced the page loading process by implementing a caching mechanism
for retrieving branched page data, potentially reducing database calls
and improving overall application performance.
- Streamlined the retrieval logic for branched pages, ensuring
consistent execution regardless of the base page ID state.

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

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-09-11 15:48:28 +05:30
Manish Kumar
da5d37e170
chore: Migration for missing datasource configuration on default rest datasources for git connected app. (#36203)
## Description



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.Git, @tag.ImportExport"

### 🔍 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/10789950948>
> Commit: 69729ce5e51ee6127f292a1dce468c492db9e413
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10789950948&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git, @tag.ImportExport`
> Spec:
> <hr>Tue, 10 Sep 2024 10:07:42 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

- **New Features**
- Enhanced application JSON migration process to support additional
contextual parameters, improving accuracy and relevance.
- Introduced a new helper class to facilitate datasource configuration
during migrations.

- **Bug Fixes**
- Improved handling of incompatible schemas during migration, ensuring
robust error management.

- **Tests**
- Adjusted test cases to accommodate changes in method signatures for
migration processes, ensuring continued functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 16:53:34 +05:30
Nilesh Sarupriya
316f91484b
fix: updateWithoutPermission updates user instead of saving it (#36206)
## Description
> UserService$updateWithoutPermission will now update the user instead
of saving it.

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

## 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/10786655302>
> Commit: 0eb7f18762d51529822907df7e5f3f6129e3286f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10786655302&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 10 Sep 2024 06:20:46 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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


## Summary by CodeRabbit

- **New Features**
	- Enhanced user update functionality for more efficient processing.
- Added a mechanism to ensure user policies remain unchanged during
updates.

- **Bug Fixes**
- Implemented tests to verify that user name updates do not affect
associated policies.

- **Tests**
- Introduced new test methods to validate user update scenarios within
the correct security context.

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

---------

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2024-09-10 01:57:20 -05:00
subratadeypappu
9a2606618f
chore: introduce caching and projection to optimise FPL (#36118)
## Description
This PR aims to enhance the performance of the pages span in
consolidated-API view mode. It does so by brining the following changes

- **Add Projection:** Implement projections to enhance performance for
`appsmith.consolidated-api.view.pages.getpage`.
- **Implement Caching:** Introduce caching to eliminate the `getpage`
query, thereby optimizing
`appsmith.consolidated-api.view.application_id` and related spans.
    
We will implement caching to store `defaultApplicationId` information in
memory. This cache will reduce the need for the time-consuming `getpage`
query. On a cache miss, the system will first fetch the page and then
the branched application. If the information is present in the cache, it
will directly retrieve the branched application, leveraging the cached
data for improved efficiency.

With these changes, the pages API is showing improvements. A few
screenshots from local environment:

![Screenshot 2024-09-04 at 6 57
01 PM](https://github.com/user-attachments/assets/c5e91d81-7902-4f58-8d18-8c16e92af540)
![Screenshot 2024-09-04 at 6 57
46 PM](https://github.com/user-attachments/assets/3b99000e-2236-41cc-8955-b8b30780ee87)
![Screenshot 2024-09-04 at 7 03
17 PM](https://github.com/user-attachments/assets/ff60d8cb-2588-40a7-ad82-b132da6dba72)
![Screenshot 2024-09-04 at 7 12
47 PM](https://github.com/user-attachments/assets/e528ebc7-b48d-4632-a44c-4a6b3cbb2cf8)



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

## 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/10778438378>
> Commit: 25e71b594261a318ef6204603a225c3136892a89
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10778438378&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 09 Sep 2024 18:03:52 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Enhanced page retrieval capabilities with additional parameters for
improved data handling.
- Introduced a caching mechanism for optimized retrieval of application
IDs in view mode.
- Added support for bulk cache eviction through the `@CacheEvict`
annotation.

- **Bug Fixes**
- Adjusted method signatures in tests to align with updated service
methods, ensuring proper functionality.

- **Documentation**
- Updated test cases to reflect changes in method parameters for clarity
and accuracy.

- **Chores**
- Refactored method calls across various services and tests to
incorporate new parameters and improve overall performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-09-10 00:04:22 +06:00