-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test results): error message PR comment if no successful parse (#…
…358) * feat(test results): error message PR comment if no successful parse Signed-off-by: joseph-sentry <[email protected]> * fix: except LockRetry instead of LockError Signed-off-by: joseph-sentry <[email protected]> * feat: add error message to comment when test results parsing fails This commit: - adds the TestResultsProcessingError enum - adds the enum as a nullable field in the test results total - in the test results finisher, when there are no succesful parses, it writes to the error field in the totals - it immediately writes the error message to the comment, then queues up a notify - in the notify step, it will read from the totals to check if there was a test result processing error, if there was, let the user know by displaying it in the coverage comment, similary to how we show succesful parsing of test results * feat: add error message to PR comment when test results parsing fails The logic for doing this is as follows: If there are no successful test results processing tasks this chord then we check if there were previously test instances that were processed for this commit. If there are previous test instances on this commit, there is no error, and we just exit this finisher without doing anything. If there are no previous test instances on this commit, then we should notify the user that there is an error. So we will begin by doing a test results error comment which contains no info about coverage, then we will queue up the notify task so it can create a coverage comment that still contains this error's information. If there are successful test results processing tasks, then we should get rid of the error on the test results totals for this commit. Signed-off-by: joseph-sentry <[email protected]> * fix: fix test_results_error comment logic If there has been any success in processing for a given commit, it's associated test result totals should have the error set to None, otherwise it should be NO_SUCCESS. The condition for all_tests_passed is: if the error is None and failed = 0 in the totals then all tests passed. In the comment, if there's an error, show the error comment, else if all tests passed show the all tests passed message. If neither of these are true and the user HAS uploaded test results, then it means that there must have been failures, or they somehow skipped all their tests. Signed-off-by: joseph-sentry <[email protected]> * fix: apply logic to team plan and add test Signed-off-by: joseph-sentry <[email protected]> --------- Signed-off-by: joseph-sentry <[email protected]>
- Loading branch information
1 parent
d4496ed
commit 32d2884
Showing
13 changed files
with
1,415 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
960 changes: 960 additions & 0 deletions
960
.../cassetes/test_comment/TestCommentNotifierIntegration/test_notify_test_results_error.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.