ppkarwasz commented on code in PR #3502:
URL: https://github.com/apache/solr/pull/3502#discussion_r2313875739


##########
.github/workflows/dependency-graph-submission.yml:
##########
@@ -0,0 +1,27 @@
+name: Dependency Submission
+
+on:
+  push:
+    branches: [ main ]
+
+permissions:
+  contents: write
+
+jobs:
+  dependency-submission:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: 21
+          
+      - name: Generate and submit dependency graph
+        uses: gradle/actions/dependency-submission@v4
+        env:
+          DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: 
"(?i)(^|:)(compileClasspath|runtimeClasspath|testCompileClasspath|testRuntimeClasspath)$"
+          DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS: 
"(?i)(^|:)(classpath|.*PluginClasspath|kotlinCompilerClasspath|kaptClasspath|annotationProcessor|detachedConfiguration.*)$"
+          DEPENDENCY_GRAPH_RUNTIME_INCLUDE_CONFIGURATIONS: 
"(?i)(^|:)runtimeClasspath$"
+          DEPENDENCY_GRAPH_RUNTIME_EXCLUDE_CONFIGURATIONS: 
"(?i)(^|:)testRuntimeClasspath$"

Review Comment:
   I think this workflow could be simplified and clarified a bit:
   
   * Since we’re already explicitly listing the configurations we care about, 
we don’t really need an additional exclude list.
   * From what I understand, the regex is evaluated against the configuration 
name itself (not prefixed with the module name), so the `(^|:)` and `$` anchors 
aren’t necessary. Empirical tests confirm this.
   * The `startJar` configuration isn’t currently included, so we should add it 
to the list.
   * We should also exclude the `:solr:test-framework` project from the runtime 
dependencies to avoid pulling it in unnecessarily.
   
   ```suggestion
             DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: 
"(?i)(test)?(compile|runtime)classpath|startJar"
             DEPENDENCY_GRAPH_RUNTIME_EXCLUDE_PROJECTS: ":solr:test-framework"
             DEPENDENCY_GRAPH_RUNTIME_INCLUDE_CONFIGURATIONS: 
"runtimeClasspath|startJar"
   ```



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