You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "zrhoffman (via GitHub)" <gi...@apache.org> on 2023/09/15 17:05:01 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7806: `cdns/{{name}}/federations` and `cdns/{{name}}/federations/{{ID}}` use RFC3339 timestamps

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


##########
traffic_ops/traffic_ops_golang/cdnfederation/cdnfederations.go:
##########
@@ -21,21 +23,27 @@ package cdnfederation
 
 import (
 	"database/sql"
+	_ "embed" // needed to embed SQL queries within Go variables

Review Comment:
   None of the file-embedded queries use named parameters. Just use sql, not sqlx, unless I'm missing something?



##########
infrastructure/cdn-in-a-box/enroller/enroller.go:
##########
@@ -842,13 +847,8 @@ func enrollFederation(toSession *session, r io.Reader) error {
 				return err
 			}
 			cdnFederation = resp.Response
-			if cdnFederation.ID == nil {
-				err = fmt.Errorf("federation returned from creation through Traffic Ops with null or undefined ID")
-				log.Infoln(err)
-				return err
-			}

Review Comment:
   Why remove this check? Will the following POST succeed with no federation ID?



-- 
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: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org