[GitHub] asfgit commented on issue #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table
asfgit commented on issue #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table URL: https://github.com/apache/trafficcontrol/pull/2314#issuecomment-397127532 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1818/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dangogh closed pull request #2408: Refactored the API Tests to run in a Docker container
dangogh closed pull request #2408: Refactored the API Tests to run in a Docker container URL: https://github.com/apache/trafficcontrol/pull/2408 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/traffic_ops/testing/api/docker/Dockerfile b/traffic_ops/testing/api/docker/Dockerfile new file mode 100644 index 0..7d5952fdc --- /dev/null +++ b/traffic_ops/testing/api/docker/Dockerfile @@ -0,0 +1,53 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +FROM golang:1.10.1 +MAINTAINER Dewayne Richardson + +RUN pwd +ARG DB_NAME +ARG DB_SERVER +ARG DB_PORT +ARG DB_USER +ARG DB_PASSWORD + +ENV DB_NAME=$DB_SERVER +ENV DB_SERVER=$DB_SERVER +ENV DB_PORT=$DB_PORT +ENV DB_USER=$DB_SERVER +ENV DB_PASSWORD=$DB_PASSWORD + +ARG SRC_DIR=/go/src +ARG TC_DIR=$SRC_DIR/github.com/apache/incubator-trafficcontrol +ARG TESTING_DIR=$TC_DIR/traffic_ops/testing +ARG TESTING_API_DIR=$TESTING_DIR/api + +#COPY --from=trafficops-perl /opt/traffic_ops/app/bin/traffic_ops_golang /opt/traffic_ops/app/bin/traffic_ops_golang +#COPY --from=trafficops-perl /usr/local/go /usr/local/go + +WORKDIR $TC_DIR + +# Add the lib/go-tc dir +ADD lib lib + +# Add the dependent dirs (without the cruft) +ADD traffic_ops/traffic_ops_golang traffic_ops/traffic_ops_golang +ADD traffic_ops/vendor traffic_ops/vendor +ADD traffic_ops/testing/api traffic_ops/testing/api +ADD traffic_ops/client traffic_ops/client + +#ADD conf . +WORKDIR $TESTING_API_DIR/v13 +CMD ../docker/run_api_tests.sh + +# vi:syntax=Dockerfile diff --git a/traffic_ops/testing/api/docker/Dockerfile-to-base b/traffic_ops/testing/api/docker/Dockerfile-to-base deleted file mode 100644 index 7718efa0c..0 --- a/traffic_ops/testing/api/docker/Dockerfile-to-base +++ /dev/null @@ -1,74 +0,0 @@ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -#FROM centos:7.2.1511 -FROM centos:7 -MAINTAINER Dan Kirkwood - -RUN yum -y install \ - https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm - -RUN yum -y install \ -epel-release \ -vim \ -cpanminus \ -expat-devel \ -gcc-c++ \ -libcurl \ -libcurl-devel \ -libidn-devel \ -libpcap-devel \ -mkisofs \ -nmap-ncat \ -openssl-devel \ -perl \ -perl-App-cpanminus \ -perl-DBD-Pg \ -perl-DBI \ -perl-Digest-SHA1 \ -perl-JSON \ -perl-TermReadKey \ -perl-Test-CPAN-Meta \ -perl-WWW-Curl \ -perl-core \ -perl-libwww-perl \ -perl-Crypt-ScryptKDF \ -postgresql96 \ -postgresql96-devel && \ -yum clean all - -RUN cpanm -n Carton - -ARG TO_DIR=traffic_ops -ARG API_DOCKER_DIR=traffic_ops/testing/api/docker - -ARG TO_RPM=traffic_ops-2.2.0-7398.7bb32b09.el7.x86_64.rpm -ADD $API_DOCKER_DIR/$TO_RPM / -WORKDIR / -RUN yum -y install $TO_RPM - -ADD $TO_DIR/install/bin/install_goose.sh / -ADD $TO_DIR/install/bin/install_go.sh / -RUN /install_go.sh -RUN /install_goose.sh - - -#ADD $API_DOCKER_DIR/local /opt/traffic_ops/app -WORKDIR /opt/traffic_ops/app - -RUN POSTGRES_HOME=/usr/pgsql-9.6 carton - -CMD bash -c 'echo "Completed"' -#CMD bash -c 'mv -v local /' - -#EXPOSE 60443 diff --git a/traffic_ops/testing/api/docker/Dockerfile-to-test b/traffic_ops/testing/api/docker/Dockerfile-to-test deleted file mode 100644 index 63d359717..0 --- a/traffic_ops/testing/api/docker/Dockerfile-to-test +++ /dev/null @@ -1,48 +0,0 @@ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless
[GitHub] rawlinp opened a new pull request #2411: Add Go DS API query parameter alias for xml_id -> xmlId
rawlinp opened a new pull request #2411: Add Go DS API query parameter alias for xml_id -> xmlId URL: https://github.com/apache/trafficcontrol/pull/2411 The Perl version did not support this query parameter, but it probably should have because it's more intuitive to have it match the field name. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rob05c closed pull request #2410: Fix go DS API query params for filtering/ordering
rob05c closed pull request #2410: Fix go DS API query params for filtering/ordering URL: https://github.com/apache/trafficcontrol/pull/2410 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go index a4685a0d6..50497807a 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go @@ -621,8 +621,18 @@ func readGetDeliveryServices(params map[string]string, db *sqlx.DB, user auth.Cu // Query Parameters to Database Query column mappings // see the fields mapped in the SQL query queryParamsToSQLCols := map[string]dbhelpers.WhereColumnInfo{ - "id": dbhelpers.WhereColumnInfo{"ds.id", api.IsInt}, - "hostName": dbhelpers.WhereColumnInfo{"s.host_name", nil}, + "id": dbhelpers.WhereColumnInfo{"ds.id", api.IsInt}, + "cdn": dbhelpers.WhereColumnInfo{"ds.cdn_id", api.IsInt}, + "xml_id": dbhelpers.WhereColumnInfo{"ds.xml_id", nil}, + "profile": dbhelpers.WhereColumnInfo{"ds.profile", api.IsInt}, + "type": dbhelpers.WhereColumnInfo{"ds.type", api.IsInt}, + "logsEnabled": dbhelpers.WhereColumnInfo{"ds.logs_enabled", api.IsBool}, + "tenant": dbhelpers.WhereColumnInfo{"ds.tenant_id", api.IsInt}, + "signingAlgorithm": dbhelpers.WhereColumnInfo{"ds.signing_algorithm", nil}, + } + + if _, ok := params["orderby"]; !ok { + params["orderby"] = "xml_id" } where, orderBy, queryValues, errs := dbhelpers.BuildWhereAndOrderBy(params, queryParamsToSQLCols) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rawlinp opened a new pull request #2410: Fix go DS API query params for filtering/ordering
rawlinp opened a new pull request #2410: Fix go DS API query params for filtering/ordering URL: https://github.com/apache/trafficcontrol/pull/2410 Add ability to filter by the same columns the Perl version allows filtering on. By default, order GET deliveryservices by xml_id if an orderby query parameter isn't specified in the request (this is what the Perl version does). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rivasj commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
rivasj commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195246642 ## File path: lib/go-tc/deliveryservices.go ## @@ -58,59 +58,60 @@ type DeleteDeliveryServiceResponse struct { // DeliveryService ... // TODO move contents to DeliveryServiceV12, fix references, and remove type DeliveryService struct { - Active bool `json:"active"` - CacheURL string `json:"cacheurl"` - CCRDNSTTLint`json:"ccrDnsTtl"` - CDNIDint`json:"cdnId"` - CDNName string `json:"cdnName"` - CheckPathstring `json:"checkPath"` - DeepCachingType DeepCachingType`json:"deepCachingType"` - DisplayName string `json:"displayName"` - DNSBypassCname string `json:"dnsBypassCname"` - DNSBypassIP string `json:"dnsBypassIp"` - DNSBypassIP6 string `json:"dnsBypassIp6"` - DNSBypassTTL int`json:"dnsBypassTtl"` - DSCP int`json:"dscp"` - EdgeHeaderRewritestring `json:"edgeHeaderRewrite"` - ExampleURLs []string `json:"exampleURLs"` - GeoLimit int`json:"geoLimit"` - FQPacingRate int`json:"fqPacingRate"` - GeoProvider int`json:"geoProvider"` - GlobalMaxMBPSint`json:"globalMaxMbps"` - GlobalMaxTPS int`json:"globalMaxTps"` - HTTPBypassFQDN string `json:"httpBypassFqdn"` - ID int`json:"id"` - InfoURL string `json:"infoUrl"` - InitialDispersionfloat32`json:"initialDispersion"` - IPV6RoutingEnabled bool `json:"ipv6RoutingEnabled"` - LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"` - LogsEnabled bool `json:"logsEnabled"` - LongDesc string `json:"longDesc"` - LongDesc1string `json:"longDesc1"` - LongDesc2string `json:"longDesc2"` - MatchList[]DeliveryServiceMatch `json:"matchList,omitempty"` - MaxDNSAnswersint`json:"maxDnsAnswers"` - MidHeaderRewrite string `json:"midHeaderRewrite"` - MissLat float64`json:"missLat"` - MissLong float64`json:"missLong"` - MultiSiteOrigin bool `json:"multiSiteOrigin"` - OrgServerFQDNstring `json:"orgServerFqdn"` - ProfileDesc string `json:"profileDescription"` - ProfileIDint`json:"profileId,omitempty"` - ProfileName string `json:"profileName"` - Protocol int`json:"protocol"` - QStringIgnoreint`json:"qstringIgnore"` - RangeRequestHandling int `json:"rangeRequestHandling"` - RegexRemap string `json:"regexRemap"` - RegionalGeoBlocking bool `json:"regionalGeoBlocking"` - RemapTextstring `json:"remapText"` - RoutingName string `json:"routingName"` - SigningAlgorithm string `json:"signingAlgorithm" db:"signing_algorithm"` - TypeID int`json:"typeId"` - Type string `json:"type"` - TRResponseHeadersstring `json:"trResponseHeaders"` - TenantID int`json:"tenantId,omitempty"` - XMLIDstring `json:"xmlId"` + Active bool `json:"active"` + AnonymousBlockingEnabled bool `json:"anonymousBlockingEnabled"` Review comment: Yes, that makes sense. I'll make the change. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mitchell852 commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
mitchell852 commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195243156 ## File path: lib/go-tc/deliveryservices.go ## @@ -58,59 +58,60 @@ type DeleteDeliveryServiceResponse struct { // DeliveryService ... // TODO move contents to DeliveryServiceV12, fix references, and remove type DeliveryService struct { - Active bool `json:"active"` - CacheURL string `json:"cacheurl"` - CCRDNSTTLint`json:"ccrDnsTtl"` - CDNIDint`json:"cdnId"` - CDNName string `json:"cdnName"` - CheckPathstring `json:"checkPath"` - DeepCachingType DeepCachingType`json:"deepCachingType"` - DisplayName string `json:"displayName"` - DNSBypassCname string `json:"dnsBypassCname"` - DNSBypassIP string `json:"dnsBypassIp"` - DNSBypassIP6 string `json:"dnsBypassIp6"` - DNSBypassTTL int`json:"dnsBypassTtl"` - DSCP int`json:"dscp"` - EdgeHeaderRewritestring `json:"edgeHeaderRewrite"` - ExampleURLs []string `json:"exampleURLs"` - GeoLimit int`json:"geoLimit"` - FQPacingRate int`json:"fqPacingRate"` - GeoProvider int`json:"geoProvider"` - GlobalMaxMBPSint`json:"globalMaxMbps"` - GlobalMaxTPS int`json:"globalMaxTps"` - HTTPBypassFQDN string `json:"httpBypassFqdn"` - ID int`json:"id"` - InfoURL string `json:"infoUrl"` - InitialDispersionfloat32`json:"initialDispersion"` - IPV6RoutingEnabled bool `json:"ipv6RoutingEnabled"` - LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"` - LogsEnabled bool `json:"logsEnabled"` - LongDesc string `json:"longDesc"` - LongDesc1string `json:"longDesc1"` - LongDesc2string `json:"longDesc2"` - MatchList[]DeliveryServiceMatch `json:"matchList,omitempty"` - MaxDNSAnswersint`json:"maxDnsAnswers"` - MidHeaderRewrite string `json:"midHeaderRewrite"` - MissLat float64`json:"missLat"` - MissLong float64`json:"missLong"` - MultiSiteOrigin bool `json:"multiSiteOrigin"` - OrgServerFQDNstring `json:"orgServerFqdn"` - ProfileDesc string `json:"profileDescription"` - ProfileIDint`json:"profileId,omitempty"` - ProfileName string `json:"profileName"` - Protocol int`json:"protocol"` - QStringIgnoreint`json:"qstringIgnore"` - RangeRequestHandling int `json:"rangeRequestHandling"` - RegexRemap string `json:"regexRemap"` - RegionalGeoBlocking bool `json:"regionalGeoBlocking"` - RemapTextstring `json:"remapText"` - RoutingName string `json:"routingName"` - SigningAlgorithm string `json:"signingAlgorithm" db:"signing_algorithm"` - TypeID int`json:"typeId"` - Type string `json:"type"` - TRResponseHeadersstring `json:"trResponseHeaders"` - TenantID int`json:"tenantId,omitempty"` - XMLIDstring `json:"xmlId"` + Active bool `json:"active"` + AnonymousBlockingEnabled bool `json:"anonymousBlockingEnabled"` Review comment: i would say leave the Perl alone and take this out so 1.2 is not affected https://github.com/apache/trafficcontrol/blob/master/traffic_ops/app/lib/API/Deliveryservice.pm#L104 and then just add AnonymousBlockingEnabled to the v13 DS struct. does that make sense? This is an automated message from the Apache Git Service. To
[GitHub] dewrich commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
dewrich commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195241031 ## File path: traffic_ops/experimental/server/api/deliveryservices.go ## @@ -179,6 +179,7 @@ func postDeliveryservice(payload []byte, db *sqlx.DB) (interface{}, error) { sqlString += ",dns_bypass_cname" sqlString += ",tr_request_headers" sqlString += ",created_at" + sqlString += ",anonymous_blocking_enabled" Review comment: @rob05c then it needs to be removed This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2408: Refactored the API Tests to run in a Docker container
asfgit commented on issue #2408: Refactored the API Tests to run in a Docker container URL: https://github.com/apache/trafficcontrol/pull/2408#issuecomment-397089096 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1815/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dewrich opened a new pull request #2408: Refactored the API Tests to run in a container
dewrich opened a new pull request #2408: Refactored the API Tests to run in a container URL: https://github.com/apache/trafficcontrol/pull/2408 These are now compatible with the cdn-in-a-box docker containers This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195232902 ## File path: lib/go-tc/deliveryservices.go ## @@ -58,59 +58,60 @@ type DeleteDeliveryServiceResponse struct { // DeliveryService ... // TODO move contents to DeliveryServiceV12, fix references, and remove type DeliveryService struct { - Active bool `json:"active"` - CacheURL string `json:"cacheurl"` - CCRDNSTTLint`json:"ccrDnsTtl"` - CDNIDint`json:"cdnId"` - CDNName string `json:"cdnName"` - CheckPathstring `json:"checkPath"` - DeepCachingType DeepCachingType`json:"deepCachingType"` - DisplayName string `json:"displayName"` - DNSBypassCname string `json:"dnsBypassCname"` - DNSBypassIP string `json:"dnsBypassIp"` - DNSBypassIP6 string `json:"dnsBypassIp6"` - DNSBypassTTL int`json:"dnsBypassTtl"` - DSCP int`json:"dscp"` - EdgeHeaderRewritestring `json:"edgeHeaderRewrite"` - ExampleURLs []string `json:"exampleURLs"` - GeoLimit int`json:"geoLimit"` - FQPacingRate int`json:"fqPacingRate"` - GeoProvider int`json:"geoProvider"` - GlobalMaxMBPSint`json:"globalMaxMbps"` - GlobalMaxTPS int`json:"globalMaxTps"` - HTTPBypassFQDN string `json:"httpBypassFqdn"` - ID int`json:"id"` - InfoURL string `json:"infoUrl"` - InitialDispersionfloat32`json:"initialDispersion"` - IPV6RoutingEnabled bool `json:"ipv6RoutingEnabled"` - LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"` - LogsEnabled bool `json:"logsEnabled"` - LongDesc string `json:"longDesc"` - LongDesc1string `json:"longDesc1"` - LongDesc2string `json:"longDesc2"` - MatchList[]DeliveryServiceMatch `json:"matchList,omitempty"` - MaxDNSAnswersint`json:"maxDnsAnswers"` - MidHeaderRewrite string `json:"midHeaderRewrite"` - MissLat float64`json:"missLat"` - MissLong float64`json:"missLong"` - MultiSiteOrigin bool `json:"multiSiteOrigin"` - OrgServerFQDNstring `json:"orgServerFqdn"` - ProfileDesc string `json:"profileDescription"` - ProfileIDint`json:"profileId,omitempty"` - ProfileName string `json:"profileName"` - Protocol int`json:"protocol"` - QStringIgnoreint`json:"qstringIgnore"` - RangeRequestHandling int `json:"rangeRequestHandling"` - RegexRemap string `json:"regexRemap"` - RegionalGeoBlocking bool `json:"regionalGeoBlocking"` - RemapTextstring `json:"remapText"` - RoutingName string `json:"routingName"` - SigningAlgorithm string `json:"signingAlgorithm" db:"signing_algorithm"` - TypeID int`json:"typeId"` - Type string `json:"type"` - TRResponseHeadersstring `json:"trResponseHeaders"` - TenantID int`json:"tenantId,omitempty"` - XMLIDstring `json:"xmlId"` + Active bool `json:"active"` + AnonymousBlockingEnabled bool `json:"anonymousBlockingEnabled"` Review comment: But it was committed on May 14, 2018. The 1.2 API was standardized long before that. It's kind of understandable in Perl, because the Perl app doesn't have a decent way to do Semantic Versioning. But Go does, and we agreed to use Semantic Versioning on the mailing list. https://semver.org/ >2. MINOR version when you add functionality in a backwards-compatible manner Is there a big
[GitHub] rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195232902 ## File path: lib/go-tc/deliveryservices.go ## @@ -58,59 +58,60 @@ type DeleteDeliveryServiceResponse struct { // DeliveryService ... // TODO move contents to DeliveryServiceV12, fix references, and remove type DeliveryService struct { - Active bool `json:"active"` - CacheURL string `json:"cacheurl"` - CCRDNSTTLint`json:"ccrDnsTtl"` - CDNIDint`json:"cdnId"` - CDNName string `json:"cdnName"` - CheckPathstring `json:"checkPath"` - DeepCachingType DeepCachingType`json:"deepCachingType"` - DisplayName string `json:"displayName"` - DNSBypassCname string `json:"dnsBypassCname"` - DNSBypassIP string `json:"dnsBypassIp"` - DNSBypassIP6 string `json:"dnsBypassIp6"` - DNSBypassTTL int`json:"dnsBypassTtl"` - DSCP int`json:"dscp"` - EdgeHeaderRewritestring `json:"edgeHeaderRewrite"` - ExampleURLs []string `json:"exampleURLs"` - GeoLimit int`json:"geoLimit"` - FQPacingRate int`json:"fqPacingRate"` - GeoProvider int`json:"geoProvider"` - GlobalMaxMBPSint`json:"globalMaxMbps"` - GlobalMaxTPS int`json:"globalMaxTps"` - HTTPBypassFQDN string `json:"httpBypassFqdn"` - ID int`json:"id"` - InfoURL string `json:"infoUrl"` - InitialDispersionfloat32`json:"initialDispersion"` - IPV6RoutingEnabled bool `json:"ipv6RoutingEnabled"` - LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"` - LogsEnabled bool `json:"logsEnabled"` - LongDesc string `json:"longDesc"` - LongDesc1string `json:"longDesc1"` - LongDesc2string `json:"longDesc2"` - MatchList[]DeliveryServiceMatch `json:"matchList,omitempty"` - MaxDNSAnswersint`json:"maxDnsAnswers"` - MidHeaderRewrite string `json:"midHeaderRewrite"` - MissLat float64`json:"missLat"` - MissLong float64`json:"missLong"` - MultiSiteOrigin bool `json:"multiSiteOrigin"` - OrgServerFQDNstring `json:"orgServerFqdn"` - ProfileDesc string `json:"profileDescription"` - ProfileIDint`json:"profileId,omitempty"` - ProfileName string `json:"profileName"` - Protocol int`json:"protocol"` - QStringIgnoreint`json:"qstringIgnore"` - RangeRequestHandling int `json:"rangeRequestHandling"` - RegexRemap string `json:"regexRemap"` - RegionalGeoBlocking bool `json:"regionalGeoBlocking"` - RemapTextstring `json:"remapText"` - RoutingName string `json:"routingName"` - SigningAlgorithm string `json:"signingAlgorithm" db:"signing_algorithm"` - TypeID int`json:"typeId"` - Type string `json:"type"` - TRResponseHeadersstring `json:"trResponseHeaders"` - TenantID int`json:"tenantId,omitempty"` - XMLIDstring `json:"xmlId"` + Active bool `json:"active"` + AnonymousBlockingEnabled bool `json:"anonymousBlockingEnabled"` Review comment: But it was committed on May 14, 2018. The 1.2 API was standardized long before that. It's kind of understandable in Perl, because the Perl app doesn't have a decent way to do Semantic Versioning. But Go does, and we agreed to use Semantic Versioning on the mailing list. >https://semver.org/ >2. MINOR version when you add functionality in a backwards-compatible manner Is there a big
[GitHub] limited commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
limited commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195228980 ## File path: lib/go-tc/deliveryservices.go ## @@ -58,59 +58,60 @@ type DeleteDeliveryServiceResponse struct { // DeliveryService ... // TODO move contents to DeliveryServiceV12, fix references, and remove type DeliveryService struct { - Active bool `json:"active"` - CacheURL string `json:"cacheurl"` - CCRDNSTTLint`json:"ccrDnsTtl"` - CDNIDint`json:"cdnId"` - CDNName string `json:"cdnName"` - CheckPathstring `json:"checkPath"` - DeepCachingType DeepCachingType`json:"deepCachingType"` - DisplayName string `json:"displayName"` - DNSBypassCname string `json:"dnsBypassCname"` - DNSBypassIP string `json:"dnsBypassIp"` - DNSBypassIP6 string `json:"dnsBypassIp6"` - DNSBypassTTL int`json:"dnsBypassTtl"` - DSCP int`json:"dscp"` - EdgeHeaderRewritestring `json:"edgeHeaderRewrite"` - ExampleURLs []string `json:"exampleURLs"` - GeoLimit int`json:"geoLimit"` - FQPacingRate int`json:"fqPacingRate"` - GeoProvider int`json:"geoProvider"` - GlobalMaxMBPSint`json:"globalMaxMbps"` - GlobalMaxTPS int`json:"globalMaxTps"` - HTTPBypassFQDN string `json:"httpBypassFqdn"` - ID int`json:"id"` - InfoURL string `json:"infoUrl"` - InitialDispersionfloat32`json:"initialDispersion"` - IPV6RoutingEnabled bool `json:"ipv6RoutingEnabled"` - LastUpdated *TimeNoMod `json:"lastUpdated" db:"last_updated"` - LogsEnabled bool `json:"logsEnabled"` - LongDesc string `json:"longDesc"` - LongDesc1string `json:"longDesc1"` - LongDesc2string `json:"longDesc2"` - MatchList[]DeliveryServiceMatch `json:"matchList,omitempty"` - MaxDNSAnswersint`json:"maxDnsAnswers"` - MidHeaderRewrite string `json:"midHeaderRewrite"` - MissLat float64`json:"missLat"` - MissLong float64`json:"missLong"` - MultiSiteOrigin bool `json:"multiSiteOrigin"` - OrgServerFQDNstring `json:"orgServerFqdn"` - ProfileDesc string `json:"profileDescription"` - ProfileIDint`json:"profileId,omitempty"` - ProfileName string `json:"profileName"` - Protocol int`json:"protocol"` - QStringIgnoreint`json:"qstringIgnore"` - RangeRequestHandling int `json:"rangeRequestHandling"` - RegexRemap string `json:"regexRemap"` - RegionalGeoBlocking bool `json:"regionalGeoBlocking"` - RemapTextstring `json:"remapText"` - RoutingName string `json:"routingName"` - SigningAlgorithm string `json:"signingAlgorithm" db:"signing_algorithm"` - TypeID int`json:"typeId"` - Type string `json:"type"` - TRResponseHeadersstring `json:"trResponseHeaders"` - TenantID int`json:"tenantId,omitempty"` - XMLIDstring `json:"xmlId"` + Active bool `json:"active"` + AnonymousBlockingEnabled bool `json:"anonymousBlockingEnabled"` Review comment: Its in the 1.2 API: https://github.com/apache/trafficcontrol/blob/master/traffic_ops/app/lib/API/Deliveryservice.pm#L104 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure
[GitHub] rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
rob05c commented on a change in pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#discussion_r195226665 ## File path: traffic_ops/experimental/server/api/deliveryservices.go ## @@ -179,6 +179,7 @@ func postDeliveryservice(payload []byte, db *sqlx.DB) (interface{}, error) { sqlString += ",dns_bypass_cname" sqlString += ",tr_request_headers" sqlString += ",created_at" + sqlString += ",anonymous_blocking_enabled" Review comment: This app isn't used, it's an old experimental version that needs to be removed from the repo. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rawlinp commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table
rawlinp commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table URL: https://github.com/apache/trafficcontrol/pull/2314#discussion_r195215795 ## File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go ## @@ -306,6 +312,88 @@ func createDefaultRegex(tx *sql.Tx, dsID int, xmlID string) error { return nil } +func parseOrgServerFQDN(orgServerFQDN string) (*string, *string, *string, error) { Review comment: Yes, I tried to make this regex as simple as possible, so it basically allows anything that isn't `:` to be parsed as the FQDN here. However, the `url.Parse` function doesn't validate it much either from what I can tell (aside from your example which returns an error because it's looking for a matching `]` as if it were enclosing an IPv6 address). But that's where the validation in `validateOrgServerFQDN` comes in. Anything parsed as the FQDN here must pass the `isHost` validation there. And I disagree that regexes are always hard to read (especially this one). We're expecting a certain form of input pattern here, and I think a regex is the best tool for the job. If someone is having trouble understanding it, they can drop it into regex101.com and get a detailed description of the patterns and capture groups. The parentheses could even be removed to eliminate some of the obfuscation which makes it a relatively simple regex IMO. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rob05c commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table
rob05c commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table URL: https://github.com/apache/trafficcontrol/pull/2314#discussion_r195205994 ## File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go ## @@ -306,6 +312,88 @@ func createDefaultRegex(tx *sql.Tx, dsID int, xmlID string) error { return nil } +func parseOrgServerFQDN(orgServerFQDN string) (*string, *string, *string, error) { Review comment: This doesn't correctly parse the FQDN though. For example, `https://[:80` parses. Even aside from the FQDN, I don't have any confidence that regex is correct. Regexes are always hard to read. I know the standard library is more code, but it's guaranteed to be correct, and it makes it easier for someone who comes along in the future to be certain the parsing is correct. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Vijay-1 commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops.
Vijay-1 commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-397054098 **Rawlin's comment on DS-es sharing same origin** If there is a scenario where we need two different DS-es need to share same origin, that can be done using CNAME DNS records for the shared origin and using a distinct CNAME in each delivery service. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops.
asfgit commented on issue #2407: Edge retrieval from origin - Configuring go_direct from traffic ops. URL: https://github.com/apache/trafficcontrol/pull/2407#issuecomment-397053454 Can one of the admins verify this patch? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2401: Implement Origin UI in Traffic Portal
asfgit commented on issue #2401: Implement Origin UI in Traffic Portal URL: https://github.com/apache/trafficcontrol/pull/2401#issuecomment-397051464 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1813/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rawlinp commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table
rawlinp commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table URL: https://github.com/apache/trafficcontrol/pull/2314#discussion_r195185045 ## File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go ## @@ -306,6 +312,88 @@ func createDefaultRegex(tx *sql.Tx, dsID int, xmlID string) error { return nil } +func parseOrgServerFQDN(orgServerFQDN string) (*string, *string, *string, error) { Review comment: It could, but I'd still have to parse the port out of `URL.Host` and make sure `URL.Scheme` is either http or https, and run through the rest of the URL struct to make sure things like Path, queryParams, and UserInfo don't exist. IMO doing it w/ the regex makes more sense since we're only interested in scheme, fqdn, and port. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rob05c commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table
rob05c commented on a change in pull request #2314: Remove deliveryservice.org_server_fqdn column/compute it from Origin table URL: https://github.com/apache/trafficcontrol/pull/2314#discussion_r195180097 ## File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go ## @@ -306,6 +312,88 @@ func createDefaultRegex(tx *sql.Tx, dsID int, xmlID string) error { return nil } +func parseOrgServerFQDN(orgServerFQDN string) (*string, *string, *string, error) { Review comment: Can this use https://golang.org/pkg/net/url/#Parse ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mitchell852 commented on issue #2397: TP - empty value field for parameter not accepted
mitchell852 commented on issue #2397: TP - empty value field for parameter not accepted URL: https://github.com/apache/trafficcontrol/issues/2397#issuecomment-397016213 To achieve this in TP: 1. remove the API validation on "Value: https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/parameter/parameters.go#L102 2. remove the 'required' attribute from TP https://github.com/apache/trafficcontrol/blob/master/traffic_portal/app/src/common/modules/form/parameter/form.parameter.tpl.html#L55 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
asfgit commented on issue #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406#issuecomment-397014647 Can one of the admins verify this patch? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rivasj opened a new pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries
rivasj opened a new pull request #2406: Re-added anonymous_blocking_enabled field to deliveryservice queries URL: https://github.com/apache/trafficcontrol/pull/2406 Re-added anonymous_blocking_enabled field to deliveryservice queries after deliveryservice endpoints implemented in go This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Vijay-1 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup
Vijay-1 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup URL: https://github.com/apache/trafficcontrol/pull/2029#issuecomment-397005255 Yes. The changes requested for edgeLocations.go for CRConfig were addressed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2386: Fix TO Go DS POST to 400 on duplicate, not 5xx
asfgit commented on issue #2386: Fix TO Go DS POST to 400 on duplicate, not 5xx URL: https://github.com/apache/incubator-trafficcontrol/pull/2386#issuecomment-396986742 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1811/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2392: Fix Traffic Ops Delivery Service endpoints for anymap
asfgit commented on issue #2392: Fix Traffic Ops Delivery Service endpoints for anymap URL: https://github.com/apache/incubator-trafficcontrol/pull/2392#issuecomment-396984910 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1810/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2400: To go cdns sslkeys
asfgit commented on issue #2400: To go cdns sslkeys URL: https://github.com/apache/incubator-trafficcontrol/pull/2400#issuecomment-396981356 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1808/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2402: To go riak ping
asfgit commented on issue #2402: To go riak ping URL: https://github.com/apache/incubator-trafficcontrol/pull/2402#issuecomment-396979699 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1807/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2405: Add Traffic Ops Golang user/current
asfgit commented on issue #2405: Add Traffic Ops Golang user/current URL: https://github.com/apache/incubator-trafficcontrol/pull/2405#issuecomment-396975459 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1806/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2338: Add TO Go users
asfgit commented on issue #2338: Add TO Go users URL: https://github.com/apache/incubator-trafficcontrol/pull/2338#issuecomment-396972562 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1805/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2339: Add TO Go users/id/deliveryservices
asfgit commented on issue #2339: Add TO Go users/id/deliveryservices URL: https://github.com/apache/incubator-trafficcontrol/pull/2339#issuecomment-396970817 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1804/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2353: Add TO Go regions/name
asfgit commented on issue #2353: Add TO Go regions/name URL: https://github.com/apache/incubator-trafficcontrol/pull/2353#issuecomment-396968862 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1803/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2356: Add TO Go Logs
asfgit commented on issue #2356: Add TO Go Logs URL: https://github.com/apache/incubator-trafficcontrol/pull/2356#issuecomment-396961681 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1802/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2369: To go deletednsseckeys
asfgit commented on issue #2369: To go deletednsseckeys URL: https://github.com/apache/incubator-trafficcontrol/pull/2369#issuecomment-396960296 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1801/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit commented on issue #2382: To go dnsseckeys generate
asfgit commented on issue #2382: To go dnsseckeys generate URL: https://github.com/apache/incubator-trafficcontrol/pull/2382#issuecomment-396958436 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-trafficcontrol-PR/1800/ Test PASSed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dewrich closed pull request #2404: TO Go DS API: initialDispersion not required for DNS DSes
dewrich closed pull request #2404: TO Go DS API: initialDispersion not required for DNS DSes URL: https://github.com/apache/incubator-trafficcontrol/pull/2404 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go index 7184c7137..1b95ce120 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go @@ -250,7 +250,7 @@ func validateTypeFields(db *sqlx.DB, ds *tc.DeliveryServiceNullableV12) []error errs := validation.Errors{ "initialDispersion": validation.Validate(ds.InitialDispersion, - validation.By(requiredIfMatchesTypeName([]string{DNSRegexType, HTTPRegexType}, typeName))), + validation.By(requiredIfMatchesTypeName([]string{HTTPRegexType}, typeName))), "ipv6RoutingEnabled": validation.Validate(ds.IPV6RoutingEnabled, validation.By(requiredIfMatchesTypeName([]string{SteeringRegexType, DNSRegexType, HTTPRegexType}, typeName))), "missLat": validation.Validate(ds.MissLat, This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services