-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed check and status messaging in comment, part I #1014
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention: Patch coverage is
❌ We are unable to process any of the uploaded JUnit XML files. Please ensure your files are in the right format.
Additional details and impacted files@@ Coverage Diff @@
## main #1014 +/- ##
=======================================
Coverage 97.75% 97.75%
=======================================
Files 451 451
Lines 36812 36862 +50
=======================================
+ Hits 35986 36035 +49
- Misses 826 827 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
✅ All tests successful. No failed tests were found. 📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
…o other notifiers
25efc25
to
9cdbe99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the well defined return types now
CUSTOM_TARGET_TEXT_PATCH_KEY = "custom_target_helper_text_patch" | ||
CUSTOM_TARGET_TEXT_PROJECT_KEY = "custom_target_helper_text_project" | ||
CUSTOM_TARGET_TEXT_VALUE = ( | ||
"Your {context} {notification_type} has failed because the patch coverage is below the target coverage. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also looking at the mockup for this, is it reasonable to include the numbers in this message as well, like:
… has failed because the patch coverage (X%) is below the target coverage (Y%).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not in the design, but I think it makes sense - having the %s makes the message better, will add
# context=self.context, notification_type=notification_type | ||
# ) | ||
# included_helper_text[CUSTOM_TARGET_TEXT_PATCH_KEY] = helper_text | ||
# message = message + " - " + helper_text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also decided I'm not going to add the helper text to this message, so the resulting message for check or status will be unchanged
The goal of this epic is to communicate details about check or status failures in the other notifiers, like pr comment.
This is part 1, which is mostly new data structures and variables, and handling of notifications.
Right now we collect all notifications and execute them in any order, they are all independent and they don't know about each other. In this pr, I split notifications into 2 categories (checks/status notifications, or other notifications). Now the check/status notifications go first, because their outcome will impact the messaging in the other types of notifications.
The specific condition I will tackle next: add custom helper text for users that have specified a
target
in theiryaml
. If their check/status fails, we will add a message to the pr comment telling them that the check/status failed, with advice that mentionstarget
and links them to thetarget
docs. There are screenshots in the tix linked below.What are check/status notifications? Check out the best stack overflow answer I've ever seen
codecov/engineering-team#1605
codecov/engineering-team#1626
Epic here: codecov/engineering-team#1133