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

APIInfo refactor #7902

Merged
merged 4 commits into from
Jan 19, 2024
Merged

APIInfo refactor #7902

merged 4 commits into from
Jan 19, 2024

Conversation

ocket8888
Copy link
Contributor

This PR renames the api.APIInfo structure commonly used in Traffic Ops to a less stutter-y api.Info. That's going to be the majority of the changes.

The more important ones, though, are those that move the api.Info structure and its methods and NewInfo into their own, separate file, which will make it much easier to deal with moving forward.

Lastly, I added some tests to some things that weren't being tested.


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops

What is the best way to verify this PR?

Make sure all of the tests pass

PR submission checklist

  • This PR has tests
  • This PR has documentation
  • This PR doesn't need a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY

I also added some tests for some Info methods/related functions that
didn't have any tests, and I moved the APIInfoImpl type to the only
place where it's actually used.
@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops high impact impacts the basic function, deployment, or operation of a CDN tech debt rework due to choosing easy/limited solution labels Jan 11, 2024
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 68 lines in your changes are missing coverage. Please review.

Comparison is base (adea91d) 28.84% compared to head (31c5447) 31.95%.
Report is 2 commits behind head on master.

Files Patch % Lines
...fic_ops_golang/deliveryservice/deliveryservices.go 0.00% 12 Missing ⚠️
...fic_ops_golang/deliveryservice/request/requests.go 12.50% 7 Missing ⚠️
...ffic_ops_golang/deliveryservice/servers/servers.go 12.50% 7 Missing ⚠️
traffic_ops/traffic_ops_golang/server/servers.go 0.00% 7 Missing ⚠️
...traffic_ops_golang/cdnfederation/cdnfederations.go 33.33% 4 Missing ⚠️
...ic_ops_golang/invalidationjobs/invalidationjobs.go 0.00% 4 Missing ⚠️
traffic_ops/traffic_ops_golang/api/info.go 98.21% 2 Missing and 1 partial ⚠️
...ffic_ops/traffic_ops_golang/topology/topologies.go 0.00% 3 Missing ⚠️
traffic_ops/traffic_ops_golang/cdni/shared.go 0.00% 2 Missing ⚠️
traffic_ops/traffic_ops_golang/logs/log.go 0.00% 2 Missing ⚠️
... and 15 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7902      +/-   ##
============================================
+ Coverage     28.84%   31.95%   +3.11%     
  Complexity       98       98              
============================================
  Files           602      721     +119     
  Lines         77445    82822    +5377     
  Branches         90      970     +880     
============================================
+ Hits          22342    26469    +4127     
- Misses        53012    54203    +1191     
- Partials       2091     2150      +59     
Flag Coverage Δ
golib_unit 53.85% <ø> (ø)
grove_unit 12.02% <ø> (ø)
t3c_unit 5.88% <ø> (+0.11%) ⬆️
traffic_monitor_unit 25.47% <ø> (ø)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 21.93% <72.24%> (+0.29%) ⬆️
traffic_portal_v2 74.37% <ø> (?)
traffic_stats_unit 10.78% <ø> (ø)
unit_tests 29.29% <72.24%> (+3.62%) ⬆️
v3 57.79% <ø> (ø)
v4 79.18% <ø> (ø)
v5 78.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ocket8888 ocket8888 mentioned this pull request Jan 11, 2024
6 tasks
@zrhoffman zrhoffman merged commit d5b3f30 into apache:master Jan 19, 2024
45 checks passed
@ocket8888 ocket8888 deleted the to/api-info-refactor branch January 19, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high impact impacts the basic function, deployment, or operation of a CDN tech debt rework due to choosing easy/limited solution Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants