Skip to content

Commit

Permalink
fix: Buffer size error with DSL migration calls (#34905)
Browse files Browse the repository at this point in the history
**/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/9907267253>
> Commit: 954c3e7
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9907267253&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 12 Jul 2024 12:00:55 UTC
<!-- end of auto-generated comment: Cypress test results  -->
  • Loading branch information
sharat87 committed Jul 15, 2024
1 parent 1b67cb6 commit 592fff8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.BodyInserters;
import org.springframework.web.reactive.function.client.ExchangeStrategies;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
import reactor.netty.http.client.HttpClient;
Expand All @@ -28,6 +29,8 @@ public class RTSCaller {
@Value("${appsmith.rts.port:}")
private String rtsPort;

private static final int MAX_IN_MEMORY_SIZE_IN_BYTES = 16 * 1024 * 1024;

@PostConstruct
private void makeWebClient() {
if (isEmpty(rtsPort)) {
Expand All @@ -45,6 +48,9 @@ private void makeWebClient() {
// We do NOT use `WebClientUtils` here, intentionally, since we don't allow connections to 127.0.0.1,
// which is exactly the _only_ host we want to hit from here.
webClient = WebClient.builder()
.exchangeStrategies(ExchangeStrategies.builder()
.codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(MAX_IN_MEMORY_SIZE_IN_BYTES))
.build())
.clientConnector(new ReactorClientHttpConnector(HttpClient.create(connectionProvider)))
.baseUrl("http://127.0.0.1:" + rtsPort)
.build();
Expand Down

0 comments on commit 592fff8

Please sign in to comment.