Skip to content

FIX: URGENT: Changes in Gradle 9 results into non-execution of custom test tasks.#3653

Merged
wadoon merged 1 commit intomainfrom
weigl/fixegradletests
Aug 15, 2025
Merged

FIX: URGENT: Changes in Gradle 9 results into non-execution of custom test tasks.#3653
wadoon merged 1 commit intomainfrom
weigl/fixegradletests

Conversation

@wadoon
Copy link
Member

@wadoon wadoon commented Aug 15, 2025

URGENT: Test results are not trustworthy anymore. Test classes are not executed for custom test tasks.

Gradle 9 changed the default configuration for test tasks. No prominent clue on the changelog was given. The Gradle wrapper is on version 9 since the last version bump.

The result is that custom test tasks like testProveRules, testRunAllProofs, ... are unable to find test classes anymore. Therefore, execution succeeds w/o error and w/o execution of the test cases. Hence, the PR checks are useless now.

This fix needs to be on main fast:

  1. It sets the two necessary paths
  2. To avoid regression, Gradle fails for all tests if no test cases were executed.

Manually tested.

@wadoon wadoon added this to the v2.12.4 milestone Aug 15, 2025
@wadoon wadoon requested review from Drodt and unp1 August 15, 2025 07:40
@wadoon wadoon self-assigned this Aug 15, 2025
@wadoon wadoon force-pushed the weigl/fixegradletests branch from c921ac7 to aa71510 Compare August 15, 2025 07:41
@wadoon wadoon added P:HIGH github_actions Pull requests that update GitHub Actions code labels Aug 15, 2025
@wadoon wadoon enabled auto-merge August 15, 2025 07:43
@mattulbrich
Copy link
Member

Recently, we spent more time fixing refactorings that made it to the master. It seems that we should be more restrictive with refactoring PRs and test them a lot more thoroughly before they enter the main branch.

In this case: Why did we upgrade to gradle 9 without this being noticed? Why did our review culture not catch this?

@Drodt
Copy link
Member

Drodt commented Aug 15, 2025

To be fair, the only way this was caught is that @unp1 noticed that the test times were suspiciously short. That is not something you would typically catch.

@wadoon wadoon added this pull request to the merge queue Aug 15, 2025
@mattulbrich
Copy link
Member

Nice catch, Richard :-)
Thanks for the fix, Alexander.

What was the reason to upgrade to Gradle 9? If it is necessary to update the setup: Perhaps such an infrastructural change should be a PR on its own where the submitter and the reviewer check that the infrastructure still behaves as expected?

Merged via the queue into main with commit a0fd768 Aug 15, 2025
35 checks passed
@wadoon wadoon deleted the weigl/fixegradletests branch August 15, 2025 11:17
@wadoon
Copy link
Member Author

wadoon commented Aug 15, 2025

We need to keep up with the Gradle version. The main reason is support/recognition of new JDK version, closing of vulnerabilities.

Normally, nothing bad happens. The changes are conservative, and breaking stuff is announced during the run. Breaking stuff, especially for plugin developers, is one of the largest complaints about Gradle.

I also read the changelog for Gradle 9, because I expected some breaking changes, but this breaking change is not mentioned. Therefore, I am happy that Richard and I independently noticed it (and this rather quickly).

A countermeasure is installed, so no regression should happen.

Also note that not finding test cases using the IntelliJ UI or --tests cli option was a typical problem of our build scripts back then. This came from the misconfiguration of JUnit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code 🐞 Bug P:HIGH

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants