spring-cloud / spring-cloud-kubernetes

Kubernetes integration with Spring Cloud Discovery Client, Configuration, etc...
Apache License 2.0
3.45k stars 1.03k forks source link

Unit Tests getting failed in org.springframework.cloud:spring-cloud-kubernetes-fabric8-discovery:3.1.3 #1684

Open imtavish04 opened 1 month ago

imtavish04 commented 1 month ago

Hi team,

I am trying to build "org.springframework.cloud:spring-cloud-kubernetes-fabric8-discovery:3.1.3" from source code. However the UTs are getting failed with the below error ->

[ERROR] /root/spring-cloud-kubernetes/spring-cloud-kubernetes-fabric8-discovery/src/test/java/org/springframework/cloud/kubernetes/fabric8/discovery/KubernetesDiscoveryClientUtilsTests.java:53: First sentence should end with a period. [JavadocStyle] [ERROR] /root/spring-cloud-kubernetes/spring-cloud-kubernetes-fabric8-discovery/src/test/java/org/springframework/cloud/kubernetes/fabric8/discovery/KubernetesDiscoveryClientUtilsTests.java:72: First sentence should end with a period. [JavadocStyle] [ERROR] /root/spring-cloud-kubernetes/spring-cloud-kubernetes-fabric8-discovery/src/test/java/org/springframework/cloud/kubernetes/fabric8/discovery/KubernetesDiscoveryClientUtilsTests.java:93: First sentence should end with a period. [JavadocStyle] Audit done. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:23 min [INFO] Finished at: 2024-08-06T11:42:28Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check (checkstyle-validation) on project spring-cloud-kubernetes-fabric8-discovery: Failed during checkstyle execution: There are 49 errors reported by Checkstyle 9.2.1 with checkstyle.xml ruleset. -> [Help 1]

I have tried to skip the checkstyle validation by using --Dcheckstyle.skip=true, but still not able to skip those.

I am using Java 17.

Please suggest if I am doing something wrong here.

wind57 commented 1 month ago

weird, is this on main branch? cause I just tried to build it and it works just fine :|

imtavish04 commented 1 month ago

I build it on v3.1.3 tag

wind57 commented 1 month ago

I can't reproduce that:

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:15 min
[INFO] Finished at: 2024-08-07T10:55:32+03:00
[INFO] ------------------------------------------------------------------------
wind57@wind57s-MacBook-Pro ~/D/p/s/spring-cloud-kubernetes ((v3.1.3))> mvn clean install -Dskip.build.image=true -DskipTests -DskipITs -U
imtavish04 commented 1 month ago

You have skipped the tests. I also need to run tests

wind57 commented 1 month ago

even when I ran all the tests, everything passes. It would be very strange if it did not anyway. I can't find a reason why they fail for you...

imtavish04 commented 1 month ago

Is there any way I can skip the checkstyle validation?

wind57 commented 1 month ago

I actually never thought or tried that before

wind57 commented 1 month ago

one way to do it is to go to the root pom.xml and disable the plugin:

<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-checkstyle-plugin</artifactId>-->
<!--            </plugin>-->

but I would really dig into why this is happening for you. I would be more then glad to look into it myself if I could re-produce it :(

benson0303 commented 1 month ago

HI @wind57 ,

We are still stuck on this checkstyle issue... it would be great if we can get some workaround..

--Benson

wind57 commented 1 month ago

can we try something please? what if you fork the repo and give me the github url for that. may be I can re-produce it off your repo...

wind57 commented 1 week ago

@ryanjbaxter can you please add the feedback label in here?

benson0303 commented 1 week ago

I dont think we can fork it, we have a closed env and no sharing policy. We are still not able to resolve this.. we tried adding proxy explicitly but still its not picking for checkstyle...

ryanjbaxter commented 1 week ago

I wonder if you IDE is applying some formatting to the code that is causing checkstyle failures

spring-cloud-issues commented 3 days ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.