Copilot commented on code in PR #279:
URL: 
https://github.com/apache/datasketches-memory/pull/279#discussion_r3291426012


##########
.github/workflows/stageReleaseSources.yml:
##########
@@ -0,0 +1,92 @@
+name: Stage Release Candidate Source Assets (Manual Trigger)
+
+# file: placeholder.yml (temporary)
+# This workflow acts as Phase 1 of your official Release Candidate process.
+# It handles the clean compilation, license verification, and source packaging
+# on a cloud runner, delivering a pristine ZIP for local signing.
+
+on:
+  workflow_dispatch:
+
+jobs:
+  assemble-source-candidate:
+    runs-on: ubuntu-22.04
+    permissions:
+      contents: read
+
+    steps:
+      # 1. Checkout the clean working workspace context
+      - name: 1. Checkout Branch Context
+        uses: actions/checkout@v5
+        with:
+          ref: ${{ github.ref }}
+          fetch-depth: 0
+
+      # 2. Set up the foundational Java runtime environment
+      - name: 2. Provision JDK 25 for Build Execution
+        uses: actions/setup-java@v5
+        with:
+          java-version: '25'
+          distribution: 'temurin'
+          java-package: jdk
+          architecture: x64
+          cache: 'maven'
+
+      # 3. Dynamically extract the project version from the root pom.xml
+      - name: 3. Extract POM Project Version
+        id: parse-version
+        run: |
+          POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q 
-DforceStdout)
+          echo "Target Release Version: $POM_VERSION"
+          echo "POM_VERSION=$POM_VERSION" >> $GITHUB_ENV
+
+      # 4. Audit license headers across all source files and submodules
+      - name: 4. Execute Apache RAT License Audit
+        run: |
+          echo "Running corporate license header checks..."
+          mvn apache-rat:check -N
+
+      # Diagnostic Step: Print the target report if the audit drops dead
+      - name: 4b. Diagnostic - Display RAT Failure Report
+        if: always()
+        run: |
+          echo "Checking for java11 submodule RAT report..."
+          if [ -f datasketches-memory-java11/target/rat.txt ]; then
+            echo "=== DATASKETCHES-MEMORY-JAVA11 RAT.TXT ==="
+            cat datasketches-memory-java11/target/rat.txt
+          else
+            echo "No submodule rat.txt report found."

Review Comment:
   The diagnostic step runs on every workflow run (`if: always()`), and it 
checks for a `datasketches-memory-java11/target/rat.txt` report, but this repo 
doesn’t contain a `datasketches-memory-java11` directory and the RAT plugin in 
`pom.xml` is configured to output under `${project.basedir}/rat`. Consider 
changing the condition to only run on failure and updating the path to the 
actual RAT report location.
   



##########
.github/workflows/stageReleaseSources.yml:
##########
@@ -0,0 +1,92 @@
+name: Stage Release Candidate Source Assets (Manual Trigger)
+
+# file: placeholder.yml (temporary)

Review Comment:
   The header comment says `file: placeholder.yml (temporary)`, but this 
workflow is `stageReleaseSources.yml` and there is already a separate 
`.github/workflows/placeholder.yml`. This is misleading when 
maintaining/reviewing workflows; update the comment to reference the correct 
filename/purpose.
   



##########
.github/workflows/stageReleaseSources.yml:
##########
@@ -0,0 +1,92 @@
+name: Stage Release Candidate Source Assets (Manual Trigger)
+
+# file: placeholder.yml (temporary)
+# This workflow acts as Phase 1 of your official Release Candidate process.
+# It handles the clean compilation, license verification, and source packaging
+# on a cloud runner, delivering a pristine ZIP for local signing.
+
+on:
+  workflow_dispatch:
+
+jobs:
+  assemble-source-candidate:
+    runs-on: ubuntu-22.04
+    permissions:
+      contents: read
+
+    steps:
+      # 1. Checkout the clean working workspace context
+      - name: 1. Checkout Branch Context
+        uses: actions/checkout@v5
+        with:
+          ref: ${{ github.ref }}
+          fetch-depth: 0
+
+      # 2. Set up the foundational Java runtime environment
+      - name: 2. Provision JDK 25 for Build Execution
+        uses: actions/setup-java@v5
+        with:
+          java-version: '25'
+          distribution: 'temurin'
+          java-package: jdk
+          architecture: x64
+          cache: 'maven'

Review Comment:
   This workflow uses `actions/setup-java@v5`, but other workflows in this repo 
(e.g. `javadoc.yml`) use `actions/setup-java@v4`. Aligning on a single major 
version across workflows reduces maintenance burden and avoids potential 
incompatibilities if `v5` isn’t intended/available in your environment.



##########
.github/workflows/stageReleaseSources.yml:
##########
@@ -0,0 +1,92 @@
+name: Stage Release Candidate Source Assets (Manual Trigger)
+
+# file: placeholder.yml (temporary)
+# This workflow acts as Phase 1 of your official Release Candidate process.
+# It handles the clean compilation, license verification, and source packaging
+# on a cloud runner, delivering a pristine ZIP for local signing.
+
+on:
+  workflow_dispatch:
+
+jobs:
+  assemble-source-candidate:
+    runs-on: ubuntu-22.04
+    permissions:
+      contents: read
+
+    steps:
+      # 1. Checkout the clean working workspace context
+      - name: 1. Checkout Branch Context
+        uses: actions/checkout@v5
+        with:
+          ref: ${{ github.ref }}
+          fetch-depth: 0
+
+      # 2. Set up the foundational Java runtime environment
+      - name: 2. Provision JDK 25 for Build Execution
+        uses: actions/setup-java@v5
+        with:
+          java-version: '25'
+          distribution: 'temurin'
+          java-package: jdk
+          architecture: x64
+          cache: 'maven'
+
+      # 3. Dynamically extract the project version from the root pom.xml
+      - name: 3. Extract POM Project Version
+        id: parse-version
+        run: |
+          POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q 
-DforceStdout)
+          echo "Target Release Version: $POM_VERSION"
+          echo "POM_VERSION=$POM_VERSION" >> $GITHUB_ENV
+
+      # 4. Audit license headers across all source files and submodules
+      - name: 4. Execute Apache RAT License Audit
+        run: |
+          echo "Running corporate license header checks..."
+          mvn apache-rat:check -N
+
+      # Diagnostic Step: Print the target report if the audit drops dead
+      - name: 4b. Diagnostic - Display RAT Failure Report
+        if: always()
+        run: |
+          echo "Checking for java11 submodule RAT report..."
+          if [ -f datasketches-memory-java11/target/rat.txt ]; then
+            echo "=== DATASKETCHES-MEMORY-JAVA11 RAT.TXT ==="
+            cat datasketches-memory-java11/target/rat.txt
+          else
+            echo "No submodule rat.txt report found."
+          fi
+
+      # 5. Clean workspace and assemble the official source release container
+      - name: 5. Build Apache Source Release Archive
+        run: |
+          echo "Assembling project distribution ZIP..."
+          mvn clean assembly:single
+
+      # 6. Relocate and calculate the SHA-512 cryptographic checksum string
+      - name: 6. Stage Deliverables and Compute Checksums
+        run: |
+          # Create a temporary staging area for the artifact collection
+          mkdir -p staging_dir
+          
+          # Define standard names based on the extracted POM version
+          SRC_ZIP="datasketches-memory-${{ env.POM_VERSION }}-src.zip"
+          
+          echo "Locating generated assembly asset..."
+          cp target/datasketches-memory-${{ env.POM_VERSION 
}}-source-release.zip staging_dir/$SRC_ZIP
+          
+          cd staging_dir
+          echo "Generating SHA-512 checksum signature file..."
+          sha512sum $SRC_ZIP > $SRC_ZIP.sha512
+          

Review Comment:
   `mvn clean assembly:single` is likely to fail because the 
