Skip to content

Commit

Permalink
fix: ds structure issue fixed for zendesk integration (#38795)
Browse files Browse the repository at this point in the history
## 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"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12907027118>
> Commit: 5a9ef72
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12907027118&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 22 Jan 2025 12:24:10 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
	- Deprecated the previous method for retrieving datasource context.
- Updated the datasource context retrieval process to include plugin
information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“[email protected]”>
  • Loading branch information
sneha122 and “sneha122” authored Jan 22, 2025
1 parent 704e473 commit b14669e
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<DatasourceContext<?>> getDatasourceContext(DatasourceStorage datasourceStorage) {
final String datasourceId = datasourceStorage.getDatasourceId();
Expand Down Expand Up @@ -452,9 +457,12 @@ public Mono<DatasourceContext<?>> getDatasourceContext(DatasourceStorage datasou

@Override
public <T> Mono<T> retryOnce(DatasourceStorage datasourceStorage, Function<DatasourceContext<?>, Mono<T>> task) {

final Mono<T> 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);

Expand Down

0 comments on commit b14669e

Please sign in to comment.