FrankChen021 opened a new pull request, #20318:
URL: https://github.com/apache/druid/pull/20318

   Related to #20312 (item 6).
   
   ### Description
   
   The `unit tests (25, S*)` shard on master failed before Maven even started:
   
   ```
   + ./.github/scripts/setup_test_profiling_env.sh 25 run_id=... 
key=test-jdk25-[S*] ...
   ##[error]Process completed with exit code 35.
   ```
   
   Example: 
https://github.com/apache/druid/actions/runs/34426655504/job/102713226586. Exit 
code 35 is curl's TLS connect error while downloading `jfr-profiler-1.0.0.jar` 
from `static.imply.io`. The script runs under `set -e`, so the whole test shard 
was aborted by an observability-only download.
   
   #### Changes to `setup_test_profiling_env.sh`
   
   * Download with `curl -sSf --retry 3 --retry-delay 5 --retry-all-errors 
--connect-timeout 15 --max-time 120 --retry-max-time 300`. `-f` fails on HTTP 
error pages instead of saving them as the jar, and `--retry-all-errors` is 
required because curl does not retry TLS errors by default.
   * Download to a temporary file and only move it into place on success, so a 
partial jar is never passed to `-javaagent`.
   * On failure, emit an empty `JFR_PROFILER_ARG_LINE` so surefire adds nothing 
to the JVM, remove any partial output, and print a `::warning::` annotation to 
stderr (stdout is appended to `$GITHUB_ENV` by the caller).
   
   The success path is unchanged.
   
   <hr>
   
   ##### Key changed/added files in this PR
    * `.github/scripts/setup_test_profiling_env.sh`
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


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