Skip to content
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

Adds error check on Experiment results page #1507

Merged
merged 9 commits into from
Jul 26, 2023
Merged

Conversation

mknowlton89
Copy link
Collaborator

@mknowlton89 mknowlton89 commented Jul 25, 2023

Features and Changes

On the experiment report page, we're now checking if a report has an error via report.error and if so, displaying a red warning icon. On hover, we display a tooltip that displays the error string.

Additionally, on the report id page [rid].tsx we're also surfacing any error message on the report itself, rather than making the user open the modal to see if there is an error.

Also included in this PR is an update to how we're handling the updateReport method within the ReportModel. Similar to this PR Mongoose doesn't accept undefined when calling $set and spreading in the updates. As a result, if a report had an error, but the error was resolved, it wasn't actually getting reset. With this update, we're now successfully resetting an error message if it's been resolved.

Testing

  • Build an ad-hoc report that will knowingly fail, run it, and ensure that if there is an error, the warning icon and error are displayed. (I've not been able to create a valid ad-hoc report just yet)

Screenshots

Screen Shot 2023-07-24 at 2 29 26 PM Screen Shot 2023-07-26 at 6 58 37 AM

@mknowlton89 mknowlton89 self-assigned this Jul 25, 2023
@mknowlton89 mknowlton89 linked an issue Jul 25, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Your preview environment pr-1507-bttf has been deployed.

Preview environment endpoints are available at:

@mknowlton89 mknowlton89 marked this pull request as ready for review July 25, 2023 14:30
@mknowlton89 mknowlton89 requested review from jdorn and a team July 25, 2023 14:30
…ngoose update - we can no longer pass in undefined, it has to be null or an empty string.
@@ -118,6 +118,7 @@ export async function updateReport(
$set: {
...updates,
dateUpdated: new Date(),
error: updates.error || "",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is right place for this. If someone just edits the report name, this will now delete the error. I think this belongs in the ReportQueryRunner class instead. That's where we call updateReport

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, yea - good call. Updated.

@mknowlton89 mknowlton89 requested a review from jdorn July 26, 2023 12:41
@mknowlton89 mknowlton89 merged commit 0e80b84 into main Jul 26, 2023
3 checks passed
@mknowlton89 mknowlton89 deleted the mk/adhoc-report-error branch July 26, 2023 12:54
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.

[Bug] Query errors hidden on ad-hoc report page
2 participants