You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/08/25 15:06:42 UTC

(grails-core) 01/02: Run the joint workflow against one MongoDB

This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch revert/16192-async-changes
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 592b38f6768af0ff2f8aae6c1b76ba1b61615875
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue Aug 25 11:02:15 2026 -0400

    Run the joint workflow against one MongoDB
    
    The build_grails job served the test-example applications from a mongo:8 service
    container on 27017, but named no version to the build, so the specifications that
    bring their own server took the default in AbstractMongoGrailsExtension instead:
    testcontainers started mongo:7.0.19 and the embedded server started V7_0. One job
    was testing three MongoDB releases at once, and which one a failure belonged to
    was not apparent from the job.
    
    The service container is gone rather than aligned, because nothing needs it.
    StartMongoGrailsIntegrationExtension probes localhost:27017 and starts a
    container of its own when nothing answers, so the service was only ever an
    optimisation; mongodbFunctional in gradle.yml runs the whole MongoDB suite with
    `check -PonlyMongodbTests` and no service container, and is a required upstream
    of publish. What is left brings its own server: a container for most
    specifications, an embedded replica set for the four that need transactions.
    
    -PmongodbContainerVersion=8.0 keeps those two on one release. This workflow
    validates Grails against a Groovy snapshot rather than against a range of
    MongoDB releases -- that coverage is the mongodb-version matrix in gradle.yml,
    which runs 7.0 and 8.0 -- so the latest supported line is the one to run here.
---
 .github/workflows/groovy-joint-workflow.yml | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml
index 5aba28cd7a..4fe2ad1e96 100644
--- a/.github/workflows/groovy-joint-workflow.yml
+++ b/.github/workflows/groovy-joint-workflow.yml
@@ -115,16 +115,6 @@ jobs:
           - shard_index: 2
             gradle_task: testShard
     runs-on: ubuntu-latest
-    services:
-      mongodb:
-        image: mongo:8
-        ports:
-          - 27017:27017
-        options: >-
-          --health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'"
-          --health-interval 10s
-          --health-timeout 5s
-          --health-retries 5
     steps:
       - name: "⚙️ Maximize build space"
         run: |
@@ -161,11 +151,9 @@ jobs:
         uses: actions/cache@v4
         with:
           # Separate from the dependency jars, for the reasons given on the same step in
-          # gradle.yml. This job names no version, so it gets the one
-          # AbstractMongoGrailsExtension.DEFAULT_MONGO_VERSION names; a change there costs one
-          # download, not a wrong binary, since this key has no other reader.
+          # gradle.yml. The version is the one -PmongodbContainerVersion asks for below.
           path: ~/.embedmongo
-          key: embedmongo-${{ runner.os }}-7.0
+          key: embedmongo-${{ runner.os }}-8.0
       - name: "🐘 Setup Gradle"
         uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
         with:
@@ -187,6 +175,11 @@ jobs:
         # That island intentionally pins Groovy 5 / Spock 2.4-groovy-5.0 via grails-micronaut-bom,
         # which is incompatible with the Groovy 4.x snapshot this job swaps in above.
         # See https://github.com/apache/grails-core/issues/15613.
+        #
+        # -PmongodbContainerVersion names the MongoDB the specifications bring themselves: a
+        # container for most of them, an embedded server for the ones that need a replica set. It
+        # keeps those two on the same release. This workflow validates Grails against a Groovy
+        # snapshot rather than against a range of MongoDB releases, which is gradle.yml's matrix.
         run: >
           ./gradlew ${{ matrix.gradle_task }}
           --continue
@@ -197,6 +190,7 @@ jobs:
           -PmaxTestParallel=3
           -PtestShardCount=3
           -PtestShardIndex=${{ matrix.shard_index }}
+          -PmongodbContainerVersion=8.0
         env:
           GRAILS_INCLUDE_MAVEN_LOCAL: true
       - name: "🗄️ Save dependency jar cache"