ocket8888 commented on code in PR #6213:
URL: https://github.com/apache/trafficcontrol/pull/6213#discussion_r876389780


##########
traffic_ops/traffic_ops_golang/cdn/dnssecrefresh.go:
##########
@@ -375,7 +375,7 @@ WITH cdn_profile_ids AS (
     MAX(p.id) as profile_id -- We only want 1 profile, so get the 
probably-newest if there's more than one.
   FROM
     cdn c
-    LEFT JOIN profile p ON c.id = p.cdn AND (p.name like 'CCR%' OR p.name like 
'TR%')
+    LEFT JOIN profile p ON c.id = p.cdn AND (p.type = 'TR_PROFILE')

Review Comment:
   Probably. But there's also no constant for any other profile type - except 
`GROVE_PROFILE` which has a constant in the 
`github.com/apache/trafficcontrol/grove/grovetccfg/main` package, but that 
hardly counts since it's in `main` and therefore isn't exported and thus 
unusable anywhere else.
   
   What I'm getting at is all of these should have constants, and while I'm 
prepared to do that it would make the PR a bit bigger. Not by much, since it 
turns out most of them aren't used anywhere (only `GROVE_PROFILE`, 
`ATS_PROFILE`, and `TR_PROFILE` are used in Go source files, that I could 
find). So if you want me to do that lmk and I will - I just don't feel good 
about leaving it half-done by only making one constant for TR_PROFILE.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to