-
Notifications
You must be signed in to change notification settings - Fork 346
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
Refactor API handler wrapping #7926
Open
ocket8888
wants to merge
7
commits into
apache:master
Choose a base branch
from
ocket8888:to/api-wrap-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
ocket8888
added
Traffic Ops
related to Traffic Ops
low impact
affects only a small portion of a CDN, and cannot itself break one
tech debt
rework due to choosing easy/limited solution
labels
Jan 23, 2024
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7926 +/- ##
============================================
+ Coverage 29.09% 32.06% +2.97%
Complexity 98 98
============================================
Files 605 722 +117
Lines 77535 82925 +5390
Branches 90 970 +880
============================================
+ Hits 22558 26590 +4032
- Misses 52894 54183 +1289
- Partials 2083 2152 +69
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ocket8888
force-pushed
the
to/api-wrap-refactor
branch
from
January 25, 2024 23:11
d5e3019
to
870c26a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
low impact
affects only a small portion of a CDN, and cannot itself break one
tech debt
rework due to choosing easy/limited solution
Traffic Ops
related to Traffic Ops
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This refactors
api.Handler
such that the return type is a single error instead of a user-facing error, a system-facing error, and a status code. It then handles the error specially if it is anapi.Errors
implementation. I also updated usage accordingly throughout the two endpoint handling packages that useapi.Wrap
.Essentially this reduces
to
and
to
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
This is just a refactor; behavior should be unchanged and the existing tests should continue to pass.
PR submission checklist