CapabiltyManagement not detecting changes in artifact/app

Description

CapabilityManagement should redeploy app when newer artifacts are available or when app is not deployed any more. Currently there needs to be a config change for it to redeployed.

Also all operations should be idempotent and should not throw exceptions if expected apps are not found running.

Stacktrace when app is removed by REST API and then tried to be disabled from config
[CapabilityManagementService:i.c.c.c.s.AbstractRetryableScheduledService@207] - Failed to execute task for scheduled service CapabilityManagementService
io.cdap.cdap.common.NotFoundException: 'application:system.pipeline.-SNAPSHOT' was not found.
at io.cdap.cdap.internal.app.services.ApplicationLifecycleService.removeApplication(ApplicationLifecycleService.java:782) ~[na:na]
at io.cdap.cdap.internal.capability.CapabilityApplier.lambda$doWithRetry$7(CapabilityApplier.java:341) ~[na:na]
at io.cdap.cdap.common.service.Retries.callWithRetries(Retries.java:185) ~[na:na]
at io.cdap.cdap.internal.capability.CapabilityApplier.doWithRetry(CapabilityApplier.java:340) ~[na:na]
at io.cdap.cdap.internal.capability.CapabilityApplier.deleteCapabilities(CapabilityApplier.java:242) ~[na:na]
at io.cdap.cdap.internal.capability.CapabilityApplier.apply(CapabilityApplier.java:166) ~[na:na]
at io.cdap.cdap.internal.capability.CapabilityManagementService.runTask(CapabilityManagementService.java:66) ~[na:na]
at io.cdap.cdap.common.service.AbstractRetryableScheduledService.runOneIteration(AbstractRetryableScheduledService.java:162) ~[na:na]
at com.google.common.util.concurrent.AbstractScheduledService$1$1.run(AbstractScheduledService.java:170) [com.google.guava.guava-13.0.1.jar:na]
at com.google.common.util.concurrent.AbstractScheduledService$CustomScheduler$ReschedulableCallable.call(AbstractScheduledService.java:355) [com.google.guava.guava-13.0.1.jar:na]
at com.google.common.util.concurrent.AbstractScheduledService$CustomScheduler$ReschedulableCallable.call(AbstractScheduledService.java:321) [com.google.guava.guava-13.0.1.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_282]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_282]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_282]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_282]

Release Notes

None

Activity

Show:
Greeshma Swaminathan
February 12, 2021, 7:36 AM

This could be an issue when upgrading from 6.3 to 6.4

Greeshma Swaminathan
3 days ago

Fixed

Assignee

Greeshma Swaminathan

Reporter

Greeshma Swaminathan

Labels

Docs Impact

None

UX Impact

None

Fix versions

Affects versions

Priority

Critical