Rewrite current stats from Perl to Golang#4114
Conversation
|
Still need to look into why Perl implementation did https://github.com/apache/trafficcontrol/blob/master/traffic_ops/app/lib/Utils/Helper.pm#L39 on each cdn name for the query and if that escaping is handled for us in the Golang Influxdb client |
|
Refer to this link for build results (access rights to CI server needed): |
|
So then is a work in progress or ready for review? |
|
@ocket8888 this is ready for review. The perl code did replace on ,',",\n in the CDN names prior to going to influxdb but all are blocked from even being apart of a CDN name in the first place -> https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/cdn/cdns.go#L112 |
|
Refer to this link for build results (access rights to CI server needed): |
ocket8888
left a comment
There was a problem hiding this comment.
Appears to work fine in its own right, but has a regression, unfortunately.
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
ocket8888
left a comment
There was a problem hiding this comment.
Works, docs build without error/warning and look accurate, thorough and properly rendered, all tests pass.
What does this PR (Pull Request) do?
This PR rewrites current_stats from Perl to Golang and adds API documentation for it.
Currently no tests as we do not have Traffic Stats available for TO Api tests.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Build traffic ops with PR code and then hit /current_stats, it should return the same data as perl implementation
If this is a bug fix, what versions of Traffic Control are affected?
The following criteria are ALL met by this PR
Additional Information