Skip to content

Commit b2aca6c

Browse files
authored
[CI] Improve logging check accuracy and unify error log cleanup (#7473)
1 parent 22a4f60 commit b2aca6c

2 files changed

Lines changed: 17 additions & 11 deletions

File tree

scripts/check_approval.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,24 @@ if [ "${HAS_ENV_MODIFY}" != "" ] && [ "${PR_ID}" != "" ]; then
7878
fi
7979

8080
LOG_KEYWORDS=(
81-
"\.info\("
82-
"\.debug\("
83-
"\.error\("
84-
"log_request\("
85-
"log_request_error"
81+
"\.info[[:space:]]*\("
82+
"\.debug[[:space:]]*\("
83+
"\.error[[:space:]]*\("
84+
"\blog_request[[:space:]]*\("
85+
"\blog_request_error\b"
8686
)
8787

88+
LOG_PATTERN="$(printf -- "%s|" "${LOG_KEYWORDS[@]}" | sed 's/|$//')"
89+
8890
HAS_LOG_MODIFY=$(git diff upstream/$BRANCH \
89-
-- . ':(exclude)scripts/check_approval.sh' \
91+
-- . ':(exclude)scripts/check_approval.sh' ':(exclude)tests/**' \
9092
| grep -E "^\+" \
9193
| grep -vE "^\+\+\+" \
92-
| grep -E $(printf -- "%s|" "${LOG_KEYWORDS[@]}" | sed 's/|$//') || true)
94+
| grep -E "${LOG_PATTERN}" || true)
9395

9496
if [ -n "${HAS_LOG_MODIFY}" ] && [ -n "${PR_ID}" ]; then
97+
echo "Detected log modification in diff:"
98+
echo "${HAS_LOG_MODIFY}"
9599
echo_line1="You must have one FastDeploy RD (xyxinyang(zhouchong), zyyzghb(zhangyongyue)) approval for modifying logging behavior (.info/.debug/.error/log_request)."
96100
check_approval "$echo_line1" 1 xyxinyang zyyzghb
97101
fi

scripts/coverage_run.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ classify_tests() {
4343
fi
4444

4545
# Rule 5: high-risk OOM tests (treat as multi_gpu for sequential execution)
46-
if [[ "$test_file" == "tests/entrypoints/cli/test_main.py" ||
47-
"$test_file" == "tests/entrypoints/cli/test_serve.py" ||
46+
if [[ "$test_file" =~ ^tests/entrypoints/cli/ ||
47+
"$test_file" == "tests/layers/test_append_attention_with_output.py" ||
48+
"$test_file" == "tests/operators/test_get_position_ids_and_mask_encoder_batch.py" ||
4849
"$test_file" == "tests/operators/test_group_swiglu_with_masked.py" ||
4950
"$test_file" == "tests/operators/test_hybrid_mtp_ngram.py" ||
5051
"$test_file" == "tests/operators/test_moe_top_k_select.py" ||
5152
"$test_file" == "tests/operators/test_noaux_tc.py" ||
53+
"$test_file" == "tests/operators/test_qk_rmsnorm_fused.py" ||
5254
"$test_file" == "tests/output/test_get_save_output_v1.py" ||
5355
"$test_file" == "tests/output/test_process_batch_draft_tokens.py" ||
5456
"$test_file" == "tests/output/test_process_batch_output.py" ]]; then
@@ -344,8 +346,8 @@ if [ "$failed_count" -ne 0 ]; then
344346
if [ -d "${run_path}/unittest_logs" ]; then
345347
echo "Cleaning empty directories..."
346348

347-
# remove console_error.log files (cleanup logs from stopped processes)
348-
find "${run_path}/unittest_logs" -name "console_error.log*" -delete || true
349+
# remove *error.log* files (cleanup logs from stopped processes)
350+
find "${run_path}/unittest_logs" \( -name "console_error.log*" -o -name "error.log*" \) -delete || true
349351

350352
# perform multi-round clean until no more empty directories are found
351353
while true; do

0 commit comments

Comments
 (0)