philo-he commented on code in PR #13762:
URL: https://github.com/apache/gluten/pull/13762#discussion_r4705151195


##########
.github/workflows/velox_backend_arm.yml:
##########
@@ -137,7 +137,7 @@ jobs:
           match() { echo "$changed" | grep -qE "$1" && echo true || echo 
false; }
 
           echo "cpp=$(match      '^(cpp/|ep/build-velox/|dev/)')"              
                              >> $GITHUB_OUTPUT
-          echo "java=$(match     
'^(\.github/(workflows|actions)/|pom\.xml|backends-velox/|gluten-(uniffle|celeborn|ras|core|substrait|arrow|delta|iceberg|hudi|paimon)/|gluten-ut/(common/|test/|pom\.xml)|package/|build/mvn)')"
 >> $GITHUB_OUTPUT
+          echo "java=$(match     
'^(\.github/workflows/velox_backend_arm\.yml$|\.github/actions/|pom\.xml|backends-velox/|gluten-(uniffle|celeborn|ras|core|substrait|arrow|delta|iceberg|hudi|paimon)/|gluten-ut/(common/|test/|pom\.xml)|package/|build/mvn)')"
 >> $GITHUB_OUTPUT

Review Comment:
   You're right. Every job that checks java also accepts cpp, so that example 
runs the same jobs either way. I updated the description to use flink.yml + 
shims/spark35/..., which used to run every Spark test job in x86 and now runs 
only spark-test-spark35, spark-test-spark35-slow and iceberg-spark-ut.



##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -224,7 +224,7 @@ jobs:
           match() { echo "$changed" | grep -qE "$1" && echo true || echo 
false; }
 
           echo "cpp=$(match      '^(cpp/|ep/build-velox/|dev/)')"              
                              >> $GITHUB_OUTPUT
-          echo "java=$(match     
'^(\.github/(workflows|actions)/|pom\.xml|backends-velox/|gluten-(uniffle|celeborn|ras|core|substrait|arrow|delta|iceberg|hudi|paimon)/|gluten-ut/(common/|test/|src-iceberg-upstream/|pom\.xml)|package/|build/mvn)')"
 >> $GITHUB_OUTPUT
+          echo "java=$(match     
'^(\.github/workflows/(velox_backend_x86|velox_native_build|iceberg_spark_ut|iceberg_upstream_revision)\.yml$|\.github/workflows/util/(parallel-ut/|iceberg-upstream/|install-spark-deps\.sh$)|\.github/actions/|pom\.xml|backends-velox/|gluten-(uniffle|celeborn|ras|core|substrait|arrow|delta|iceberg|hudi|paimon)/|gluten-ut/(common/|test/|src-iceberg-upstream/|pom\.xml)|package/|build/mvn)')"
 >> $GITHUB_OUTPUT

Review Comment:
   Good catch. Added .github/workflows/util/install-spark-deps.sh to the paths: 
trigger and to the squash-merge-upstream input (anchored with $) in the new 
commit. A change to only that script now runs the workflow instead of showing 
"Not needed".



##########
.github/workflows/util/update-fork-build-status.js:
##########
@@ -179,11 +253,16 @@ module.exports = async ({ github, context, core }) => {
         // Two branches can share a head commit; the newer run keeps the 
status.
         if (at && at.id > run.id) continue;
         if (at && at.id == run.id && at.attempt == run.run_attempt && 
isFinal(current)) continue;
-        const next = statusOf(run, await jobsOf(pr, run));
-        const same = current && ['state', 'description', 
'target_url'].every((k) => current[k] == next[k]);
-        if (!same) await setStatus(pr, w, next);
-      } else if (!current) {
-        await setStatus(pr, w, { state: 'error', target_url: SETUP_URL, 
description: NO_RUN });
+        // An irrelevant run skips its jobs. Linking it makes the status final.
+        const next = (await isRelevant(w))
+          ? statusOf(run, await jobsOf(pr, run))
+          : { state: 'success', target_url: 
`${run.html_url}/attempts/${run.run_attempt}`, description: NOT_NEEDED };
+        await update(w, current, next);
+      } else if (!current || current.description == LEGACY_NO_RUN) {

Review Comment:
   Done in the new commit: when a workflow's filter can't be read, a 
LEGACY_NO_RUN status is left alone, so the one recheck happens on a pass that 
can read it. I left the second case as is. When a workflow's paths change, open 
PRs keep the verdict from the old list until they push again, the same as a run 
would.



##########
.github/workflows/util/update-fork-build-status.js:
##########
@@ -179,11 +253,16 @@ module.exports = async ({ github, context, core }) => {
         // Two branches can share a head commit; the newer run keeps the 
status.
         if (at && at.id > run.id) continue;
         if (at && at.id == run.id && at.attempt == run.run_attempt && 
isFinal(current)) continue;
-        const next = statusOf(run, await jobsOf(pr, run));
-        const same = current && ['state', 'description', 
'target_url'].every((k) => current[k] == next[k]);
-        if (!same) await setStatus(pr, w, next);
-      } else if (!current) {
-        await setStatus(pr, w, { state: 'error', target_url: SETUP_URL, 
description: NO_RUN });
+        // An irrelevant run skips its jobs. Linking it makes the status final.
+        const next = (await isRelevant(w))
+          ? statusOf(run, await jobsOf(pr, run))
+          : { state: 'success', target_url: 
`${run.html_url}/attempts/${run.run_attempt}`, description: NOT_NEEDED };

Review Comment:
   Agreed. The run's own merge onto main is the better verdict. A fork run is 
now always reported by its result, and "Not needed" is only written when 
there's no run. Fixed in the new commit.



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