Fix the application readiness state during migration 24/142224/5
authormpriyank <priyank.maheshwari@est.tech>
Thu, 2 Oct 2025 15:39:58 +0000 (16:39 +0100)
committermpriyank <priyank.maheshwari@est.tech>
Tue, 14 Oct 2025 08:27:47 +0000 (09:27 +0100)
commit0516e22ea09f77155621469c95a487f56f94d2de
treef00617ad4c0c227852c0b0f3ab1276ab15494eff
parentcf8d4dec598cafe4b61a1d1adffbb6ad8187ecf5
Fix the application readiness state during migration

- updating the readiness health indicator to just work on the readiness
  state and not on the overall state.
- before this fix, during migration the readiness, liveness and overall
  status is DOWN.
- after the fix, readiness and overall state would be DOWN, while the
  application will be live, hence liveness probe will show as UP
- ReadinessManager relies on ApplicationReadyEvent now instead of
  ApplicationStartedEvent
- Dynamically register the model loaders during Application startup
- removed the initial delay string from the watchdogs
- Added a new arch rule for the cps init package to be used in
  ncmp-service
- removed the module-sync-delayed package

Issue-ID: CPS-2993
Change-Id: I4c3bbc8633b84984095ad11ca8e4fbade91fd0f2
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
20 files changed:
cps-application/src/main/resources/application.yml
cps-application/src/test/java/org/onap/cps/architecture/NcmpArchitectureTest.java
cps-application/src/test/resources/application.yml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/DataSyncWatchdog.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DataSyncWatchdogSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdogSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoaderSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/init/InventoryModelLoaderSpec.groovy
cps-service/src/main/java/org/onap/cps/init/AbstractModelLoader.java
cps-service/src/main/java/org/onap/cps/init/ModelLoader.java
cps-service/src/main/java/org/onap/cps/init/actuator/ModelLoaderRegistrationOnStartup.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/init/actuator/ReadinessStateHealthIndicatorConfig.java [moved from cps-service/src/main/java/org/onap/cps/init/actuator/ReadinessHealthIndicator.java with 60% similarity]
cps-service/src/test/groovy/org/onap/cps/init/AbstractModelLoaderSpec.groovy
cps-service/src/test/groovy/org/onap/cps/init/CpsNotificationSubscriptionModelLoaderSpec.groovy
cps-service/src/test/groovy/org/onap/cps/init/actuator/ModelLoaderRegistrationOnStartupSpec.groovy [new file with mode: 0644]
cps-service/src/test/groovy/org/onap/cps/init/actuator/ReadinessStateHealthIndicatorConfigSpec.groovy [moved from cps-service/src/test/groovy/org/onap/cps/init/actuator/ReadinessHealthIndicatorSpec.groovy with 84% similarity]
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/resources/application-module-sync-delayed.yml [deleted file]
integration-test/src/test/resources/application.yml