You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jdaugherty (via GitHub)" <gi...@apache.org> on 2026/10/03 00:37:10 UTC

[PR] Stage the documentation as a voted distribution [grails-core]

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

   The release built the documentation while staging and then rebuilt it after the vote to publish it. The documentation is now staged with the other distributions as apache-grails-<version>-docs.zip, so it is voted on and the post-vote job publishes that zip instead of building it again.
   
   - grails-doc:dist produces apache-grails-<version>-docs.zip with LICENSE, NOTICE and licenses/ for the bundled third-party stylesheets and fonts, and the documentation under html/
   - The release signs and checksums the zip, adds it to the GitHub release and uploads it to dist/dev/grails/core/<version>/distribution
   - The Publish Documentation job downloads the voted zip from dist.apache.org, verifies its checksum and signature, and publishes it
   - The documentation rebuilds byte-for-byte from the source distribution: the source zip carries the git tags behind the version dropdown as GIT_TAGS, and the release commit records the target branch as githubBranch
   - verify.sh checks the documentation distribution and that it is reproducible from the source distribution
   
   This will help address the time it takes to publish docs since we will no longer build them twice.


-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   This is a proposal that should be discussed in the weekly.  I don't want this to block 8.0.0 due to an issue. I am suggesting we merge this after the 8.0.0 release.


-- 
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] Stage the documentation as a voted distribution [grails-core]

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


##########
.github/workflows/release.yml:
##########
@@ -594,33 +640,36 @@ jobs:
           sudo rm -rf /opt/hostedtoolcache/CodeQL
 
           df -h
-      - name: "📥 Checkout repository"
-        uses: actions/checkout@v7.0.1
-        with:
-          fetch-depth: 0 # needed for docs release dropdown, (fetch-tags: true with fetch-depth: 1 does not work; https://github.com/actions/checkout/issues/1471)
-          filter: tree:0 # limit size, keeping tags for docs release dropdown
-          token: ${{ secrets.GITHUB_TOKEN }}
-          ref: ${{ env.TAG }}
-      - name: "📅 Ensure Common Build Date" # to ensure a reproducible build
-        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
-      - name: "☕️ Setup JDK"
-        uses: actions/setup-java@v6.0.1
-        with:
-          distribution: ${{ env.JAVA_DISTRIBUTION }}
-          java-version: ${{ env.JAVA_VERSION }}
-      - name: "🐘 Setup Gradle"
-        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
-        with:
-          cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-      - name: "📖 Generate Documentation"
-        run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+      - name: "📥 Download the voted documentation distribution"
+        # The vote approved this exact ZIP, so it is published as-is instead of rebuilt. It is in
+        # the release area once releaseDistributions.sh has promoted it, and in dev until then.
+        run: |
+          DOCS_ZIP="${DIST_NAME}-${VERSION}-docs.zip"
+          for area in release dev; do
+            base_url="https://dist.apache.org/repos/dist/${area}/${SVN_PROJECT}/${SVN_FOLDER}/${VERSION}/distribution"
+            if curl -f -s -L -O "${base_url}/${DOCS_ZIP}"; then
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.sha512"
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.asc"
+              echo "Downloaded ${DOCS_ZIP} from ${base_url}"
+              exit 0
+            fi
+          done
+          echo "❌ ${DOCS_ZIP} was found in neither the release nor the dev distribution area" >&2
+          exit 1
+      - name: "🔐 Verify the documentation distribution"
+        run: |
+          sha512sum -c "${DIST_NAME}-${VERSION}-docs.zip.sha512"
+          export GNUPGHOME="$(mktemp -d)"
+          curl -f -L "https://dist.apache.org/repos/dist/release/${SVN_PROJECT}/KEYS" | gpg --batch --import
+          gpg --batch --verify "${DIST_NAME}-${VERSION}-docs.zip.asc" "${DIST_NAME}-${VERSION}-docs.zip"
+      - name: "📦 Extract the documentation distribution"
+        run: unzip -q "${DIST_NAME}-${VERSION}-docs.zip"
       - name: "🚀 Publish to GitHub Pages"
         uses: apache/grails-github-actions/deploy-github-pages@asf
         env:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} # To be able to push to grails-website repo
           GRADLE_PUBLISH_RELEASE: 'true'
