diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java index ad0373928c..a7a22b4a0e 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java @@ -225,6 +225,7 @@ public class GitExecutorCEImpl implements GitExecutor { StringBuilder result = new StringBuilder("Pushed successfully with status : "); git.push() + .setAtomic(true) .setTransportConfigCallback(transportConfigCallback) .setRemote(remoteUrl) .call() diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java index c8aeee333c..97ef9f8639 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/GitServiceCEImpl.java @@ -3077,11 +3077,11 @@ public class GitServiceCEImpl implements GitServiceCE { auth.getPublicKey(), auth.getPrivateKey(), gitArtifactMetadata.getBranchName()) - .map(pushResult -> { + .flatMap(pushResult -> { if (pushResult.contains("REJECTED")) { - throw new AppsmithException(AppsmithError.GIT_UPSTREAM_CHANGES); + return Mono.error(new AppsmithException(AppsmithError.GIT_UPSTREAM_CHANGES)); } - return pushResult; + return Mono.just(pushResult); })); }