Rewrite GET stats_summary from Perl to Golang#4127
Conversation
|
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): |
|
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): |
|
Refer to this link for build results (access rights to CI server needed): |
ocket8888
left a comment
There was a problem hiding this comment.
Weird that we vendored ourselves there
mhoppa
left a comment
There was a problem hiding this comment.
Will reach out to the mailing list on client changes
|
Refer to this link for build results (access rights to CI server needed): |
|
I tried testing this out with ciab but only got an empty response for the call to |
|
@mitchell852 yeah the stats_summary is done daily from TS so you would either have to POST to /stats_summary/create or have TS up for a day. |
ocket8888
left a comment
There was a problem hiding this comment.
I POSTed some data to stats_summary/create and tried to GET it, got an Internal Server Error:
trafficops_1 | ERROR: api.go:136: 2019-12-17T16:51:56.838201203Z: 172.19.0.1:34626 scanning stats summary: sql: Scan error on column index 6, name "stat_date": unsupported Scan, storing driver.Value type <nil> into type *time.Time
(which seems weird to me because I think nil is a valid pointer value? maybe it means *time.Time cannot be a reference to a pointer value?)
The data I POSTed:
{
"cdnName": "CDN-in-a-Box",
"deliveryserviceName": "demo1",
"statName": "test",
"statValue": "100",
"summaryTime": "2016-01-01"
}|
@ocket8888 fixed |
ocket8888
left a comment
There was a problem hiding this comment.
unit tests and API/integration tests all pass, manual test confirms it works, docs build without warnings and look good/accurate
What does this PR (Pull Request) do?
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Run API tests (once added to PR) or pull down and manually test to ensure stats summary matches parity with 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