From 4941c3a87e89c75ae90c153609043852ceb5f6e5 Mon Sep 17 00:00:00 2001 From: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:07:11 +0530 Subject: [PATCH] chore: made pull and rehydrate a sequential process (#40407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 # _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" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 83f2303ccb3b7456cbf0a78f64aea315df3158b4 > Cypress dashboard. > Tags: `@tag.Git` > Spec: >
Mon, 28 Apr 2025 07:23:20 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Improved the way certain asynchronous operations are combined during artifact import and synchronization processes, resulting in more efficient handling of related tasks. No changes to user-facing features or interfaces. --- .../appsmith/server/git/central/CentralGitServiceCEImpl.java | 2 +- .../com/appsmith/server/git/common/CommonGitServiceCEImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java index 77b0d82d42..2b4139a622 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java @@ -2014,7 +2014,7 @@ public class CentralGitServiceCEImpl implements CentralGitServiceCE { Mono artifactExchangeJsonMono = mergeStatusDTOMono.flatMap(status -> gitHandlingService.reconstructArtifactJsonFromGitRepository(jsonTransformationDTO)); - return Mono.zip(mergeStatusDTOMono, artifactExchangeJsonMono); + return mergeStatusDTOMono.zipWhen(mergeStatusDTO -> artifactExchangeJsonMono); }) .flatMap(tuple -> { MergeStatusDTO status = tuple.getT1(); diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java index 865103b449..495771a1f9 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java @@ -1837,7 +1837,7 @@ public class CommonGitServiceCEImpl implements CommonGitServiceCE { status -> commonGitFileUtils.reconstructArtifactExchangeJsonFromGitRepoWithAnalytics( workspaceId, baseArtifactId, repoName, branchName, artifactType)); - return Mono.zip(pullStatusMono, artifactExchangeJsonMono); + return pullStatusMono.zipWhen(mergeStatusDTO -> artifactExchangeJsonMono); } catch (IOException e) { return Mono.error(new AppsmithException(AppsmithError.GIT_FILE_SYSTEM_ERROR, e.getMessage()));