rawlinp commented on a change in pull request #5922:
URL: https://github.com/apache/trafficcontrol/pull/5922#discussion_r651896706
##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
##########
@@ -110,6 +110,42 @@ func (ds *TODeliveryService) IsTenantAuthorized(user
*auth.CurrentUser) (bool, e
return isTenantAuthorized(ds.ReqInfo, &ds.DeliveryServiceV4)
}
+const getTLSVersionsQuery = `
+SELECT tls_version
+FROM public.deliveryservice_tls_version
+WHERE deliveryservice = $1
+ORDER BY tls_version
+`
+
+// GetDSTLSVersions retrieves the TLS versions explicitly supported by a
+// Delivery Service identified by dsID. This will panic if handed a nil
Review comment:
> It might be obvious to you, being familiar with how the TO codebase
most often has functions that panic when given nil transactions
The audience for these comments is TO developers, who will surely learn
quickly that you can't get anywhere with a nil DB transaction when you need to
access the DB. I don't care strongly enough to -1 this PR for these few
instances, but I would -1 a PR that added these comments to every function of
this kind.
--
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]