Policy Executor: handle errors, part 2 34/139034/10
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 1 Oct 2024 17:40:39 +0000 (18:40 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Thu, 3 Oct 2024 12:29:16 +0000 (13:29 +0100)
commit77e469b27708d2fabe6281082716a8c086f8107d
tree1780ac8f935ea4c2d0b9c283088fefaffe91d50e
parent89bfabfda2afeeedd1e6cdcba41705469d406f48
Policy Executor: handle errors, part 2
(fighting between IntelliJ and Checkstyle best practices)

- non-2xx responses are processed using web client exceptions
- handle unknown host exception
- upgraded spotbugs (checkstyle and related mvn plugin)
- fixed some small spotbugs due to upgrade
- added commented instructions in docker compose to enable debugging
- added some environment variables for policy executor configuration
- extract out Sleeper in stub service to achieve 100% coverage
- added cause to Policy Executor exceptions where applicable
- ignored (new) spotbug rule about catch NPE because of issue in 3pp
- ignored (new) spotbug rule about \n in string due to multiline string block

Issue-ID: CPS-2412
Change-Id: I6835a73320c436cbeea12cc7a06f15899eec7bf1
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
21 files changed:
checkstyle/src/main/resources/cps-java-style.xml
cps-application/src/main/resources/application.yml
cps-dependencies/pom.xml
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandlerSpec.groovy
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/exceptions/NcmpException.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/exceptions/PolicyExecutorException.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/lcm/LcmEventType.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutorSpec.groovy
cps-parent/pom.xml
cps-ri/pom.xml
cps-ri/src/main/java/org/onap/cps/ri/repository/ModuleReferenceRepositoryImpl.java
cps-service/pom.xml
cps-service/src/main/java/org/onap/cps/utils/YangParserHelper.java
docker-compose/config/nginx/nginx.conf
docker-compose/docker-compose.yml
integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/PolicyExecutorIntegrationSpec.groovy
policy-executor-stub/src/main/java/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubController.java
policy-executor-stub/src/main/java/org/onap/cps/policyexecutor/stub/controller/Sleeper.java [new file with mode: 0644]
policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy