Fixes Stats Summary V5 apis to respond with RFC3339 date/time Format#7545
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7545 +/- ##
============================================
+ Coverage 27.51% 30.20% +2.68%
Complexity 98 98
============================================
Files 686 793 +107
Lines 78851 83815 +4964
Branches 90 896 +806
============================================
+ Hits 21697 25315 +3618
- Misses 55090 56374 +1284
- Partials 2064 2126 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 107 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ce04a0b to
313da4b
Compare
313da4b to
48fe3d4
Compare
| if resp.StatDate != nil { | ||
| statDate, err := parseTimeV5(*resp.StatDate) | ||
| if err != nil { | ||
| return errors.New("invalid timestamp given for statDate") |
There was a problem hiding this comment.
Could you add the error detail here?
|
|
||
| ss.SummaryTime, err = parseTimeV5(resp.SummaryTime) | ||
| if err != nil { | ||
| return errors.New("invalid timestamp given for summaryTime") |
| Alias: (Alias)(ss), | ||
| } | ||
| if ss.StatDate != nil { | ||
| resp.StatDate = util.Ptr(ss.StatDate.Format(dateFormat)) |
There was a problem hiding this comment.
Shouldn't this also be RFC3339?
There was a problem hiding this comment.
RFC3339 will return date and time. but the expectation is only the date. So as used in the v4 function, in v5 aswell we are using dateFormat
const dateFormat = "2006-01-02"
58c4e99 to
adb19bd
Compare
|
Looks like the api tests are failing fir stats_summary. |
b4cf7c5 to
088ef01
Compare
The integration and unit tests are passing. This looks like the newly added contract testing. |
* Added current_time_epoch_ms and changes calculation for timestamp for ms * assigning current_time_epoch_ms to result.Time in Handler * updated CHANGELOG.md * Added check for elapsedTime. * Addressed review comments. * Added prevResult check back * pointer assignment for structure. * updated cache unite test with another check.
71dc0a3 to
200b082
Compare
Closes: #7544
Related: #5911
What is the best way to verify this PR?
Make Api calls to stats_summary 5.0
Stats_Summary to Use RFC3339 Format
If this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist