Copilot commented on code in PR #16305:
URL: https://github.com/apache/grails-core/pull/16305#discussion_r3920086355


##########
.github/workflows/release.yml:
##########
@@ -633,20 +633,14 @@ jobs:
         run: |
           echo "::group::Manual Grails Forge deployment"
           echo "Deploy Forge via 
https://github.com/apache/grails-core/actions/workflows/forge-deploy-aws.yml";
-          echo "Use workflow from the maintenance branch. Choose slot latest, 
snapshot, next, prev, or prev-snapshot."
+          echo "Use workflow from the maintenance branch. Choose slot latest, 
snapshot, next, next-snapshot, prev, prev-snapshot, or older."
           echo "Do not run this workflow from a historical git tag."
           echo "::endgroup::"
   docs:
     environment: docs
     name: "VOTE SUCCEEDED - Publish Documentation"
     needs: [ publish, source, upload, release ]
     runs-on: ubuntu-24.04

Review Comment:
   The docs publish job no longer has a concurrency group. Since this job 
pushes to the shared apache/grails-website repository/branch, concurrent runs 
from different branches or releases can race and fail with push conflicts or 
publish inconsistent site content. Reintroduce the static concurrency group to 
serialize documentation publishes.



##########
grails-doc/build.gradle:
##########
@@ -118,13 +130,32 @@ combinedGroovydoc.configure { Groovydoc gdoc ->
     gdoc.source(project.files(allSourceDirs))
     gdoc.ext.groovydocSourceDirs = allSourceDirs
 
-    gdoc.classpath = files(sources.collect { SourceSet it -> 
it.compileClasspath.filter(File.&isDirectory) }.flatten().unique())
+    // The full compile classpath, not just the sibling projects' class 
directories: Groovydoc
+    // needs to load the external types referenced by the sources, otherwise 
it links them to
+    // a page it never generated instead of to the external javadocs 
configured above.
+    gdoc.classpath = files(sources.collect { SourceSet it -> 
it.compileClasspath })
     gdoc.destinationDir = 
project.layout.buildDirectory.dir('combined-api/api').get().asFile
 
     
gdoc.inputs.files(gdoc.source).withPropertyName("groovyDocSrc").withPathSensitivity(PathSensitivity.RELATIVE)
     gdoc.outputs.dir(gdoc.destinationDir)
 }
 
+tasks.register('auditGroovydocLinks', AuditGroovydocLinksTask) {
+    apiDocsDir = project.layout.dir(combinedGroovydoc.map { it.destinationDir 
})
+    // A 'links' mapping only applies to types Groovydoc managed to resolve, 
so a package whose
+    // classes it cannot load has to be listed here. Keeping the list to what 
genuinely cannot
+    // be linked leaves every other unresolvable type a build failure.
+    unmappedPackages = [
+            // Gradle's API cannot go on the Groovydoc classpath: it bundles 
an older Groovy
+            // and the Ant groovydoc task then fails to initialise.
+            'org.gradle.',
+            // The publish plugin is maintained in its own repository, with no 
javadoc site to
+            // link to. The rest of org.apache.grails.gradle.* lives in the 
grails-gradle
+            // included build and is documented in this aggregate, so it stays 
audited.
+            'org.apache.grails.gradle.publish.'
+    ]
+}
+

Review Comment:
   The new auditGroovydocLinks task is registered but not wired into the docs 
build graph, so `grails-doc:build`/`docs` can still succeed even when 
actionable Groovydoc link violations exist. Make the audit task depend on 
aggregateGroovydoc and ensure the docs Sync task depends on this audit so the 
build fails on unmapped-type links.



##########
.github/workflows/gradle.yml:
##########
@@ -1144,12 +1144,6 @@ jobs:
     if: github.repository_owner == 'apache' && github.event_name == 'push'
     needs: [ publish ]
     runs-on: ubuntu-24.04
-    # Documentation publishing targets a shared resource (the 
apache/grails-website repo).
-    # Share the static group used by the release documentation publish 
(release.yml) so only
-    # one documentation publish can run at a time across every branch; the 
rest queue.
-    concurrency:
-      group: grails-docs-publish
-      cancel-in-progress: false
     steps:

Review Comment:
   The snapshot docs publish job no longer has a concurrency group. This job 
pushes to the shared apache/grails-website repository/branch, so without a 
static concurrency group, multiple pushes can run at once and conflict. Restore 
the same grails-docs-publish concurrency group used previously to serialize 
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: [email protected]

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

Reply via email to