From d7dc7edbb8fa9b18e9f17ff5714f91ec7c410a2f Mon Sep 17 00:00:00 2001 From: Nafi Xhafa <164854562+nxhafa@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:58:35 +0200 Subject: [PATCH] chore: fix Warn messages (#3776) * chore: using caffeine cache for Spring Cloud LoadBalancer Signed-off-by: nx673747 * chore: hide WARN messages for BeanPostProcessorChecker Signed-off-by: nx673747 * replace deprecated attribute from the logback configuration and hide tls message from CS Signed-off-by: Andrea Tabone * set the instanceInfoReplicationIntervalSeconds to avoid overcoming the limit of request for the demand update Signed-off-by: Andrea Tabone * fix deprecated velocity property Signed-off-by: Andrea Tabone * hide message from SSLUtilBase Signed-off-by: Andrea Tabone * address pr comment Signed-off-by: Andrea Tabone * remove unused variable Signed-off-by: Andrea Tabone --------- Signed-off-by: nx673747 Signed-off-by: Andrea Tabone Co-authored-by: nx673747 Co-authored-by: Andrea Tabone --- api-catalog-services/build.gradle | 2 ++ .../apicatalog/swagger/SubstituteSwaggerGenerator.java | 2 +- .../src/main/resources/application.yml | 3 +++ apiml-common/src/main/resources/logback.xml | 2 +- caching-service/src/main/resources/application.yml | 10 ++++++++++ caching-service/src/main/resources/logback.xml | 2 +- discoverable-client/src/main/resources/logback.xml | 2 +- discovery-service/build.gradle | 1 + discovery-service/src/main/resources/application.yml | 3 +++ gateway-service/build.gradle | 1 + gateway-service/src/main/resources/application.yml | 4 ++++ gateway-service/src/main/resources/logback.xml | 2 +- .../src/main/resources/logback.xml | 2 +- zaas-service/build.gradle | 2 ++ zaas-service/src/main/resources/application.yml | 3 +++ zaas-service/src/main/resources/logback.xml | 2 +- .../cli/map/cli.map.integration.test.ts | 2 +- 17 files changed, 37 insertions(+), 8 deletions(-) diff --git a/api-catalog-services/build.gradle b/api-catalog-services/build.gradle index d983276bad..2e83d755ec 100644 --- a/api-catalog-services/build.gradle +++ b/api-catalog-services/build.gradle @@ -73,6 +73,8 @@ dependencies { implementation libs.apache.velocity + implementation libs.caffeine + implementation(libs.openapidiff) { exclude group: "io.swagger.core.v3", module: "swagger-core" // Remove deprecated HTTP client (unused transitive dependency of openDiff) diff --git a/api-catalog-services/src/main/java/org/zowe/apiml/apicatalog/swagger/SubstituteSwaggerGenerator.java b/api-catalog-services/src/main/java/org/zowe/apiml/apicatalog/swagger/SubstituteSwaggerGenerator.java index 9933311949..b034b3eab6 100644 --- a/api-catalog-services/src/main/java/org/zowe/apiml/apicatalog/swagger/SubstituteSwaggerGenerator.java +++ b/api-catalog-services/src/main/java/org/zowe/apiml/apicatalog/swagger/SubstituteSwaggerGenerator.java @@ -29,7 +29,7 @@ public class SubstituteSwaggerGenerator { private final VelocityEngine ve = new VelocityEngine(); public SubstituteSwaggerGenerator() { - ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath"); + ve.setProperty(RuntimeConstants.RESOURCE_LOADERS, "classpath"); ve.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName()); ve.init(); } diff --git a/api-catalog-services/src/main/resources/application.yml b/api-catalog-services/src/main/resources/application.yml index 444543811f..8700066bcc 100644 --- a/api-catalog-services/src/main/resources/application.yml +++ b/api-catalog-services/src/main/resources/application.yml @@ -33,6 +33,7 @@ logging: com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient: OFF com.netflix.discovery.DiscoveryClient: OFF org.springframework.boot.web.embedded.tomcat.TomcatWebServer: INFO + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: ERROR org.ehcache: WARN org.springframework.security.config.annotation.web.builders.WebSecurity: ERROR org.springframework.security.web: INFO @@ -205,8 +206,10 @@ logging: ROOT: INFO org.zowe.apiml: DEBUG org.springframework: INFO + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: DEBUG org.apache: INFO org.apache.http: DEBUG + org.apache.tomcat.util.net: DEBUG com.netflix: INFO org.ehcache: INFO com.netflix.discovery.shared.transport.decorator: DEBUG diff --git a/apiml-common/src/main/resources/logback.xml b/apiml-common/src/main/resources/logback.xml index 6091f14bb4..37885ba2e7 100644 --- a/apiml-common/src/main/resources/logback.xml +++ b/apiml-common/src/main/resources/logback.xml @@ -19,7 +19,7 @@ - + diff --git a/caching-service/src/main/resources/application.yml b/caching-service/src/main/resources/application.yml index 7362a3ef90..bd3f905600 100644 --- a/caching-service/src/main/resources/application.yml +++ b/caching-service/src/main/resources/application.yml @@ -37,6 +37,7 @@ logging: com.netflix.discovery.DiscoveryClient: OFF org.springframework.boot.web.embedded.tomcat.TomcatWebServer: INFO org.apache.http.conn.ssl.DefaultHostnameVerifier: DEBUG #logs only SSLException + org.apache.tomcat.util.net.SSLUtilBase: ERROR org.springframework.security.config.annotation.web.builders.WebSecurity: ERROR javax.net.ssl: ERROR @@ -170,6 +171,7 @@ logging: org.springframework.web.servlet.PageNotFound: WARN org.ehcache: INFO com.netflix.discovery.shared.transport.decorator: DEBUG + org.apache.tomcat.util.net: DEBUG org.springframework.security.web: INFO javax.net.ssl: INFO @@ -194,3 +196,11 @@ eureka: instance: nonSecurePortEnabled: true securePortEnabled: false + +--- +spring.config.activate.on-profile: debug + +logging: + level: + ROOT: INFO + org.apache.tomcat.util.net: DEBUG diff --git a/caching-service/src/main/resources/logback.xml b/caching-service/src/main/resources/logback.xml index 452ccc5c08..bf5983afc9 100644 --- a/caching-service/src/main/resources/logback.xml +++ b/caching-service/src/main/resources/logback.xml @@ -15,7 +15,7 @@ - + diff --git a/discoverable-client/src/main/resources/logback.xml b/discoverable-client/src/main/resources/logback.xml index 0530aa584b..79cb080a01 100644 --- a/discoverable-client/src/main/resources/logback.xml +++ b/discoverable-client/src/main/resources/logback.xml @@ -5,7 +5,7 @@ 0 - + %d{yyyy-MM-dd HH:mm:ss.SSS,UTC} %clr(<${logbackService:-${logbackServiceName}}:%thread:${PID:- }>){magenta} %X{userid:-} %clr(%-5level) %clr(\(%logger{15}\)){cyan} %msg%n diff --git a/discovery-service/build.gradle b/discovery-service/build.gradle index 1173f1073d..c7fa918ec8 100644 --- a/discovery-service/build.gradle +++ b/discovery-service/build.gradle @@ -61,6 +61,7 @@ dependencies { implementation libs.apache.commons.lang3 implementation libs.jackson.dataformat.yaml + implementation libs.caffeine testImplementation(testFixtures(project(":apiml-common"))) diff --git a/discovery-service/src/main/resources/application.yml b/discovery-service/src/main/resources/application.yml index 34ad91bd56..995c5e98fe 100644 --- a/discovery-service/src/main/resources/application.yml +++ b/discovery-service/src/main/resources/application.yml @@ -9,6 +9,7 @@ logging: com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient: OFF com.netflix.discovery.DiscoveryClient: OFF org.springframework.boot.web.embedded.tomcat.TomcatWebServer: INFO + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: ERROR com.sun.jersey.server.impl.application.WebApplicationImpl: WARN org.ehcache: WARN org.springframework.security.config.annotation.web.builders.WebSecurity: ERROR @@ -160,8 +161,10 @@ logging: ROOT: DEBUG org.zowe.apiml: DEBUG org.springframework: INFO + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: DEBUG org.apache: INFO org.apache.http: DEBUG + org.apache.tomcat.util.net: DEBUG com.netflix: INFO com.sun.jersey.server.impl.application.WebApplicationImpl: INFO org.ehcache: INFO diff --git a/gateway-service/build.gradle b/gateway-service/build.gradle index ca0495247d..f419549a99 100644 --- a/gateway-service/build.gradle +++ b/gateway-service/build.gradle @@ -78,6 +78,7 @@ dependencies { implementation libs.jjwt.jackson implementation libs.nimbus.jose.jwt implementation libs.bcpkix + implementation libs.caffeine implementation libs.swagger2.parser implementation libs.swagger3.parser diff --git a/gateway-service/src/main/resources/application.yml b/gateway-service/src/main/resources/application.yml index 057bd86c22..dced6ead9b 100644 --- a/gateway-service/src/main/resources/application.yml +++ b/gateway-service/src/main/resources/application.yml @@ -39,6 +39,7 @@ eureka: client: fetchRegistry: true registerWithEureka: true + instanceInfoReplicationIntervalSeconds: 1 region: default serviceUrl: defaultZone: ${apiml.service.discoveryServiceUrls} @@ -130,9 +131,11 @@ logging: org.springframework.cloud.gateway.route: WARN org.springframework.context.support: WARN org.springframework.beans: WARN + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: ERROR reactor.netty.http.client: INFO reactor.netty.http.client.HttpClientConnect: OFF javax.net.ssl: ERROR + org.apache.tomcat.util.net.SSLUtilBase: ERROR management: endpoint: @@ -154,6 +157,7 @@ logging: level: org.zowe.apiml: DEBUG org.springframework.cloud.gateway: DEBUG + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: DEBUG org.springframework.security: DEBUG org.springframework.web.reactive: DEBUG org.springframework.web.reactive.socket: DEBUG diff --git a/gateway-service/src/main/resources/logback.xml b/gateway-service/src/main/resources/logback.xml index 41c7f59f35..cd5430a296 100644 --- a/gateway-service/src/main/resources/logback.xml +++ b/gateway-service/src/main/resources/logback.xml @@ -15,7 +15,7 @@ - + diff --git a/onboarding-enabler-micronaut-sample-app/src/main/resources/logback.xml b/onboarding-enabler-micronaut-sample-app/src/main/resources/logback.xml index 3c61c50aee..9890c6e977 100644 --- a/onboarding-enabler-micronaut-sample-app/src/main/resources/logback.xml +++ b/onboarding-enabler-micronaut-sample-app/src/main/resources/logback.xml @@ -4,7 +4,7 @@ 0 - + %cyan(%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}) %gray(<${logbackService:-${logbackServiceName}}:%thread:${PID:- }>){magenta} %X{userid:-} %highlight(%-5level) %magenta(\(%logger{15}\)){cyan} %msg%n diff --git a/zaas-service/build.gradle b/zaas-service/build.gradle index a6da20b46d..1c2677591a 100644 --- a/zaas-service/build.gradle +++ b/zaas-service/build.gradle @@ -92,6 +92,8 @@ dependencies { implementation libs.guava + implementation libs.caffeine + implementation libs.jjwt.impl implementation libs.jjwt.jackson diff --git a/zaas-service/src/main/resources/application.yml b/zaas-service/src/main/resources/application.yml index 9ba16833d7..733bbace78 100644 --- a/zaas-service/src/main/resources/application.yml +++ b/zaas-service/src/main/resources/application.yml @@ -16,6 +16,7 @@ logging: org.ehcache: WARN org.springframework.security.config.annotation.web.builders.WebSecurity: ERROR org.springframework.cloud.client.loadbalancer.reactive.[ReactorLoadBalancerClientAutoConfiguration$ReactorLoadBalancerClientRibbonWarnLogger]: ERROR + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: ERROR # New Config org.apache: WARN #org.apache.catalina, org.apache.coyote, org.apache.tomcat @@ -214,8 +215,10 @@ logging: ROOT: INFO org.zowe.apiml: DEBUG org.springframework: INFO + org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: DEBUG org.apache: INFO org.apache.http: DEBUG + org.apache.tomcat.util.net: DEBUG com.netflix: DEBUG org.hibernate: INFO org.springframework.web.servlet.PageNotFound: WARN diff --git a/zaas-service/src/main/resources/logback.xml b/zaas-service/src/main/resources/logback.xml index 41c7f59f35..cd5430a296 100644 --- a/zaas-service/src/main/resources/logback.xml +++ b/zaas-service/src/main/resources/logback.xml @@ -15,7 +15,7 @@ - + diff --git a/zowe-cli-id-federation-plugin/__tests__/__integration__/cli/map/cli.map.integration.test.ts b/zowe-cli-id-federation-plugin/__tests__/__integration__/cli/map/cli.map.integration.test.ts index c63f647ff6..f19b84660b 100644 --- a/zowe-cli-id-federation-plugin/__tests__/__integration__/cli/map/cli.map.integration.test.ts +++ b/zowe-cli-id-federation-plugin/__tests__/__integration__/cli/map/cli.map.integration.test.ts @@ -10,7 +10,7 @@ import * as fs from "fs"; import * as path from "path"; -import {ITestEnvironment, runCliScript, stripProfileDeprecationMessages, TestEnvironment} from "@zowe/cli-test-utils"; +import {ITestEnvironment, runCliScript, TestEnvironment} from "@zowe/cli-test-utils"; import {ITestPropertiesSchema} from "../../../__src__/environment/doc/ITestPropertiesSchema"; import {Constants} from "../../../../src/api/Constants"; import {expect, describe, it, beforeAll, afterAll} from '@jest/globals';