mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 11:56:01 +00:00
Fix App Issue (#17088)
This commit is contained in:
parent
28218ec612
commit
c7710481b5
@ -63,8 +63,9 @@ public class AbstractNativeApplication implements NativeApplication {
|
||||
@Override
|
||||
public void install() {
|
||||
// If the app does not have any Schedule Return without scheduling
|
||||
if (app.getAppSchedule() != null
|
||||
&& app.getAppSchedule().getScheduleTimeline().equals(ScheduleTimeline.NONE)) {
|
||||
if (Boolean.FALSE.equals(app.getDeleted())
|
||||
|| (app.getAppSchedule() != null
|
||||
&& app.getAppSchedule().getScheduleTimeline().equals(ScheduleTimeline.NONE))) {
|
||||
return;
|
||||
}
|
||||
if (app.getAppType() == AppType.Internal
|
||||
|
@ -715,7 +715,8 @@ public class AppResource extends EntityResource<App, AppRepository> {
|
||||
@Parameter(description = "Name of the App", schema = @Schema(type = "string"))
|
||||
@PathParam("name")
|
||||
String name) {
|
||||
App app = repository.getByName(null, name, repository.getFields("bot,pipelines"));
|
||||
App app =
|
||||
repository.getByName(uriInfo, name, repository.getFields("bot,pipelines"), ALL, false);
|
||||
if (app.getSystem()) {
|
||||
throw new IllegalArgumentException(
|
||||
CatalogExceptionMessage.systemEntityDeleteNotAllowed(app.getName(), "SystemApp"));
|
||||
@ -748,7 +749,7 @@ public class AppResource extends EntityResource<App, AppRepository> {
|
||||
boolean hardDelete,
|
||||
@Parameter(description = "Id of the App", schema = @Schema(type = "UUID")) @PathParam("id")
|
||||
UUID id) {
|
||||
App app = repository.get(null, id, repository.getFields("bot,pipelines"));
|
||||
App app = repository.get(uriInfo, id, repository.getFields("bot,pipelines"), ALL, false);
|
||||
if (app.getSystem()) {
|
||||
throw new IllegalArgumentException(
|
||||
CatalogExceptionMessage.systemEntityDeleteNotAllowed(app.getName(), "SystemApp"));
|
||||
@ -1054,19 +1055,7 @@ public class AppResource extends EntityResource<App, AppRepository> {
|
||||
ingestionPipelineRepository.get(
|
||||
null, pipelineRef.getId(), ingestionPipelineRepository.getFields(FIELD_OWNER));
|
||||
try {
|
||||
if (hardDelete) {
|
||||
// Remove the Pipeline in case of Delete
|
||||
if (!nullOrEmpty(installedApp.getPipelines())) {
|
||||
pipelineServiceClient.deletePipeline(ingestionPipeline);
|
||||
}
|
||||
} else {
|
||||
// Just Kill Running ingestion
|
||||
if (Boolean.TRUE.equals(ingestionPipeline.getDeployed())) {
|
||||
decryptOrNullify(
|
||||
securityContext, ingestionPipeline, installedApp.getBot().getName(), true);
|
||||
pipelineServiceClient.killIngestion(ingestionPipeline);
|
||||
}
|
||||
}
|
||||
pipelineServiceClient.deletePipeline(ingestionPipeline);
|
||||
} catch (Exception ex) {
|
||||
LOG.error("Failed in Pipeline Service Client : ", ex);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user