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

Display additional failure information when sync is expanded and jump to relevant log line #12896

Merged
merged 20 commits into from
May 26, 2022

Conversation

evantahler
Copy link
Contributor

@evantahler evantahler commented May 16, 2022

When viewing your list of syncs, if there is an internalMessage on the failure, this PR will display that message to the user when the sync is expanded:

Screen Shot 2022-05-18 at 2 25 42 PM

If there is a timestamp for that failure reason, you can now also choose to jump to the first line in the logs that matches that timestamp.

Screen.Recording.2022-05-18.at.2.21.49.PM.mov

As the platform gets better at tracking errors (e.g. #12423, there will be both a user-facing "externalMessage" and more detailed "internalMessage") about each failure. This PR displays both to the user.

Alternatives considered:

  • A 'see more' modal next to the error that contained both failure messages and the stacktrace
  • An 'errors' table that showed the internalMessage, externalMessage, and stack trace when expanded.

Closes #12628 and #12130

@github-actions github-actions bot added area/api Related to the api area/documentation Improvements or additions to documentation area/frontend area/platform issues related to the platform area/server labels May 16, 2022
@evantahler evantahler changed the title Evan/display failure details Display additional failure information when sync is expanded May 16, 2022
@evantahler evantahler marked this pull request as ready for review May 16, 2022 23:49
@evantahler evantahler requested a review from a team as a code owner May 16, 2022 23:49
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

ACK. removing myself as a reviewer since I am no good for reviewing UI code

@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 16:00 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 16:00 Inactive
@evantahler evantahler force-pushed the evan/display-failure-details branch from 0f7d1f3 to d379334 Compare May 17, 2022 17:17
@evantahler evantahler requested a review from timroes May 17, 2022 17:18
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 17:19 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 17:20 Inactive
@evantahler evantahler force-pushed the evan/display-failure-details branch from d379334 to a807c0a Compare May 17, 2022 21:29
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 21:31 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 21:31 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 22:37 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 17, 2022 22:37 Inactive
@evantahler evantahler changed the title Display additional failure information when sync is expanded Display additional failure information when sync is expanded and jump to relevant log line May 18, 2022
@evantahler evantahler linked an issue May 18, 2022 that may be closed by this pull request
@evantahler
Copy link
Contributor Author

@timroes I decided to tackle both #12628 and #12130 in this PR, so the scope has gotten a little larger here.

@evantahler evantahler temporarily deployed to more-secrets May 18, 2022 21:30 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 18, 2022 21:30 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 18, 2022 21:42 Inactive
@evantahler evantahler force-pushed the evan/display-failure-details branch from cc49aa3 to 27efa7b Compare May 26, 2022 18:11
@evantahler
Copy link
Contributor Author

evantahler commented May 26, 2022

ok @timroes we are now just showing the (properly formatted) failure timestamp and not scrolling. I think this is ready to merge.

Screen Shot 2022-05-26 at 11 09 14 AM

@evantahler evantahler temporarily deployed to more-secrets May 26, 2022 18:14 Inactive
@evantahler evantahler requested a review from edmundito May 26, 2022 18:19
Copy link
Contributor

@edmundito edmundito left a comment

Choose a reason for hiding this comment

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

Code looks great. Tested locally.

Comment on lines +51 to +52
scrollToLine={undefined}
highlight={[]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a hack to prevent it from scrolling to a specific line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep - and it was undocumented and super hard to find. That's why I left this in so we would remember this for the future when we get to #12128

@@ -47,8 +46,10 @@ const Logs: React.FC<LogsProps> = ({ logsArray }) => {
lineClassName="logLine"
highlightLineClassName="highlightLogLine"
selectableLines
follow
follow={true}
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, we prefer it without the ={true}

@evantahler evantahler temporarily deployed to more-secrets May 26, 2022 20:07 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 26, 2022 20:38 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 26, 2022 21:19 Inactive
@evantahler evantahler temporarily deployed to more-secrets May 26, 2022 21:50 Inactive
@evantahler
Copy link
Contributor Author

Fun fact - I had to retry this flaky test 5x before it passed https://github.com/airbytehq/airbyte/actions/runs/2392338287

@evantahler evantahler merged commit 9aaa513 into master May 26, 2022
@evantahler evantahler deleted the evan/display-failure-details branch May 26, 2022 22:36
jscottpolevault pushed a commit to jscottpolevault/airbyte that referenced this pull request Jun 1, 2022
… to relevant log line (airbytehq#12896)

* Display addtional failure information when sync is expanded

* rename

* Update airbyte-webapp/src/components/JobItem/components/FailureDetails.tsx

Co-authored-by: Tim Roes <[email protected]>

* fix bad merge

* jump to timestamp

* cleat timestamp when logs colapsed

* speed up search

* rename

* Do what @pedroslopez says

* Rebase from master after big API update

* `floor` matchtimes for greater range matching

* Update airbyte-webapp/src/components/JobItem/components/ErrorDetails.tsx

Co-authored-by: Tim Roes <[email protected]>

* Update airbyte-webapp/src/components/JobItem/components/ErrorDetails.tsx

Co-authored-by: Tim Roes <[email protected]>

* Update airbyte-webapp/src/components/JobItem/components/Logs.tsx

Co-authored-by: Tim Roes <[email protected]>

* Update airbyte-webapp/src/components/JobItem/JobItem.tsx

Co-authored-by: Tim Roes <[email protected]>

* replace regexp with `dayJs`

* Extract dayjs into globals module

* mach time in full-second resolution

* revert `dayJs` and use `Date.parse`

* Just show failure timestamp rather than scroll

Co-authored-by: Tim Roes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Related to the api area/documentation Improvements or additions to documentation area/frontend Related to the Airbyte webapp area/platform issues related to the platform area/server team/extensibility
Projects
None yet
5 participants