potiuk commented on code in PR #72259:
URL: https://github.com/apache/airflow/pull/72259#discussion_r3889745381


##########
scripts/ci/testing/run_unit_tests.sh:
##########
@@ -30,6 +30,20 @@ fi
 TEST_GROUP=${1}
 TEST_SCOPE=${2}
 
+# The whole job - not only this step - has to fit in JOB_TIMEOUT_MINUTES, so 
the tests get whatever
+# is left of that budget rather than a fixed value.
+if [[ -n "${JOB_START_EPOCH:-}" && -n "${JOB_TIMEOUT_MINUTES:-}" ]]; then
+    TOTAL_TEST_TIMEOUT=$(python "$(dirname 
"${BASH_SOURCE[0]}")/compute_remaining_test_timeout.py" \
+        --job-timeout-minutes "${JOB_TIMEOUT_MINUTES}" --job-start-epoch 
"${JOB_START_EPOCH}") || exit 1
+    export TOTAL_TEST_TIMEOUT
+    echo "${COLOR_BLUE}Tests get ${TOTAL_TEST_TIMEOUT}s of the 
${JOB_TIMEOUT_MINUTES}m job budget${COLOR_RESET}"

Review Comment:
   NIT: TOTAL_TEST_TIMEOUT should also be in minutes otherwise the message is 
   
   "You have 3065s of the 65m" which ask for unnecessary extra cognitive load 
and calculation.



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

Reply via email to