Skip to content

fix(ci): make import profiler checks warning-only and non-blocking - #17777

Closed
hebaalazzeh wants to merge 1 commit into
mainfrom
fix/import-profiler-warnings
Closed

fix(ci): make import profiler checks warning-only and non-blocking#17777
hebaalazzeh wants to merge 1 commit into
mainfrom
fix/import-profiler-warnings

Conversation

@hebaalazzeh

Copy link
Copy Markdown
Contributor

This PR updates the import profiler regression checks to be non-blocking. Instead of triggering a hard failure, threshold violations will output warnings so GHA checks remain green and do not block developer workflows.

Key Changes

  • Non-blocking checks: Removed exit_code = 1 assignments when thresholds are exceeded. The script will now log violations as a WARNING and exit with 0.
  • Increased absolute threshold: Increased the absolute fail-threshold limit in ci/run_single_test.sh from 5000ms to 20000ms (20 seconds).
  • Simplified warning messages: Cleaned up log messages in profiler.py to remove misleading references to "bypassing failure" since failures are no longer triggered.

@hebaalazzeh hebaalazzeh self-assigned this Jul 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request makes the import profiler checks non-blocking by converting failures into warnings and removing exit code triggers. It also increases the failure threshold in CI from 5000 ms to 20000 ms. The reviewer recommends keeping the threshold at 5000 ms since the check is now warning-only and a 20-second threshold would render the warnings ineffective. Additionally, the reviewer suggests updating the success message to use "threshold" instead of "failure threshold" for consistency with other updated messages.

Comment thread ci/run_single_test.sh
Comment on lines +142 to +144
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the import profiler checks are now non-blocking and warning-only, there is no longer a risk of blocking developer workflows due to threshold violations. Keeping the threshold at a reasonable value (like 5000 ms) is beneficial because it still alerts developers via warnings when imports are slow. Raising the threshold to 20000 ms (20 seconds) is extremely high and will likely prevent any warnings from ever being triggered, defeating the purpose of having a warning-only check.

Suggested change
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 20000
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000

exit_code = 1
final_messages.append(f"WARNING: Median import time ({p50_time:.2f} ms) exceeds the threshold ({fail_threshold} ms).")
else:
final_messages.append(f"SUCCESS: Median import time ({p50_time:.2f} ms) is within the failure threshold ({fail_threshold} ms).")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the other updated messages (which now refer to "threshold" instead of "failure threshold"), we should update this success message to also use "threshold".

Suggested change
final_messages.append(f"SUCCESS: Median import time ({p50_time:.2f} ms) is within the failure threshold ({fail_threshold} ms).")
final_messages.append(f"SUCCESS: Median import time ({p50_time:.2f} ms) is within the threshold ({fail_threshold} ms).")

@parthea

parthea commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Can we keep them as blocking but increase the threshold? If there are only warnings, we may not catch regressions (assuming the CI is green)

@hebaalazzeh
hebaalazzeh deleted the fix/import-profiler-warnings branch July 20, 2026 17:57
@hebaalazzeh
hebaalazzeh restored the fix/import-profiler-warnings branch July 20, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants