jdaugherty opened a new pull request, #459:
URL: https://github.com/apache/grails-intellij-plugin/pull/459

   The 263.0.1 release build ([run 
41054401322](https://github.com/apache/grails-intellij-plugin/actions/runs/41054401322))
 failed in `Build & Test` with three test failures. The workflow at the tag 
still used `ubuntu-latest`, which GitHub now resolves to `ubuntu-26.04`; the 
same three tests had already failed on the October 21 CI push of the same 
commit, also on 26.04, while the last green run was on 24.04. Main was since 
pinned to `ubuntu-22.04` (27b98c7, 6a5884f) and [CI is green 
there](https://github.com/apache/grails-intellij-plugin/actions/runs/41061734521).
 This PR fixes the underlying cause so the build does not depend on what the 
runner image happens to ship.
   
   ### Cause
   
   1. **`GradleGrailsImportingTest[Gradle-4.6, Grails-3.3.1]`**: Gradle 4.6 
runs on Java 8 or 9 only. The `ubuntu-24.04` image shipped Temurin 8 under 
`/usr/lib/jvm`, where the IDE's `JavaHomeFinder` picks it up; `ubuntu-26.04` 
ships Temurin 11/17/21/25 only, so `GradleJvmResolver` threw `Cannot find JDK 
for the Gradle 4.6`.
   2. **`GspResourceTagTest.testMove` / `testMove2`**: a cascade from 1. The 
resolver throws inside `setUpInWriteAction()`, so 
`NioExternalSystemTestCase.setUp()` tears the fixture down from under the write 
action, `closeProject()` refuses (`Must not call closeProject() from under 
write action`), and the project leaks. Every later heavy test that moves a file 
then hits it: `Trying to get PSI for a file that is not included in the project 
model of this project … 
componentStore=/tmp/unitTest_importBasicGrailsProject_…/test.ipr`. The 
Community Edition job never saw this because the import test is 
`UltimateOnlyTest`.
   
   ### Fix
   
   - **Workflows**: the `Build & Test` (CI) and `Build & Stage Plugin ZIP` 
(release) jobs run `setup-java` for Temurin 8 and symlink it into 
`/usr/lib/jvm`, because `setup-java` installs under `/opt/hostedtoolcache`, 
which the finder does not scan. Verified on a scratch branch against the real 
`ubuntu-26.04` runner: without the step the three tests fail exactly as in the 
release run; with it, [they all 
pass](https://github.com/apache/grails-intellij-plugin/actions/runs/41064511126).
   - **Test framework**: `GradleImportingTestCase.setUpFixtures()` resolves the 
Gradle JVM before the project fixture exists, so a missing JDK fails only the 
import test instead of poisoning the rest of the JVM. 
`GradleImportingTestCaseJdkResolutionTest` pins this: it runs a probe subclass 
whose `requireJdkHome()` throws and asserts the exception surfaces unwrapped 
and no project stays open. It fails without the reordering (the exception 
arrives wrapped in the `RuntimeException` from 
`NioExternalSystemTestCase.kt:107`, and the project leaks).
   - **AGENTS.md**: documents the JDK 8 requirement and the leaked-project 
symptom.
   
   ### Restaging
   
   Main is already green on 22.04, so the release can be restaged once this is 
merged: abort `v263.0.1` with the `release-abort` workflow (the GitHub Release 
has no assets and the tag points at 047f6df), then publish the release again 
from main.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to