You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/05/28 16:29:28 UTC

[PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

jamesfredley opened a new pull request, #15687:
URL: https://github.com/apache/grails-core/pull/15687

   ## Step 1 (PR-H): grails-jacoco convention plugin + Codecov coverage
   
   Carved out of the Hibernate 7 Step 1 PR (#15654) per review feedback from @matrei that JaCoCo should be introduced in its own focused PR for the project to review/decide on independently.
   
   > **Depends on PR-G (#15686).** This PR targets the `feat/grails-code-analysis-plugin` branch so the diff shows only the JaCoCo-specific changes. PR-G provides the build-logic test scaffold and plugin registration block this layers on. Once PR-G merges, this can be retargeted to `8.0.x`.
   
   ### What this adds
   
   - **`grails-jacoco`** convention plugin: configures JaCoCo per subproject, wires `jacocoTestReport` after each `test`, and registers a root `jacocoAggregateReport` task that produces a single XML report for Codecov - handling the hibernate5/hibernate7 duplicate-class case (identical class names across the two variants).
   - Applies `grails-jacoco` to the same 96 subprojects as `grails-code-analysis`.
   - **`coverage.yml`** workflow that runs `jacocoAggregateReport` across grails-core and grails-gradle and uploads to Codecov via the existing `codecov.yml`.
   
   ### Notes
   
   - Folds in the standalone coverage work from #15668 (which can be closed in favour of this stack-aligned PR).
   - Verified with `cd build-logic && ../gradlew :build-logic:test`.
   
   Assisted-by: claude-code:claude-4.7-opus
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4605977139

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 97fa5234d66bfbd84e87ba794f3d444cb25b34a8
   ▶️ Tests:  8705 executed
   ⚪️ Checks: 36/36 completed
   
   ---
   _Learn more about TestLens at [testlens.app](https://testlens.app)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #15687:
URL: https://github.com/apache/grails-core/pull/15687


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4566198160

   <!-- Bito Reply -->
   The PR comments file appears to be empty (only the header row is present). I cannot analyze review discussions or suggestions without actual comment data.


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4571568101

   ## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/15687?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :warning: Please [upload](https://docs.codecov.com/docs/codecov-uploader) report for BASE (`feat/grails-code-analysis-plugin@20d73d8`). [Learn more](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#section-missing-base-commit) about missing BASE report.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-core/pull/15687/graphs/tree.svg?width=650&height=150&src=pr&token=qJrryhpk7u&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/grails-core/pull/15687?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                          Coverage Diff                          @@
   ##             feat/grails-code-analysis-plugin     #15687   +/-   ##
   =====================================================================
     Coverage                                    ?   49.0139%           
     Complexity                                  ?      16320           
   =====================================================================
     Files                                       ?       1998           
     Lines                                       ?      93853           
     Branches                                    ?      16352           
   =====================================================================
     Hits                                        ?      46001           
     Misses                                      ?      40623           
     Partials                                    ?       7229           
   ```
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4576834776

   Converted to **draft**. This PR is stacked on #15686 (eat/grails-code-analysis-plugin) and inherits its code-analysis jobs. I merged the updated base in, so it now carries the PMD 7.25.0 fix and the report-only CI config. It shouldn't leave draft until the violation-scope decision on #15686 is resolved - see https://github.com/apache/grails-core/pull/15686#issuecomment-4576811515 for the full breakdown (~5k PMD + 187 SpotBugs in Core alone).


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4577309795

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   | Check | Project/Task | Test | Runs |
   |---|---|---|---|
   | [CI / Functional Tests \(Java 21, indy\=false\)](https://github.com/apache/grails-core/actions/runs/26645623607/job/78530266314?pr=15687) | :grails-test-examples-scaffolding:integrationTest | UserControllerSpec > User list | ❌ |
   
   🏷️ Commit: 236d8a9eb78f706942c7aeb166aa02a2bb4a5602
   ▶️ Tests:  29142 executed
   🟡 Checks: 28/32 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>UserControllerSpec > User list</strong> (:grails-test-examples-scaffolding:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/26645623607/job/78530266314?pr=15687">CI / Functional Tests (Java 21, indy=false)</a>)</summary>
   
   ```
   geb.waiting.WaitTimeoutException: condition did not pass in 10 seconds (failed with exception)
   	at geb.waiting.Wait.waitFor(Wait.groovy:128)
   	at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:55)
   	at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:41)
   	at geb.Page.waitFor(Page.groovy:120)
   	at com.example.pages.LoginPage.login(LoginPage.groovy:39)
   	at com.example.UserControllerSpec.setup(UserControllerSpec.groovy:33)
   Caused by: Assertion failed: 
   
   title != pageTitle
   |     |  |
   |     |  'Please sign in'
   |     false
   'Please sign in'
   
   	at com.example.pages.LoginPage.login_closure1(LoginPage.groovy:39)
   	at com.example.pages.LoginPage.login_closure1(LoginPage.groovy)
   	at geb.waiting.Wait.waitFor(Wait.groovy:117)
   	... 5 more
   ```
   
   </details>
   
   ### Muted Tests
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 UserControllerSpec > User list <!-- uniqueId=[engine:spock]/[spec:com.example.UserControllerSpec]/[feature:$spock_feature_1_0] -->
   
   Reuse successful test results:
   
   🔲 ♻️ Only rerun the tests that failed or were muted before
   
   Click the checkbox to trigger a rerun:
   
   🔲 **Rerun jobs**
   
   ---
   _Learn more about TestLens at [testlens.app](https://testlens.app)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4596579986

   https://github.com/apache/grails-core/pull/15686 is moving back to original scope and then this PR is back in play.  


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4589382541

   ## ✅ All tests passed ✅
   
   🏷️ Commit: cea97996ba93da5deae1388663ef993f9f2e6078
   ▶️ Tests:  18542 executed
   ⚪️ Checks: 36/36 completed
   
   ---
   _Learn more about TestLens at [testlens.app](https://testlens.app)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#discussion_r3319291757


##########
.github/workflows/coverage.yml:
##########
@@ -0,0 +1,117 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "Coverage"
+
+on:
+  push:
+    branches:
+      - '[0-9]+.[0-9]+.x'
+      - '8.0.x-hibernate7.*'
+  pull_request:
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+  coverage-core:
+    name: "Coverage - grails-core (${{ matrix.os }})"
+    if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-24.04, macos-latest, windows-latest]
+    runs-on: ${{ matrix.os }}
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v6
+      - name: "☕️ Setup JDK"
+        uses: actions/setup-java@v4
+        with:
+          distribution: liberica
+          java-version: 21
+      - name: "🐘 Setup Gradle"
+        uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
+        with:
+          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+      - name: "🌡️ Run tests with coverage"
+        run: >
+          ./gradlew jacocoAggregateReport
+          --continue
+          --stacktrace
+          -PskipCodeStyle
+      - name: "📤 Upload coverage artifact"
+        uses: actions/upload-artifact@v7.0.1
+        with:
+          name: coverage-core-${{ matrix.os }}
+          path: build/reports/jacoco/aggregate/jacocoAggregateReport.xml
+          if-no-files-found: warn
+
+  coverage-gradle:
+    name: "Coverage - grails-gradle (${{ matrix.os }})"
+    if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-24.04, macos-latest, windows-latest]

Review Comment:
   Running the full coverage suite across three operating systems (`ubuntu-24.04`, `macos-latest`, `windows-latest`) for both `coverage-core` and `coverage-gradle` produces six artifacts that all get uploaded together to Codecov via `directory: coverage-reports`. Coverage data is largely OS-independent, so this primarily multiplies CI cost (and macOS/Windows minutes are billed at higher rates) without producing meaningfully different coverage signal. Consider restricting the coverage matrix to a single OS (e.g. `ubuntu-24.04`) and keeping multi-OS execution to the existing `gradle.yml` test workflow.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#discussion_r3319919639


##########
.github/workflows/coverage.yml:
##########
@@ -0,0 +1,117 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "Coverage"
+
+on:
+  push:
+    branches:
+      - '[0-9]+.[0-9]+.x'
+      - '8.0.x-hibernate7.*'
+  pull_request:
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+  coverage-core:
+    name: "Coverage - grails-core (${{ matrix.os }})"
+    if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-24.04, macos-latest, windows-latest]
+    runs-on: ${{ matrix.os }}
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v6
+      - name: "☕️ Setup JDK"
+        uses: actions/setup-java@v4
+        with:
+          distribution: liberica
+          java-version: 21
+      - name: "🐘 Setup Gradle"
+        uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
+        with:
+          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+      - name: "🌡️ Run tests with coverage"
+        run: >
+          ./gradlew jacocoAggregateReport
+          --continue
+          --stacktrace
+          -PskipCodeStyle
+      - name: "📤 Upload coverage artifact"
+        uses: actions/upload-artifact@v7.0.1
+        with:
+          name: coverage-core-${{ matrix.os }}
+          path: build/reports/jacoco/aggregate/jacocoAggregateReport.xml
+          if-no-files-found: warn
+
+  coverage-gradle:
+    name: "Coverage - grails-gradle (${{ matrix.os }})"
+    if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-24.04, macos-latest, windows-latest]

Review Comment:
   Good catch - restricted both the coverage-core and coverage-gradle matrices to a single OS (ubuntu-24.04). Coverage is largely OS-independent, so a single Linux leg is sufficient; multi-OS test execution remains in gradle.yml.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#issuecomment-4577030670

   Deferred for now, see https://github.com/apache/grails-core/pull/15686#issuecomment-4576811515


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Step 1 (PR-H): Add grails-jacoco convention plugin + Codecov coverage (depends on PR-G) [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15687:
URL: https://github.com/apache/grails-core/pull/15687#discussion_r3343240014


##########
grails-async/core/build.gradle:
##########
@@ -27,7 +27,6 @@ plugins {
     id 'org.apache.grails.buildsrc.publish'
     id 'org.apache.grails.buildsrc.sbom'
     id 'org.apache.grails.gradle.grails-code-style'
-    id 'org.apache.grails.gradle.grails-code-analysis'

Review Comment:
   @jamesfredley looks like a bad merge? 



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org