-          SOURCE_FOLDER: grails-doc/build/docs
+          SOURCE_FOLDER: ${{ env.DIST_NAME }}-${{ env.VERSION }}-docs/html

Review Comment:
   @jdaugherty you are correct, my agent was being over zealous on ASF rules.   



-- 
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] Stage the documentation as a voted distribution [grails-core]

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


-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   This PR does not need merged for 8.0.0, but longer term it will help speed up our publishes.


-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   ## 🚨 All tests passed but jobs failed 🚨
   
   ### Failed Jobs without Test Failures
   
   ❌ [CI / Build Gradle Plugins \(25\)](https://github.com/apache/grails-core/actions/runs/37082820453/job/111086831623?pr=16486)
   
   🏷️ Commit: a07b34dde8fae9f452fe737169cc5215bb6020ac
   ▶️ Tests:  13 executed
   🟡 Checks: 3/77 completed
   
   ### Rerun Controls
   
   Click the checkbox to trigger a rerun:
   
   🔲 **Rerun jobs**
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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] Stage the documentation as a voted distribution [grails-core]

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


##########
.github/workflows/release.yml:
##########
@@ -594,33 +640,36 @@ jobs:
           sudo rm -rf /opt/hostedtoolcache/CodeQL
 
           df -h
-      - name: "📥 Checkout repository"
-        uses: actions/checkout@v7.0.1
-        with:
-          fetch-depth: 0 # needed for docs release dropdown, (fetch-tags: true with fetch-depth: 1 does not work; https://github.com/actions/checkout/issues/1471)
-          filter: tree:0 # limit size, keeping tags for docs release dropdown
-          token: ${{ secrets.GITHUB_TOKEN }}
-          ref: ${{ env.TAG }}
-      - name: "📅 Ensure Common Build Date" # to ensure a reproducible build
-        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
-      - name: "☕️ Setup JDK"
-        uses: actions/setup-java@v6.0.1
-        with:
-          distribution: ${{ env.JAVA_DISTRIBUTION }}
-          java-version: ${{ env.JAVA_VERSION }}
-      - name: "🐘 Setup Gradle"
-        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
-        with:
-          cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-      - name: "📖 Generate Documentation"
-        run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+      - name: "📥 Download the voted documentation distribution"
+        # The vote approved this exact ZIP, so it is published as-is instead of rebuilt. It is in
+        # the release area once releaseDistributions.sh has promoted it, and in dev until then.
+        run: |
+          DOCS_ZIP="${DIST_NAME}-${VERSION}-docs.zip"
+          for area in release dev; do
+            base_url="https://dist.apache.org/repos/dist/${area}/${SVN_PROJECT}/${SVN_FOLDER}/${VERSION}/distribution"
+            if curl -f -s -L -O "${base_url}/${DOCS_ZIP}"; then
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.sha512"
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.asc"
+              echo "Downloaded ${DOCS_ZIP} from ${base_url}"
+              exit 0
+            fi
+          done
+          echo "❌ ${DOCS_ZIP} was found in neither the release nor the dev distribution area" >&2
+          exit 1
+      - name: "🔐 Verify the documentation distribution"
+        run: |
+          sha512sum -c "${DIST_NAME}-${VERSION}-docs.zip.sha512"
+          export GNUPGHOME="$(mktemp -d)"
+          curl -f -L "https://dist.apache.org/repos/dist/release/${SVN_PROJECT}/KEYS" | gpg --batch --import
+          gpg --batch --verify "${DIST_NAME}-${VERSION}-docs.zip.asc" "${DIST_NAME}-${VERSION}-docs.zip"
+      - name: "📦 Extract the documentation distribution"
+        run: unzip -q "${DIST_NAME}-${VERSION}-docs.zip"
       - name: "🚀 Publish to GitHub Pages"
         uses: apache/grails-github-actions/deploy-github-pages@asf
         env:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} # To be able to push to grails-website repo
           GRADLE_PUBLISH_RELEASE: 'true'
-          SOURCE_FOLDER: grails-doc/build/docs
+          SOURCE_FOLDER: ${{ env.DIST_NAME }}-${{ env.VERSION }}-docs/html

Review Comment:
   @jamesfredley I guess i'm confused, the existing documentation website has this issue today, no?  https://github.com/apache/grails-website/tree/asf-site-production/docs/8.0.0-RC2 



