feat: add audit_pass notification event - #5986
Open
ChrisJr404 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>
Collaborator
|
@ChrisJr404 Thanks for this PR! No blocker but one thought: passing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #5865.
Audit failures can already be sent to notification targets, but passes cannot, so there is no way to track successful audits through the notification system without re-running them via the Python API or writing a custom target that only ever sees failures.
This adds an
AUDIT_PASSnotification event. When a non-blocking or blocking audit runs and returns no failing rows,Scheduler._audit_snapshotnow firesAUDIT_PASSin the same place it already firesAUDIT_FAILUREfor failing audits. Skipped audits are neither a pass nor a failure, so they don't notify. The event carries the audit name and the model name.Nothing changes by default. A target only receives these notifications if
audit_passis in itsnotify_onset, so existing configs behave exactly as before.Test plan
notify_audit_passunit test covering the message with and without a model name.test_audit_failure_notificationsso the passing-audit case assertsAUDIT_PASSfires (global and to the owner) and the skipped case still fires nothing.ruff check,ruff format --check, andmypyclean on the changed files.pytest tests/core/test_notification_target.py tests/core/test_scheduler.pypasses (27 tests).Checklist
make styleand fixed any issues.