`maven-assembly-plugin` does not appear to be configured with any 
`descriptor`/`descriptorRef` in this repo’s `pom.xml`, and the plugin has no 
default assembly descriptor. Either add an explicit assembly configuration (so 
`assembly:single` can run) or switch to a build/packaging command that produces 
the intended source release archive.
   



##########
.github/workflows/stageReleaseSources.yml:
##########
@@ -0,0 +1,92 @@
+name: Stage Release Candidate Source Assets (Manual Trigger)
+
+# file: placeholder.yml (temporary)
+# This workflow acts as Phase 1 of your official Release Candidate process.
+# It handles the clean compilation, license verification, and source packaging
+# on a cloud runner, delivering a pristine ZIP for local signing.
+
+on:
+  workflow_dispatch:
+
+jobs:
+  assemble-source-candidate:
+    runs-on: ubuntu-22.04
+    permissions:
+      contents: read
+
+    steps:
+      # 1. Checkout the clean working workspace context
+      - name: 1. Checkout Branch Context
+        uses: actions/checkout@v5
+        with:
+          ref: ${{ github.ref }}
+          fetch-depth: 0
+
+      # 2. Set up the foundational Java runtime environment
+      - name: 2. Provision JDK 25 for Build Execution
+        uses: actions/setup-java@v5
+        with:
+          java-version: '25'
+          distribution: 'temurin'
+          java-package: jdk
+          architecture: x64
+          cache: 'maven'
+
+      # 3. Dynamically extract the project version from the root pom.xml
+      - name: 3. Extract POM Project Version
+        id: parse-version
+        run: |
+          POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q 
-DforceStdout)
+          echo "Target Release Version: $POM_VERSION"
+          echo "POM_VERSION=$POM_VERSION" >> $GITHUB_ENV
+
+      # 4. Audit license headers across all source files and submodules
+      - name: 4. Execute Apache RAT License Audit
+        run: |
+          echo "Running corporate license header checks..."
+          mvn apache-rat:check -N
+
+      # Diagnostic Step: Print the target report if the audit drops dead
+      - name: 4b. Diagnostic - Display RAT Failure Report
+        if: always()
+        run: |
+          echo "Checking for java11 submodule RAT report..."
+          if [ -f datasketches-memory-java11/target/rat.txt ]; then
+            echo "=== DATASKETCHES-MEMORY-JAVA11 RAT.TXT ==="
+            cat datasketches-memory-java11/target/rat.txt
+          else
+            echo "No submodule rat.txt report found."
+          fi
+
+      # 5. Clean workspace and assemble the official source release container
+      - name: 5. Build Apache Source Release Archive
+        run: |
+          echo "Assembling project distribution ZIP..."
+          mvn clean assembly:single
+
+      # 6. Relocate and calculate the SHA-512 cryptographic checksum string
+      - name: 6. Stage Deliverables and Compute Checksums
+        run: |
+          # Create a temporary staging area for the artifact collection
+          mkdir -p staging_dir
+          
+          # Define standard names based on the extracted POM version
+          SRC_ZIP="datasketches-memory-${{ env.POM_VERSION }}-src.zip"
+          
+          echo "Locating generated assembly asset..."
+          cp target/datasketches-memory-${{ env.POM_VERSION 
}}-source-release.zip staging_dir/$SRC_ZIP
+          
+          cd staging_dir
+          echo "Generating SHA-512 checksum signature file..."
+          sha512sum $SRC_ZIP > $SRC_ZIP.sha512
+          
+          echo "Verification Checksum Content:"
+          cat $SRC_ZIP.sha512

Review Comment:
   This step assumes the build will create 
`target/datasketches-memory-${POM_VERSION}-source-release.zip`, but there’s no 
corresponding assembly descriptor/config in the repository to produce an 
artifact with that name. As written, the `cp` will fail and the workflow won’t 
upload anything; update the artifact path/name to match what the build actually 
produces (or produce that file explicitly).
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to