[fix][fn] Do not delete managed package when delete function
@@ -524,22 +524,14 @@ public abstract class ComponentImpl implements Component<PulsarWorkerService> {
String functionPackagePath) {
if (!functionPackagePath.startsWith(Utils.HTTP)
&& !functionPackagePath.startsWith(Utils.FILE)
- && !functionPackagePath.startsWith(Utils.BUILTIN)) {
- if (worker().getWorkerConfig().isFunctionsWorkerEnablePackageManagement()) {
- try {
- worker().getBrokerAdmin().packages().delete(functionPackagePath);
- } catch (PulsarAdminException e) {
- log.error("{}/{}/{} Failed to cleanup package in package management with url {}", tenant,
- namespace, componentName, functionPackagePath, e);
- }
- } else {
+ && !functionPackagePath.startsWith(Utils.BUILTIN)
+ && !worker().getWorkerConfig().isFunctionsWorkerEnablePackageManagement()) {
try {
WorkerUtils.deleteFromBookkeeper(worker().getDlogNamespace(), functionPackagePath);
} catch (IOException e) {
log.error("{}/{}/{} Failed to cleanup package in BK with path {}", tenant, namespace, componentName,
functionPackagePath, e);
}
- }
}
}
