Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add profile #1459

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ runs:
shell: bash
run: |
cd spring-cloud-kubernetes-controllers
.././mvnw -T 1C -U clean install
.././mvnw -P 'run-on-github-actions' -T 1C -U clean install
cd ..
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ runs:
echo "version of java: $version"

./mvnw -s .settings.xml \
-DtestsToRun=${TEST_ARG[@]} \
-e clean install \
-P 'sonar, run-on-github-actions' -nsu --batch-mode \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dhttp.keepAlive=false \
-Dmaven.wagon.http.pool=false \
-Dmaven.wagon.http.retryHandler.class=standard \
-Dmaven.wagon.http.retryHandler.count=3 \
-Dskip.build.image=true
-DtestsToRun=${TEST_ARG[@]} \
-D CURRENT_INSTANCE=${CURRENT_INDEX} \
-e clean install \
-P 'sonar, run-on-github-actions' -nsu --batch-mode \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dhttp.keepAlive=false \
-Dmaven.wagon.http.pool=false \
-Dmaven.wagon.http.retryHandler.class=standard \
-Dmaven.wagon.http.retryHandler.count=3 \
-Dskip.build.image=true
fi

touch /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ runs:
./mvnw -s .settings.xml \
-DtestsToRun=${tests_to_run_in_current_index} \
-e clean install \
-D CURRENT_INSTANCE=${CURRENT_INDEX} \
-P 'sonar, run-on-github-actions' -nsu --batch-mode \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dhttp.keepAlive=false \
Expand Down
23 changes: 23 additions & 0 deletions spring-cloud-kubernetes-controllers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,27 @@
<module>spring-cloud-kubernetes-configserver</module>
</modules>

<profiles>
<profile>
<id>run-on-github-actions</id>
<properties>
<CURRENT_INSTANCE>one</CURRENT_INSTANCE>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports/${CURRENT_INSTANCE}</reportsDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,27 @@
</plugins>
</build>

<profiles>
<profile>
<id>run-on-github-actions</id>
<properties>
<CURRENT_INSTANCE>one</CURRENT_INSTANCE>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports/${CURRENT_INSTANCE}</reportsDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

</project>
6 changes: 6 additions & 0 deletions spring-cloud-kubernetes-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@
<profiles>
<profile>
<id>run-on-github-actions</id>
<properties>
<CURRENT_INSTANCE>one</CURRENT_INSTANCE>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
Copy link
Contributor Author

@wind57 wind57 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not see it now, but there are a lot of build failures that I constantly get in the last few days on various pull requests.

They all have to do with a certain "hang", be that in surefire or failsafe plugins. I can't understand what happened so that we started to get them now, but what I see is that they freeze right after saying something like: "Surefire/Failsafe report directory is : ...."

I can only assume that is it somehow related to the directory of the reports and the fact that it might be accessed from multiple matrix instances at the same time, so I am proposing a small re-factor here.

Let's save test reports not in: target/surefire-reports, but in target/surefire-reports/<INDEX>, where INDEX is the current matrix step.

if you are running not on github actions, then INDEX=one. Semantically, this does not change anything in our pipeline.

<reportsDirectory>${project.build.directory}/failsafe-reports/${CURRENT_INSTANCE}</reportsDirectory>
</configuration>
</plugin>

<plugin>
Expand Down
Loading