spark-test commented on code in PR #60318:
URL: https://github.com/apache/spark/pull/60318#discussion_r4534672487


##########
.github/workflows/maven_test.yml:
##########
@@ -120,6 +126,7 @@ jobs:
     needs: precompile-maven
     if: (!cancelled())
     runs-on: ${{ inputs.os }}
+    timeout-minutes: ${{ inputs.build_timeout_minutes }}

Review Comment:
   **Non-blocking (P2):** When the precompile fails or is cancelled, every 
shard falls back to a full local `mvn clean install` before its tests (lines 
266-286). The comments above `precompile-maven` and SPARK-56964 promise that 
this degrades to the previous behavior rather than failing the run. This limit 
doesn't leave room for that path: its 150-minute default comes from 
`build_and_test.yml`, whose shards always reuse the precompiled artifact. 
SPARK-56964 measured the local build at 28 to 53 minutes per shard. The slowest 
shards here take 126 minutes on x86 and 139 on ARM with the artifact, so on the 
fallback they would need roughly 154 to 192 minutes and be cancelled at 150, 
turning a fallback run red. On macOS the slowest shard (243.4 minutes) would 
end near or past its 300-minute limit.
   
   The fixed 60-minute precompile limit, close to its 55.2-minute maximum, also 
adds a cut precompile as a new way into this path. A longer precompile limit 
alone would not fix it, though: a precompile that fails for another reason, 
such as a transient download or upload error, ends up here too, as does a 
single shard whose own artifact download or extraction fails. These figures are 
this review's estimate from the measured build savings, not an observed 
fallback run.
   
   This extends existing discussions 
[1](https://github.com/apache/spark/pull/60318#discussion_r4534151115), 
[2](https://github.com/apache/spark/pull/60318#discussion_r4534151136), 
[3](https://github.com/apache/spark/pull/60318#pullrequestreview-5854044572).
   
   **Recommended change:** In maven_test.yml, raise precompile-maven's 
timeout-minutes from 60 to 90, add a job output that a final step sets only 
after the artifact upload succeeds, and set the build job's timeout-minutes to 
build_timeout_minutes when that output is set and to 360, GitHub's default and 
the base branch's limit, when it is not. Add a TODO at the build job's limit 
noting that a shard whose own download or extraction of the precompiled 
artifact fails still builds Spark locally under build_timeout_minutes.
   
   **Why this works:** Each run picks its shard limit from whether a 
precompiled artifact exists. When it does, every shard keeps this PR's bound 
(150 minutes, or the caller's value); when the precompile failed or was cut, 
the shards build Spark themselves under the base branch's limit, so the 
fallback behaves as it did before, as the workflow's comments promise. The 
longer precompile limit lets a slow but successful precompile finish instead of 
turning one build into twelve.
   
   **Scope:** Fallback-aware time limits in the reusable Maven workflow
   
   **Compatibility:** Shards that reuse the precompiled artifact keep this PR's 
limits, and the fallback itself, a continue-on-error precompile with a local 
mvn clean install in each shard, is unchanged.
   
   **Risks:** A hung precompile now holds its runner for up to 90 minutes 
instead of 60.
   
   **Constraints:** The output must be set only after the artifact upload 
succeeds, so a failed or cut precompile never selects the tighter limit. The 
job-level timeout-minutes expression may use only the contexts GitHub allows 
there, such as needs and inputs.
   
   **Exclusions:**
   - The ARM caller's limit on runs that reuse the artifact stays at the 
default; whether it needs its own value is asked separately.
   - A shard whose own download or extraction of the precompiled artifact fails 
after a successful precompile still builds Spark locally under 
build_timeout_minutes, because its job-level limit is set before those steps 
run; covering it would mean bounding the Run tests step instead of the job, so 
the repair marks it with a TODO at the build job's limit.
   
   **Success:** When the precompile fails or is cut, every shard runs under a 
360-minute limit, and the slowest x86, ARM and macOS shards finish their local 
build and tests. When the precompile succeeds, every shard keeps 
build_timeout_minutes: 150 by default and 300 on macOS. A precompile that takes 
up to 90 minutes finishes and its artifact is reused by every shard. A TODO at 
the build job's limit names the shard whose own artifact download or extraction 
fails as still building Spark under build_timeout_minutes.
   
   **Verification:**
   - **Behavior:** A run whose precompile succeeds gives every shard the 
caller's build_timeout_minutes, and a run whose precompile fails gives every 
shard 360 minutes.
   - **Regression:** A run with a forced precompile failure finishes its 
slowest shards, such as the sql#core slow tests, through the local mvn clean 
install without any shard being cancelled.
   - **Compile:** The precompile job defines the new output, and the build 
job's timeout-minutes expression is accepted with the needs context it reads.
   - **Inspection:** The build job's limit carries a TODO that names the shard 
whose own download or extraction of the artifact fails as still building Spark 
under build_timeout_minutes.



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