ocket8888 commented on a change in pull request #5922:
URL: https://github.com/apache/trafficcontrol/pull/5922#discussion_r651800265
##########
File path: lib/go-tc/deliveryservices.go
##########
@@ -192,18 +194,416 @@ type DeliveryServiceFieldsV31 struct {
// DeliveryServiceV40 is a Delivery Service as it appears in version 4.0 of the
// Traffic Ops API.
type DeliveryServiceV40 struct {
Review comment:
I did that because I copy/pasted it in from the "DS Active Flag"
changes, where that was actually necessary because it's changing the type of
something that was in the lowest-level struct in that "inheritance" tree. I can
change it to use nesting, but as soon as we make a breaking change it'll need
to do this anyway - for example this PR is still changing a couple of things:
the DS match list in API < v4 is a pointer to a slice, which is an unnecessary
double-null-check headache because slices are already "nullable", and the
`lastUpdated` field is currently in the special ATC format but this changes it
to use RFC3339 by switching from `TimeNoMod` to `time.Time`. Those changes
seemed too small to warrant their own PR to me, so I left them in, but I'll
take them out if you want. I don't think switching time formats should be done
across all objects in a single PR, because for things that use the CRUDer
that'll mean either doubling the amount of code per endpoint to allow backwar
d compatibility, or rewriting them to not use the CRUDer. I think. Depending
on the "flavor" of CRUDer they use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]