zrhoffman commented on code in PR #7192:
URL: https://github.com/apache/trafficcontrol/pull/7192#discussion_r1022032181


##########
tc-health-client/tmagent/tmagent.go:
##########
@@ -656,7 +656,9 @@ func (pi *ParentInfo) GetTOData(cfg *config.Cfg) error {
                if *sv.CDNName != cfg.CDNName {
                        continue
                }
-               if sv.Type == tc.MonitorTypeName && tc.CacheStatus(*sv.Status) 
== tc.CacheStatusOnline {
+               // added OR because MonitorTypeName has been updated to 
'TRAFFIC_MONITOR' and TO still has then listed as 'RASCAL'
+               // this will allow it to work either way and can be removed 
once TO is updated.
+               if (sv.Type == tc.MonitorTypeName || sv.Type == "RASCAL") && 
tc.CacheStatus(*sv.Status) == tc.CacheStatusOnline {

Review Comment:
   I just read the comment (and noticed the rest of the code line, which 
includes `tc.MonitorTypeName` anyway).
   
   [this will allow it to work either way and can be removed once TO is 
updated.](https://github.com/apache/trafficcontrol/blob/1c26082ebff759f4311845caee0d5cc1e0a4baa4/tc-health-client/tmagent/tmagent.go#L660)
   
   I agree that checking for both `"TRAFFIC_MONITIOR"` and `"RASCAL"` is useful 
here, but I still think only shared constants should be used. How about making 
a new constant for "`RASCAL"`? Not sure how to version it, but there's def 
value in keeping the old one around to help with upgrades



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