-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   ## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/16486?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.
   :white_check_mark: Project coverage is 59.2808%. Comparing base ([`ff1fc7e`](https://app.codecov.io/gh/apache/grails-core/commit/ff1fc7ec984a7d82816bd458f7327f4c752cdb79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a07b34d`](https://app.codecov.io/gh/apache/grails-core/commit/a07b34dde8fae9f452fe737169cc5215bb6020ac?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on 8.0.x.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-core/pull/16486/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/16486?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##                8.0.x     #16486        +/-   ##
   ==================================================
   - Coverage     59.2882%   59.2808%   -0.0074%     
   + Complexity      24772      24770         -2     
   ==================================================
     Files            2170       2170                
     Lines          108121     108121                
     Branches        19709      19709                
   ==================================================
   - Hits            64103      64095         -8     
   - Misses          35143      35148         +5     
   - Partials         8875       8878         +3     
   ```
   [see 4 files with indirect coverage changes](https://app.codecov.io/gh/apache/grails-core/pull/16486/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </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] Stage the documentation as a voted distribution [grails-core]

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


##########
RELEASE.md:
##########
@@ -339,8 +380,14 @@ The bundle is `grails-forge-web-netty/build/distributions/grails-forge-web-netty
 
 ### Publish `grails-core` documentation
 
-Open the release workflow in `grails-core` and approve the `Publish Documentation` step. Wait until finished, and a
-workflow should eventually kick off in `grails-doc` to publish to https://github.com/apache/grails-website/tree/asf-site-production/docs and https://grails.apache.org/docs/.
+Open the release workflow in `grails-core` and approve the `Publish Documentation` step. The step does not rebuild the
+documentation. It downloads the voted `apache-grails-<version>-docs.zip` from dist.apache.org, verifies its checksum and
+signature, and publishes the extracted `html` folder to https://github.com/apache/grails-website/tree/asf-site-production/docs,
+which serves https://grails.apache.org/docs/. It takes the zip from the `release` area once the distributions have been
+moved, and from the `dev` area until then.
+
+To correct the documentation of a version that is already released, run the `Release - Publish Documentation` workflow

Review Comment:
   Fixed in ddc6af6409. `Release - Publish Documentation` now fails before building unless the branch's `projectVersion` equals the requested version, and RELEASE.md says to run corrections from a branch created from the release tag. That route stays separate from the voted-zip publish in `release.yml`.



##########
.github/scripts/setReleasedGrailsVersion.sh:
##########
@@ -24,4 +24,11 @@ set -e
 echo "Setting new version in GrailsUtilsTests.java: ${RELEASE_VERSION}"
 sed -i "s/assertEquals(\".*$/assertEquals(\"${RELEASE_VERSION}\", GrailsUtil.getGrailsVersion());/" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
 sed -n "/assertEquals(\".*/p" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
-git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
\ No newline at end of file
+git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
+
+# The documentation links each page to its source on this branch. Record the branch in the
+# release commit so a build from the source distribution renders the same links.
+echo "Setting githubBranch in gradle.properties: ${TARGET_BRANCH:?TARGET_BRANCH must be set}"
+sed -i "s/^githubBranch=.*$/githubBranch=${TARGET_BRANCH}/" "${GITHUB_WORKSPACE}/gradle.properties"

Review Comment:
   Fixed in ddc6af6409. The substitution uses `:`, which git does not allow in a branch name, and the script fails unless `gradle.properties` ends up with `githubBranch=<TARGET_BRANCH>`.



##########
grails-doc/build.gradle:
##########
@@ -757,8 +763,18 @@ docsTask.configure { Sync it ->
 }
 
 tasks.register('dist', Zip).configure { Zip it ->
-    it.dependsOn(docsTask)
-    it.from(outputDir)
+    it.archiveBaseName = 'apache-grails'
+    it.archiveClassifier = 'docs'
+    it.into("apache-grails-${project.version}-docs") { CopySpec distribution ->
+        distribution.from(project.layout.projectDirectory.dir('distribution-artifacts')) { CopySpec legal ->
+            legal.filesMatching('NOTICE') { FileCopyDetails notice ->

Review Comment:
   Fixed in ddc6af6409. `dist` declares the year with `inputs.property('noticeYear', …)`. Before the change, a build with a different `SOURCE_DATE_EPOCH` year left `dist` UP-TO-DATE with the old NOTICE; it now reruns.



-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   ## ✅ All tests passed ✅
   
   🏷️ Commit: ddc6af640921b0a45f30088e80c1fb4da9b6627a
   ▶️ Tests:  94131 executed
   ⚪️ Checks: 92/92 completed
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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] Stage the documentation as a voted distribution [grails-core]

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


##########
RELEASE.md:
##########
@@ -339,8 +380,14 @@ The bundle is `grails-forge-web-netty/build/distributions/grails-forge-web-netty
 
 ### Publish `grails-core` documentation
 
-Open the release workflow in `grails-core` and approve the `Publish Documentation` step. Wait until finished, and a
-workflow should eventually kick off in `grails-doc` to publish to https://github.com/apache/grails-website/tree/asf-site-production/docs and https://grails.apache.org/docs/.
+Open the release workflow in `grails-core` and approve the `Publish Documentation` step. The step does not rebuild the
+documentation. It downloads the voted `apache-grails-<version>-docs.zip` from dist.apache.org, verifies its checksum and
+signature, and publishes the extracted `html` folder to https://github.com/apache/grails-website/tree/asf-site-production/docs,
+which serves https://grails.apache.org/docs/. It takes the zip from the `release` area once the distributions have been
+moved, and from the `dev` area until then.
+
+To correct the documentation of a version that is already released, run the `Release - Publish Documentation` workflow

Review Comment:
   This correction path still rebuilds, and it can publish the wrong version. `Release - Publish Documentation` (`.github/workflows/release-publish-docs.yml:71`) runs `./gradlew grails-doc:build -PgithubBranch=...` and does not set the Gradle project version. `VERSION` only steers the deploy action. A run from current `8.0.x` builds `8.0.0-SNAPSHOT` documentation and can publish it under the requested release version, including the wrong headings and version-dependent links.
   
   Do not document this workflow as a safe correction until it refuses to deploy unless the built version equals the requested version. Build corrections from the intended release sources with the version aligned, and keep that route distinct from publishing the voted zip.



##########
.github/workflows/release.yml:
##########
@@ -594,33 +640,36 @@ jobs:
           sudo rm -rf /opt/hostedtoolcache/CodeQL
 
           df -h
-      - name: "📥 Checkout repository"
-        uses: actions/checkout@v7.0.1
-        with:
-          fetch-depth: 0 # needed for docs release dropdown, (fetch-tags: true with fetch-depth: 1 does not work; https://github.com/actions/checkout/issues/1471)
-          filter: tree:0 # limit size, keeping tags for docs release dropdown
-          token: ${{ secrets.GITHUB_TOKEN }}
-          ref: ${{ env.TAG }}
-      - name: "📅 Ensure Common Build Date" # to ensure a reproducible build
-        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
-      - name: "☕️ Setup JDK"
-        uses: actions/setup-java@v6.0.1
-        with:
-          distribution: ${{ env.JAVA_DISTRIBUTION }}
-          java-version: ${{ env.JAVA_VERSION }}
-      - name: "🐘 Setup Gradle"
-        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
-        with:
-          cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-      - name: "📖 Generate Documentation"
-        run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+      - name: "📥 Download the voted documentation distribution"
+        # The vote approved this exact ZIP, so it is published as-is instead of rebuilt. It is in
+        # the release area once releaseDistributions.sh has promoted it, and in dev until then.
+        run: |
+          DOCS_ZIP="${DIST_NAME}-${VERSION}-docs.zip"
+          for area in release dev; do
+            base_url="https://dist.apache.org/repos/dist/${area}/${SVN_PROJECT}/${SVN_FOLDER}/${VERSION}/distribution"
+            if curl -f -s -L -O "${base_url}/${DOCS_ZIP}"; then
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.sha512"
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.asc"
+              echo "Downloaded ${DOCS_ZIP} from ${base_url}"
+              exit 0
+            fi
+          done
+          echo "❌ ${DOCS_ZIP} was found in neither the release nor the dev distribution area" >&2
+          exit 1
+      - name: "🔐 Verify the documentation distribution"
+        run: |
+          sha512sum -c "${DIST_NAME}-${VERSION}-docs.zip.sha512"
+          export GNUPGHOME="$(mktemp -d)"
+          curl -f -L "https://dist.apache.org/repos/dist/release/${SVN_PROJECT}/KEYS" | gpg --batch --import
+          gpg --batch --verify "${DIST_NAME}-${VERSION}-docs.zip.asc" "${DIST_NAME}-${VERSION}-docs.zip"
+      - name: "📦 Extract the documentation distribution"
+        run: unzip -q "${DIST_NAME}-${VERSION}-docs.zip"
       - name: "🚀 Publish to GitHub Pages"
         uses: apache/grails-github-actions/deploy-github-pages@asf
         env:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} # To be able to push to grails-website repo
           GRADLE_PUBLISH_RELEASE: 'true'
-          SOURCE_FOLDER: grails-doc/build/docs
+          SOURCE_FOLDER: ${{ env.DIST_NAME }}-${{ env.VERSION }}-docs/html

Review Comment:
   The voted zip places `LICENSE`, `NOTICE`, and `licenses/` beside `html/` (`grails-doc/build.gradle:769`). This step copies only `SOURCE_FOLDER`, which is now the `html/` directory, so the site redistributes the bundled MIT stylesheets and OFL fonts without those license texts. The stylesheet headers link to a license rather than including the full terms, and the bundled Font Awesome SVG has empty metadata.
   
   The zip itself is licensed correctly. Deploy the voted legal files alongside the HTML, with the `licenses/` references still resolving, or include an equivalent legal set in the website payload before the vote.



##########
.github/scripts/setReleasedGrailsVersion.sh:
##########
@@ -24,4 +24,11 @@ set -e
 echo "Setting new version in GrailsUtilsTests.java: ${RELEASE_VERSION}"
 sed -i "s/assertEquals(\".*$/assertEquals(\"${RELEASE_VERSION}\", GrailsUtil.getGrailsVersion());/" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
 sed -n "/assertEquals(\".*/p" "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
-git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
\ No newline at end of file
+git add "${GITHUB_WORKSPACE}/grails-core/src/test/groovy/grails/util/GrailsUtilTests.java"
+
+# The documentation links each page to its source on this branch. Record the branch in the
+# release commit so a build from the source distribution renders the same links.
+echo "Setting githubBranch in gradle.properties: ${TARGET_BRANCH:?TARGET_BRANCH must be set}"
+sed -i "s/^githubBranch=.*$/githubBranch=${TARGET_BRANCH}/" "${GITHUB_WORKSPACE}/gradle.properties"

Review Comment:
   Non-blocking. The `/` delimiter fails for a valid branch that contains `/` (`sed: unknown option to 's'`), and `set -e` then aborts the pre-release step. If `githubBranch=` is missing or formatted differently, the substitution matches nothing and the step still succeeds. Current `githubBranch=8.0.x` works, so the ordinary release path is fine.
   
   Use a delimiter that cannot appear in a branch name, and fail if the resulting value is not `TARGET_BRANCH`.



##########
grails-doc/build.gradle:
##########
@@ -757,8 +763,18 @@ docsTask.configure { Sync it ->
 }
 
 tasks.register('dist', Zip).configure { Zip it ->
-    it.dependsOn(docsTask)
-    it.from(outputDir)
+    it.archiveBaseName = 'apache-grails'
+    it.archiveClassifier = 'docs'
+    it.into("apache-grails-${project.version}-docs") { CopySpec distribution ->
+        distribution.from(project.layout.projectDirectory.dir('distribution-artifacts')) { CopySpec legal ->
+            legal.filesMatching('NOTICE') { FileCopyDetails notice ->

Review Comment:
   Non-blocking. The `NOTICE` year comes from `rootProject.ext.buildDate.year`, but that value is not registered as a task input. An existing checkout that rebuilds the same documentation with a `SOURCE_DATE_EPOCH` from a different year can leave `dist` UP-TO-DATE and keep the previous year. A clean release runner and a fresh source extract do not hit this.
   
   Register the year with `inputs.property`, the same way other expanded filter inputs are declared.



-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   @matrei thanks for the thorough review. Addressed in 3c5bd47ba6:
   
   1. `release-publish-docs.yml` no longer passes `-PgithubBranch`, and the unused `TARGET_BRANCH` env is gone. The build takes `githubBranch` from the release commit's `gradle.properties`, so a corrected build links to the same branch as the voted zip. RELEASE.md now says so.
   2. `release-verify.yml` now allows 180 minutes instead of 120.
   
   Smaller points:
   - Removed "Maximize build space" from the `docs` job. On RC1 that step took 90 seconds and freed about 15 GB of a 145 GB disk (104 GB free afterwards), so the website checkout fits without it. The correction workflow keeps it because it still builds.
   - `reset-verify.sh` now removes `apache-grails-<version>-docs`.
   - The vote email now gives the docs zip's size, computed in the `upload` job, e.g. `apache-grails-8.0.0-docs.zip (58MB)`.
   


-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   Follow-up in ee31439a4f: the release no longer rewrites `githubBranch`. Every 7.2 tag has `githubBranch=7.1.x` because the property wasn't updated when 7.2.x was cut, and a rewrite would have hidden that. The `publish` job now fails right after checkout unless the release targets its version's `X.Y.x` branch (ignoring the `refs/heads/` prefix GitHub recorded for several 7.0.x releases) and `gradle.properties` already sets `githubBranch` to it. Run against every 7.x/8.x release tag, it passes all of them except the 7.2 releases and two 7.0.0 milestones that predate the property. The correction workflow checks `githubBranch` the same way.
   


-- 
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] Stage the documentation as a voted distribution [grails-core]

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


##########
.github/workflows/release.yml:
##########
@@ -594,33 +640,36 @@ jobs:
           sudo rm -rf /opt/hostedtoolcache/CodeQL
 
           df -h
-      - name: "📥 Checkout repository"
-        uses: actions/checkout@v7.0.1
-        with:
-          fetch-depth: 0 # needed for docs release dropdown, (fetch-tags: true with fetch-depth: 1 does not work; https://github.com/actions/checkout/issues/1471)
-          filter: tree:0 # limit size, keeping tags for docs release dropdown
-          token: ${{ secrets.GITHUB_TOKEN }}
-          ref: ${{ env.TAG }}
-      - name: "📅 Ensure Common Build Date" # to ensure a reproducible build
-        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
-      - name: "☕️ Setup JDK"
-        uses: actions/setup-java@v6.0.1
-        with:
-          distribution: ${{ env.JAVA_DISTRIBUTION }}
-          java-version: ${{ env.JAVA_VERSION }}
-      - name: "🐘 Setup Gradle"
-        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
-        with:
-          cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-      - name: "📖 Generate Documentation"
-        run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+      - name: "📥 Download the voted documentation distribution"
+        # The vote approved this exact ZIP, so it is published as-is instead of rebuilt. It is in
+        # the release area once releaseDistributions.sh has promoted it, and in dev until then.
+        run: |
+          DOCS_ZIP="${DIST_NAME}-${VERSION}-docs.zip"
+          for area in release dev; do
+            base_url="https://dist.apache.org/repos/dist/${area}/${SVN_PROJECT}/${SVN_FOLDER}/${VERSION}/distribution"
+            if curl -f -s -L -O "${base_url}/${DOCS_ZIP}"; then
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.sha512"
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.asc"
+              echo "Downloaded ${DOCS_ZIP} from ${base_url}"
+              exit 0
+            fi
+          done
+          echo "❌ ${DOCS_ZIP} was found in neither the release nor the dev distribution area" >&2
+          exit 1
+      - name: "🔐 Verify the documentation distribution"
+        run: |
+          sha512sum -c "${DIST_NAME}-${VERSION}-docs.zip.sha512"
+          export GNUPGHOME="$(mktemp -d)"
+          curl -f -L "https://dist.apache.org/repos/dist/release/${SVN_PROJECT}/KEYS" | gpg --batch --import
+          gpg --batch --verify "${DIST_NAME}-${VERSION}-docs.zip.asc" "${DIST_NAME}-${VERSION}-docs.zip"
+      - name: "📦 Extract the documentation distribution"
+        run: unzip -q "${DIST_NAME}-${VERSION}-docs.zip"
       - name: "🚀 Publish to GitHub Pages"
         uses: apache/grails-github-actions/deploy-github-pages@asf
         env:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} # To be able to push to grails-website repo
           GRADLE_PUBLISH_RELEASE: 'true'
-          SOURCE_FOLDER: grails-doc/build/docs
+          SOURCE_FOLDER: ${{ env.DIST_NAME }}-${{ env.VERSION }}-docs/html

Review Comment:
   Yes. `docs/8.0.0-RC2` is the HTML tree only. There is no `LICENSE`, `NOTICE`, or `licenses/` directory there, and the Font Awesome files are already in `fonts/`. The previous publish step copied `grails-doc/build/docs`, which is that same tree. This step copies `apache-grails-<version>-docs/html`, so the website payload does not change.
   
   The new legal files belong at the root of the voted zip, which is what this change does. They were never part of the website payload, so this is not a regression. Resolving this thread.



-- 
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] Stage the documentation as a voted distribution [grails-core]

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


##########
.github/workflows/release.yml:
##########
@@ -594,33 +640,36 @@ jobs:
           sudo rm -rf /opt/hostedtoolcache/CodeQL
 
           df -h
-      - name: "📥 Checkout repository"
-        uses: actions/checkout@v7.0.1
-        with:
-          fetch-depth: 0 # needed for docs release dropdown, (fetch-tags: true with fetch-depth: 1 does not work; https://github.com/actions/checkout/issues/1471)
-          filter: tree:0 # limit size, keeping tags for docs release dropdown
-          token: ${{ secrets.GITHUB_TOKEN }}
-          ref: ${{ env.TAG }}
-      - name: "📅 Ensure Common Build Date" # to ensure a reproducible build
-        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
-      - name: "☕️ Setup JDK"
-        uses: actions/setup-java@v6.0.1
-        with:
-          distribution: ${{ env.JAVA_DISTRIBUTION }}
-          java-version: ${{ env.JAVA_VERSION }}
-      - name: "🐘 Setup Gradle"
-        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
-        with:
-          cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-      - name: "📖 Generate Documentation"
-        run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+      - name: "📥 Download the voted documentation distribution"
+        # The vote approved this exact ZIP, so it is published as-is instead of rebuilt. It is in
+        # the release area once releaseDistributions.sh has promoted it, and in dev until then.
+        run: |
+          DOCS_ZIP="${DIST_NAME}-${VERSION}-docs.zip"
+          for area in release dev; do
+            base_url="https://dist.apache.org/repos/dist/${area}/${SVN_PROJECT}/${SVN_FOLDER}/${VERSION}/distribution"
+            if curl -f -s -L -O "${base_url}/${DOCS_ZIP}"; then
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.sha512"
+              curl -f -L -O "${base_url}/${DOCS_ZIP}.asc"
+              echo "Downloaded ${DOCS_ZIP} from ${base_url}"
+              exit 0
+            fi
+          done
+          echo "❌ ${DOCS_ZIP} was found in neither the release nor the dev distribution area" >&2
+          exit 1
+      - name: "🔐 Verify the documentation distribution"
+        run: |
+          sha512sum -c "${DIST_NAME}-${VERSION}-docs.zip.sha512"
+          export GNUPGHOME="$(mktemp -d)"
+          curl -f -L "https://dist.apache.org/repos/dist/release/${SVN_PROJECT}/KEYS" | gpg --batch --import
+          gpg --batch --verify "${DIST_NAME}-${VERSION}-docs.zip.asc" "${DIST_NAME}-${VERSION}-docs.zip"
+      - name: "📦 Extract the documentation distribution"
+        run: unzip -q "${DIST_NAME}-${VERSION}-docs.zip"
       - name: "🚀 Publish to GitHub Pages"
         uses: apache/grails-github-actions/deploy-github-pages@asf
         env:
           GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} # To be able to push to grails-website repo
           GRADLE_PUBLISH_RELEASE: 'true'
-          SOURCE_FOLDER: grails-doc/build/docs
+          SOURCE_FOLDER: ${{ env.DIST_NAME }}-${{ env.VERSION }}-docs/html

Review Comment:
   my intent of this change was to use the zip to stage the website and then document the licenses at the root.  The license issues you mention today are already a problem with the docs, no? 



-- 
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] Stage the documentation as a voted distribution [grails-core]

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

   ## 🚨 All tests passed but jobs failed 🚨
   
   ### Failed Jobs without Test Failures
   
   ❌ [CI / Build Grails-Core \(Ubuntu JDK 21\)](https://github.com/apache/grails-core/actions/runs/37325530767/job/111815907767?pr=16486)
   
   🏷️ Commit: 42fbeb7e9391c13a4e60cbd806018b7d4043f8fa
   ▶️ Tests:  5637 executed
   🟡 Checks: 25/87 completed
   
   ### Rerun Controls
   
   Click the checkbox to trigger a rerun:
   
   🔲 **Rerun jobs**
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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