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

ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report #911

Merged
merged 8 commits into from
Jan 11, 2024

Conversation

mikeyangyun
Copy link

@mikeyangyun mikeyangyun commented Jan 11, 2024

Summary

Currently our system will throw excepiton when we encouter some error, but the message cannot reveal the underlying cause.

We want to identify the source of the error: Jira, the pipeline, or the codebase.

Before

We will just throw exception when generating report encounter 4XX error.

After

We will identify the source of 4XX error and wrap error info into response, also we will not throw 4XX exception.
Only 5XX exception will be throwed.
image

Note

Null

Copy link

codacy-production bot commented Jan 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3d95dd9) 5106 5106 100.00%
Head commit (0219d5c) 10230 (+5124) 10230 (+5124) 100.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#911) 30 30 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

Copy link

Hi @mikeyangyun! 👋
Thank you for submitting a pull request! We appreciate your contribution and will review your changes as soon as possible.

Copy link

@mjx20045912 mjx20045912 left a comment

Choose a reason for hiding this comment

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

LGTM

@guzhongren guzhongren merged commit b33b7ad into main Jan 11, 2024
42 checks passed
@guzhongren guzhongren deleted the ADM-735 branch January 11, 2024 16:11
neomgb pushed a commit that referenced this pull request Jan 12, 2024
…throw 401,403,404 exception when generate report (#911)

* ADM-735:[backend]chore: update api design

* ADM-735:[backend]feat: add reportError and errorInfo class

* ADM-735:[backend]feat: add reportError in response

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report

* ADM-735 update error msg

* ADM-652[frontend][backend] update error message

---------

Co-authored-by: Yunsong <[email protected]>
Co-authored-by: guzhongren <[email protected]>
sqsq5566 pushed a commit that referenced this pull request Jan 12, 2024
…throw 401,403,404 exception when generate report (#911)

* ADM-735:[backend]chore: update api design

* ADM-735:[backend]feat: add reportError and errorInfo class

* ADM-735:[backend]feat: add reportError in response

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report

* ADM-735 update error msg

* ADM-652[frontend][backend] update error message

---------

Co-authored-by: Yunsong <[email protected]>
Co-authored-by: guzhongren <[email protected]>
sqsq5566 added a commit that referenced this pull request Jan 12, 2024
* ADM-675: [backend]fix:delete cache in getPipelineStepsInfo method

* ADM-675: [backend]fix:delete  getPipelineStepsInfo method's cache config

* ADM-675: [backend]feat:add cache for  getPipelineStepsInfo & getPipelineSteps method

* fix(audit): upgrade axios to resovle follow-redirects issue

* ADM-652 [frontend] feat: change word and fix test (#908)

* ADM-652 [frontend] feat: change word and fix test

* ADM-652 [frontend] feat: extra getTitleUnit

* ADM-652 [frontend] feat: fix code quality

* ADM-652[frontend] update unit

* ADM-652[frontend] update show more

---------

Co-authored-by: guzhongren <[email protected]>

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report (#911)

* ADM-735:[backend]chore: update api design

* ADM-735:[backend]feat: add reportError and errorInfo class

* ADM-735:[backend]feat: add reportError in response

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report

* ADM-735 update error msg

* ADM-652[frontend][backend] update error message

---------

Co-authored-by: Yunsong <[email protected]>
Co-authored-by: guzhongren <[email protected]>

* ADM-709:[backend][docs]:Verify buildkite and obtain buildkite data with new API (#914)

* ADM-709:[backend]feat: add verify token and get info for buildKite controller

---------

Co-authored-by: Andrea <Andrea2000728>

* Adm 727 (#915)

* ADM-727:[backend]fix: refactor generateDorareport method

* ADM-727:[backend]refactor: fix log info

* ADM-727:[backend]refactor: extract report id to make code clear

* ADM-727:[backend]refactor: format

* ADM-727:[backend]refactor: keep async only in one thread

---------

Co-authored-by: LEI WANG <[email protected]>
Co-authored-by: Yunsong <[email protected]>

* ADM-652 [frontend] style: enhance style for calendar

* ADM-652 [frontend] style: change word

* ADM-652: [frontend] test: fix tests

* merge

* ADM-669: [frontend] refactor: rename notification component

* ADM-669: [frontend] feat: map style upon notification type

* ADM-669: [frontend] feat: update expire message

* ADM-669: [frontend] style: make notification fixed

* ADM-669: [frontend] feat: update notification display logic

* ADM-669: [frontend] refactor: remove useless ?

* ADM-669: [frontend] feat: update notification display logic

* ADM-669: [frontend] refactor: remove useless tests

* ADM-669: [frontend] test: fix tests

* ADM-669: [frontend] test: fix notification tests

* ADM-669: [frontend] test: add notification type tests

* ADM-669: [frontend] feat: reset notification when switch page type

* ADM-669: [frontend] test: fix report tests

* ADM-669: [frontend] fix: fix code issues

* ADM-669: [frontend] fix: fix code issues

* ADM-669: [frontend] fix: fix comment issues

* ADM-669: [frontend] fix: fix e2e test

* ADM-717[docs]refactor: delete useless exception

* ADM-709:[backend][docs]:Verify buildkite and obtain buildkite data with new API (#914)

* ADM-709:[backend]feat: add verify token and get info for buildKite controller

---------

Co-authored-by: Andrea <Andrea2000728>

* ADM-675: [backend]fix:fix the format

---------

Co-authored-by: guzhongren <[email protected]>
Co-authored-by: 李雪冰 <[email protected]>
Co-authored-by: yunsong.yang <[email protected]>
Co-authored-by: Yunsong <[email protected]>
Co-authored-by: andrea999 <[email protected]>
Co-authored-by: LeiWang <[email protected]>
Co-authored-by: LEI WANG <[email protected]>
Co-authored-by: xuebing <[email protected]>
Co-authored-by: JiangRu1 <[email protected]>
Co-authored-by: junbo.dai <[email protected]>
mrcuriosity-tw pushed a commit that referenced this pull request Jan 12, 2024
* ADM-675: [backend]fix:delete cache in getPipelineStepsInfo method

* ADM-675: [backend]fix:delete  getPipelineStepsInfo method's cache config

* ADM-675: [backend]feat:add cache for  getPipelineStepsInfo & getPipelineSteps method

* fix(audit): upgrade axios to resovle follow-redirects issue

* ADM-652 [frontend] feat: change word and fix test (#908)

* ADM-652 [frontend] feat: change word and fix test

* ADM-652 [frontend] feat: extra getTitleUnit

* ADM-652 [frontend] feat: fix code quality

* ADM-652[frontend] update unit

* ADM-652[frontend] update show more

---------

Co-authored-by: guzhongren <[email protected]>

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report (#911)

* ADM-735:[backend]chore: update api design

* ADM-735:[backend]feat: add reportError and errorInfo class

* ADM-735:[backend]feat: add reportError in response

* ADM-735:[backend]feat: calculate error info from three parts and not throw 401,403,404 exception when generate report

* ADM-735 update error msg

* ADM-652[frontend][backend] update error message

---------

Co-authored-by: Yunsong <[email protected]>
Co-authored-by: guzhongren <[email protected]>

* ADM-709:[backend][docs]:Verify buildkite and obtain buildkite data with new API (#914)

* ADM-709:[backend]feat: add verify token and get info for buildKite controller

---------

Co-authored-by: Andrea <Andrea2000728>

* Adm 727 (#915)

* ADM-727:[backend]fix: refactor generateDorareport method

* ADM-727:[backend]refactor: fix log info

* ADM-727:[backend]refactor: extract report id to make code clear

* ADM-727:[backend]refactor: format

* ADM-727:[backend]refactor: keep async only in one thread

---------

Co-authored-by: LEI WANG <[email protected]>
Co-authored-by: Yunsong <[email protected]>

* ADM-652 [frontend] style: enhance style for calendar

* ADM-652 [frontend] style: change word

* ADM-652: [frontend] test: fix tests

* merge

* ADM-669: [frontend] refactor: rename notification component

* ADM-669: [frontend] feat: map style upon notification type

* ADM-669: [frontend] feat: update expire message

* ADM-669: [frontend] style: make notification fixed

* ADM-669: [frontend] feat: update notification display logic

* ADM-669: [frontend] refactor: remove useless ?

* ADM-669: [frontend] feat: update notification display logic

* ADM-669: [frontend] refactor: remove useless tests

* ADM-669: [frontend] test: fix tests

* ADM-669: [frontend] test: fix notification tests

* ADM-669: [frontend] test: add notification type tests

* ADM-669: [frontend] feat: reset notification when switch page type

* ADM-669: [frontend] test: fix report tests

* ADM-669: [frontend] fix: fix code issues

* ADM-669: [frontend] fix: fix code issues

* ADM-669: [frontend] fix: fix comment issues

* ADM-669: [frontend] fix: fix e2e test

* ADM-717[docs]refactor: delete useless exception

* ADM-709:[backend][docs]:Verify buildkite and obtain buildkite data with new API (#914)

* ADM-709:[backend]feat: add verify token and get info for buildKite controller

---------

Co-authored-by: Andrea <Andrea2000728>

* ADM-675: [backend]fix:fix the format

---------

Co-authored-by: guzhongren <[email protected]>
Co-authored-by: 李雪冰 <[email protected]>
Co-authored-by: yunsong.yang <[email protected]>
Co-authored-by: Yunsong <[email protected]>
Co-authored-by: andrea999 <[email protected]>
Co-authored-by: LeiWang <[email protected]>
Co-authored-by: LEI WANG <[email protected]>
Co-authored-by: xuebing <[email protected]>
Co-authored-by: JiangRu1 <[email protected]>
Co-authored-by: junbo.dai <[email protected]>
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.

4 participants