rimashah25 commented on code in PR #6544:
URL: https://github.com/apache/trafficcontrol/pull/6544#discussion_r841960450


##########
lib/go-atscfg/cachedotconfig.go:
##########
@@ -67,22 +67,24 @@ func makeCacheDotConfigEdge(
        }
        warnings := []string{}
 
-       if server.Profile == nil {
-               return Cfg{}, makeErr(warnings, "server missing profile")
+       if server.ProfileNames == nil && len(server.ProfileNames) == 0 {
+               return Cfg{}, makeErr(warnings, "server missing profiles")
        }
 
        profileServerIDsMap := map[int]struct{}{}
        for _, sv := range servers {
-               if sv.Profile == nil {
+               if sv.ProfileNames == nil && len(sv.ProfileNames) == 0 {
                        warnings = append(warnings, "servers had server with 
nil profile, skipping!")
                        continue
                }
                if sv.ID == nil {
                        warnings = append(warnings, "servers had server with 
nil id, skipping!")
                        continue
                }
-               if *sv.Profile != *server.Profile {
-                       continue
+               for i, _ := range server.ProfileNames {
+                       if sv.ProfileNames[i] != server.ProfileNames[i] {
+                               continue
+                       }

Review Comment:
   Got it, thanks!



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