SIGN IN SIGN UP
apache / spark UNCLAIMED

Apache Spark - A unified analytics engine for large-scale data processing

43050 0 0 Scala

[SPARK-55829][INFRA][FOLLOWUP] Fix static-only CI check skipping all jobs on empty diff

### What changes were proposed in this pull request?

Fixes a bug in #54616 (SPARK-55829) where the static-only CI check incorrectly skips PySpark, SparkR, and TPC-DS jobs on **all** pushes when there are no fork-only changes.

**Root cause**: When `APACHE_SPARK_REF == HEAD` (e.g., syncing fork with upstream), `git diff` returns empty output. The `for` loop runs zero iterations, `static_only` stays `true`, and all jobs are skipped.

**Fix**:
- Default `static_only=false` when diff is empty (no changed files → run everything)
- Only set `static_only=true` when there ARE changed files and ALL match `*/resources/*/static/*`
- Narrowed pattern: removed `*.css|*.js|*.html` (could false-positive on non-static files like Scala test CSS assertions)

### Why are the changes needed?

The bug caused all build/test jobs to be skipped on fork master pushes after merging upstream changes: https://github.com/yaooqinn/spark/actions/runs/22678711938

### Does this PR introduce _any_ user-facing change?

No. CI-only fix.

### How was this patch tested?

Verified logic: empty diff → `static_only=false` → all jobs run as normal.

### Was this patch authored or co-authored using generative AI tooling?

Yes, co-authored with GitHub Copilot.

Closes #54625 from yaooqinn/SPARK-55829-fix.

Authored-by: Kent Yao <kentyao@microsoft.com>
Signed-off-by: Kent Yao <kentyao@microsoft.com>
K
Kent Yao committed
3126983706e0b18e2f4edd4ced516362c097933a
Parent: e8f281d