From b14669e986548d9339490d0834170d8eeb87af14 Mon Sep 17 00:00:00 2001 From: sneha122 Date: Wed, 22 Jan 2025 19:51:23 +0530 Subject: [PATCH] fix: ds structure issue fixed for zendesk integration (#38795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR fixes the issue where for Saas integrations like zendesk, we do not have a structure to be displayed, in that case we should show appropriate error message. Fixes #38736 _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" ### :mag: Cypress test results > [!TIP] > ๐ŸŸข ๐ŸŸข ๐ŸŸข All cypress tests have passed! ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ > Workflow run: > Commit: 5a9ef72ef41275bcd6303e311313758f0c24789d > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Wed, 22 Jan 2025 12:24:10 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Deprecated the previous method for retrieving datasource context. - Updated the datasource context retrieval process to include plugin information. --------- Co-authored-by: โ€œsneha122โ€ <โ€œsneha@appsmith.comโ€> --- .../services/ce/DatasourceContextServiceCEImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/DatasourceContextServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/DatasourceContextServiceCEImpl.java index adc1d2ea82bb..69632105e0d3 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/DatasourceContextServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/DatasourceContextServiceCEImpl.java @@ -384,6 +384,11 @@ public boolean isValidDatasourceContextAvailable( && !isInErrorState; } + /** + * This method is deprecated and should not be used. Use the method {@link #getDatasourceContext(DatasourceStorage, Plugin)} instead. + * such entities as possible candidates for domain mapping. + */ + @Deprecated @Override public Mono> getDatasourceContext(DatasourceStorage datasourceStorage) { final String datasourceId = datasourceStorage.getDatasourceId(); @@ -452,9 +457,12 @@ public Mono> getDatasourceContext(DatasourceStorage datasou @Override public Mono retryOnce(DatasourceStorage datasourceStorage, Function, Mono> task) { - final Mono taskRunnerMono = Mono.justOrEmpty(datasourceStorage) - .flatMap(this::getDatasourceContext) + .flatMap(ds -> { + return pluginService + .findById(datasourceStorage.getPluginId()) + .flatMap(plugin -> getDatasourceContext(datasourceStorage, plugin)); + }) // Now that we have the context (connection details), call the task. .flatMap(task);