Skip to content

[feat-2134][framework]: Rework the error management code in the Backend#2763

Merged
klesh merged 15 commits into
apache:mainfrom
merico-ai:issues/2134
Sep 2, 2022
Merged

[feat-2134][framework]: Rework the error management code in the Backend#2763
klesh merged 15 commits into
apache:mainfrom
merico-ai:issues/2134

Conversation

@keon94
Copy link
Copy Markdown
Contributor

@keon94 keon94 commented Aug 18, 2022

⚠️   Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation & PR Template
  • This PR is using a label (bug, feature etc.)
  • My code is has necessary documentation (if appropriate)
  • I have added any relevant tests
  • This section (⚠️   Pre Checklist) will be removed when submitting PR

Summary

Does this close any open issues?

Closes #2134

Screenshots

Include any relevant screenshots here.

Other Information

Blocks #2907

@keon94
Copy link
Copy Markdown
Contributor Author

keon94 commented Aug 18, 2022

@hezyin @klesh @Startrekzky

I've been working on improving our error management infrastructure, and have implemetend a work-in-progress implementation of my ideas. Obviously, I'll have to go and find all the places where we are throwing errors and pass them through this new API. But I'd like to get your input as well before I do too much, so please have a look.

Here's a screenshot of a temporary test suite I wrote:
image

And the results (the errors printed)
image

Comment thread errors/impl.go
Comment thread errors/impl.go
@keon94 keon94 force-pushed the issues/2134 branch 2 times, most recently from c0fc602 to ed8250a Compare August 19, 2022 19:52
@keon94
Copy link
Copy Markdown
Contributor Author

keon94 commented Aug 22, 2022

Example after including the optional "user-friendly" feature
image
image

@keon94 keon94 force-pushed the issues/2134 branch 4 times, most recently from 794900f to 7551e56 Compare August 25, 2022 19:24
@keon94 keon94 force-pushed the issues/2134 branch 15 times, most recently from 92657a0 to a01f7a0 Compare September 1, 2022 00:49
@keon94 keon94 force-pushed the issues/2134 branch 2 times, most recently from 7c7aea7 to 7dd41dd Compare September 1, 2022 19:05
@keon94
Copy link
Copy Markdown
Contributor Author

keon94 commented Sep 1, 2022

Example backend log message with "test-jira-connection" erroring out (stacktrace enabled)
image

Response as seen by the front-end
image

@keon94 keon94 force-pushed the issues/2134 branch 4 times, most recently from 9e41cae to 96a09de Compare September 1, 2022 22:40
@keon94
Copy link
Copy Markdown
Contributor Author

keon94 commented Sep 1, 2022

@e2corporation with my new error messaging scheme (sample here) I am returning a multi-line cause-hierarchy of messages on the response. Let me know your thoughts. cc @klesh

@keon94 keon94 marked this pull request as ready for review September 1, 2022 22:54
Copy link
Copy Markdown
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

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

LGTM

@klesh klesh merged commit 8595fd4 into apache:main Sep 2, 2022
@keon94 keon94 deleted the issues/2134 branch September 2, 2022 16:03
yuqiangabab added a commit to yuqiangabab/incubator-devlake that referenced this pull request Sep 4, 2022
* main: (59 commits)
  [feat-2134][framework]: Rework the error management code in the Backend (apache#2763)
  fix: add missing jenkins proxy field on save (apache#2903)
  feat: setup database migration alert dialog on ui (apache#2859)
  fix: cached plan must not change result type in postgres
  fix(configui): use id instead of key
  fix(jira): use issuetype.name if issuetype has no untranslatedName
  fix: add `type` field in `boards` table (apache#2885)
  fix: change the filed user_id to account_id in table pr_comments and issue_comments (apache#2850)
  fix: fix a rebase bug (apache#2916)
  fix: source_type shorthand
  feat: support source dsn
  fix(jira): add jira 7 support
  feat: dbt add download packages functions and logging functions
  feat: add page for history runs at blueprint state (apache#2899)
  refactor: replace connectionLimit with exist state (apache#2895)
  fix: fix the wrong router when adding a connection (apache#2893)
  fix: update wording and typo for pr template (apache#2902)
  feat: jira support define standard status (apache#2881)
  docs: update pr template (apache#2900)
  fix: move setAllConnections to the right statement (apache#2889)
  ...

# Conflicts:
#	models/migrationscripts/register.go
#	services/blueprint.go
#	services/pipeline.go
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.

Add more context to error messages

3 participants