derrickaw commented on code in PR #41651:
URL: https://github.com/apache/beam/pull/41651#discussion_r4685269949


##########
.github/workflows/beam_Vendor_Java_Dependency_Submission.yml:
##########
@@ -0,0 +1,118 @@
+# 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
+#
+#    http://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: Beam Vendor Java Dependency Submission
+
+on:
+  push:
+    branches:
+      - master
+    paths:
+      - 'vendor/**'
+      - 'buildSrc/src/main/groovy/org/apache/beam/gradle/*Vendoring*.groovy'
+      - 
'buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy'
+      - 'settings.gradle.kts'
+      - '.github/workflows/beam_Vendor_Java_Dependency_Submission.yml'
+  pull_request:
+    paths:
+      - 'vendor/**'
+      - 'buildSrc/src/main/groovy/org/apache/beam/gradle/*Vendoring*.groovy'
+      - 
'buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy'
+      - 'settings.gradle.kts'
+      - '.github/workflows/beam_Vendor_Java_Dependency_Submission.yml'
+  workflow_dispatch:
+
+permissions: {}
+
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.ref }}'
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+  validate_vendor_dependency_graph:
+    name: Validate Vendor Java Dependency Graph
+    if: github.event_name == 'pull_request'
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    permissions:
+      contents: read
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '21'
+
+      - name: Remove runner Maven settings.xml
+        run: |
+          # Workaround for net.linguica.maven-settings decryption issue with
+          # GitHub-hosted runner's default ~/.m2/settings.xml.
+          rm -f ~/.m2/settings.xml
+
+      - name: Generate vendor Java dependency graph artifact
+        uses: 
gradle/actions/dependency-submission@8da46b539cd8fe6ab27ca75128919a18d757604c # 
v6.4.1
+        with:
+          cache-disabled: true
+          validate-wrappers: false
+          dependency-graph: generate-and-upload
+          dependency-graph-include-projects: ':vendor:.*'
+          dependency-graph-include-configurations: 'runtimeClasspath'
+          artifact-retention-days: 5
+          additional-arguments: >-

Review Comment:
   This step invokes `gradle/actions/dependency-submission` directly (which 
already embeds `setup-gradle`) rather than a local `./.github/actions/...` 
composite action, and passes `zizmor` cleanly.



##########
.github/workflows/beam_Vendor_Java_Dependency_Submission.yml:
##########
@@ -0,0 +1,118 @@
+# 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
+#
+#    http://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: Beam Vendor Java Dependency Submission
+
+on:
+  push:
+    branches:
+      - master
+    paths:
+      - 'vendor/**'
+      - 'buildSrc/src/main/groovy/org/apache/beam/gradle/*Vendoring*.groovy'
+      - 
'buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy'
+      - 'settings.gradle.kts'
+      - '.github/workflows/beam_Vendor_Java_Dependency_Submission.yml'
+  pull_request:
+    paths:
+      - 'vendor/**'
+      - 'buildSrc/src/main/groovy/org/apache/beam/gradle/*Vendoring*.groovy'
+      - 
'buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy'
+      - 'settings.gradle.kts'
+      - '.github/workflows/beam_Vendor_Java_Dependency_Submission.yml'
+  workflow_dispatch:
+
+permissions: {}
+
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.ref }}'
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+  validate_vendor_dependency_graph:
+    name: Validate Vendor Java Dependency Graph
+    if: github.event_name == 'pull_request'
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    permissions:
+      contents: read
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '21'
+
+      - name: Remove runner Maven settings.xml
+        run: |
+          # Workaround for net.linguica.maven-settings decryption issue with
+          # GitHub-hosted runner's default ~/.m2/settings.xml.
+          rm -f ~/.m2/settings.xml
+
+      - name: Generate vendor Java dependency graph artifact
+        uses: 
gradle/actions/dependency-submission@8da46b539cd8fe6ab27ca75128919a18d757604c # 
v6.4.1
+        with:
+          cache-disabled: true
+          validate-wrappers: false
+          dependency-graph: generate-and-upload
+          dependency-graph-include-projects: ':vendor:.*'
+          dependency-graph-include-configurations: 'runtimeClasspath'
+          artifact-retention-days: 5
+          additional-arguments: >-
+            -Dorg.gradle.jvmargs="-Xms2g -Xmx5g -Xss10240k"
+            -Dorg.gradle.vfs.watch=false
+
+  submit_vendor_dependency_graph:
+    name: Submit Vendor Java Dependency Graph
+    if: github.event_name != 'pull_request' && github.repository == 
'apache/beam'
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    permissions:
+      contents: write # Required by GitHub's Dependency Submission API 
(/dependency-graph/snapshots).
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '21'
+
+      - name: Remove runner Maven settings.xml
+        run: |
+          # Workaround for net.linguica.maven-settings decryption issue with
+          # GitHub-hosted runner's default ~/.m2/settings.xml.
+          rm -f ~/.m2/settings.xml
+
+      - name: Generate and submit vendor Java dependency graph
+        uses: 
gradle/actions/dependency-submission@8da46b539cd8fe6ab27ca75128919a18d757604c # 
v6.4.1
+        with:
+          cache-disabled: true
+          validate-wrappers: false
+          dependency-graph: generate-submit-and-upload
+          dependency-graph-include-projects: ':vendor:.*'
+          dependency-graph-include-configurations: 'runtimeClasspath'
+          artifact-retention-days: 5

Review Comment:
   Thanks! Moved heap sizing to `env: GRADLE_OPTS: -Xms2g -Xmx5g` so 
`additional-arguments` has no quoted multi-token flags. Note that 
`settings.gradle.kts` (lines 354–356) unconditionally includes 
`:vendor:grpc-1_69_0`, `:vendor:calcite-1_40_0`, and `:vendor:guava-32_1_2-jre` 
(`-PvendoredDependenciesOnly` in `VendorJavaPlugin.groovy` only gates 
`maven-publish`), as confirmed by run 45466956771 resolving all 82 `:vendor:*` 
packages cleanly.



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