From 93fdfc967d14b51ed02f849b1c38269b62cfbad5 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Wed, 26 Mar 2025 11:12:58 +0530 Subject: [PATCH] fix: Placeholder for Anvil Application deploy (#39914) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Adds a CE version for Anvil Application deploy flow ## Automation /ok-to-test tags="@tag.Anvil" ### :mag: Cypress test results > [!IMPORTANT] > 🟣 🟣 🟣 Your tests are running. > Tests running at: > Commit: 507843d7fdf1df605020f41b3351da65636b2184 > Workflow: `PR Automation test suite` > Tags: `@tag.Anvil` > Spec: `` >
Wed, 26 Mar 2025 05:18:32 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Enhanced the application publishing process for a more reliable experience. Now, when you publish an application, the system manages the process with improved error handling to ensure smoother and more resilient operations. --- app/client/src/ce/sagas/ApplicationSagas.tsx | 16 ++++++++++++++++ app/client/src/ee/sagas/ApplicationSagas.tsx | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/app/client/src/ce/sagas/ApplicationSagas.tsx b/app/client/src/ce/sagas/ApplicationSagas.tsx index 2a64cdfa0d..b765556206 100644 --- a/app/client/src/ce/sagas/ApplicationSagas.tsx +++ b/app/client/src/ce/sagas/ApplicationSagas.tsx @@ -54,6 +54,7 @@ import { updateCurrentApplicationForkingEnabled, updateApplicationThemeSettingAction, fetchAllApplicationsOfWorkspace, + publishApplication, } from "ee/actions/applicationActions"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import { @@ -1132,3 +1133,18 @@ export function* deleteNavigationLogoSaga( }); } } + +export function* publishAnvilApplicationSaga( + action: ReduxAction, +) { + try { + yield put(publishApplication(action.payload.applicationId)); + } catch (error) { + yield put({ + type: ReduxActionErrorTypes.PUBLISH_ANVIL_APPLICATION_ERROR, + payload: { + error, + }, + }); + } +} diff --git a/app/client/src/ee/sagas/ApplicationSagas.tsx b/app/client/src/ee/sagas/ApplicationSagas.tsx index adc40a74c6..fd1e960df2 100644 --- a/app/client/src/ee/sagas/ApplicationSagas.tsx +++ b/app/client/src/ee/sagas/ApplicationSagas.tsx @@ -17,6 +17,7 @@ import { uploadNavigationLogoSaga, deleteNavigationLogoSaga, fetchAllApplicationsOfWorkspaceSaga, + publishAnvilApplicationSaga, } from "ce/sagas/ApplicationSagas"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; import { all, takeLatest } from "redux-saga/effects"; @@ -67,5 +68,9 @@ export default function* applicationSagas() { ReduxActionTypes.FETCH_UNCONFIGURED_DATASOURCE_LIST, fetchUnconfiguredDatasourceList, ), + takeLatest( + ReduxActionTypes.PUBLISH_ANVIL_APPLICATION_INIT, + publishAnvilApplicationSaga, + ), ]); }