- Remove Instance on delete of the Application (#15400)

This commit is contained in:
Mohit Yadav 2024-02-29 13:38:47 +05:30 committed by GitHub
parent b15cd4e17c
commit d26cb9605f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -82,4 +82,8 @@ public class ApplicationHandler {
throw new UnhandledServerException("Exception encountered", e);
}
}
public static void removeUninstalledApp(String className) {
instances.remove(className);
}
}

View File

@ -5,6 +5,7 @@ import static org.openmetadata.schema.type.Include.ALL;
import static org.openmetadata.service.Entity.APPLICATION;
import static org.openmetadata.service.Entity.BOT;
import static org.openmetadata.service.Entity.FIELD_OWNER;
import static org.openmetadata.service.apps.ApplicationHandler.removeUninstalledApp;
import static org.openmetadata.service.jdbi3.EntityRepository.getEntitiesFromSeedData;
import io.swagger.v3.oas.annotations.ExternalDocumentation;
@ -1030,5 +1031,8 @@ public class AppResource extends EntityResource<App, AppRepository> {
}
}
}
// Remove App from instances Map Lookup
removeUninstalledApp(installedApp.getClassName());
}
}