You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/01/31 23:11:30 UTC

[GitHub] [trafficcontrol] mitchell852 opened a new pull request #4368: deprecates the /cdns/usage/overview endpoint

mitchell852 opened a new pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368
 
 
   ## What does this PR (Pull Request) do?
   
   Adds deprecation notices for /cdns/usage/overview to response and documentation.
   
   - [x] This PR fixes #3850 
   
   ## Which Traffic Control components are affected by this PR?
   
   - Documentation
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   Run unit and API tests
   Make a call to GET /cdns/usage/overview and notice the deprecation alert
   Build the docs and review the /cdns/usage/overview api endpoint documentation
   
   ## The following criteria are ALL met by this PR
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you 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.
   -->
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] mhoppa commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint

Posted by GitBox <gi...@apache.org>.
mhoppa commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368#discussion_r374811372
 
 

 ##########
 File path: traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm
 ##########
 @@ -52,10 +52,10 @@ sub get_usage_overview {
 
 	my ( $rc, $result ) = $cstats->get_usage_overview();
 	if ( $rc == SUCCESS ) {
-		return $self->success($result);
+		return $self->deprecation_with_no_alternative(200, $result);
 	}
 	else {
-		return $self->alert($result);
+		return $self->deprecation_with_no_alternative(500, $result);
 
 Review comment:
   nit but the alert perl method returned a 400 response code instead of a 500 this should match that, once that is changed I believe this PR is ready to go

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 merged pull request #4368: deprecates the /cdns/usage/overview endpoint

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368#discussion_r374708624
 
 

 ##########
 File path: traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm
 ##########
 @@ -52,7 +52,7 @@ sub get_usage_overview {
 
 	my ( $rc, $result ) = $cstats->get_usage_overview();
 	if ( $rc == SUCCESS ) {
-		return $self->success($result);
+		return $self->deprecation_with_no_alternative(200, $result);
 	}
 	else {
 		return $self->alert($result);
 
 Review comment:
   good point

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368#discussion_r373740385
 
 

 ##########
 File path: traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm
 ##########
 @@ -52,7 +52,7 @@ sub get_usage_overview {
 
 	my ( $rc, $result ) = $cstats->get_usage_overview();
 	if ( $rc == SUCCESS ) {
-		return $self->success($result);
+		return $self->deprecation_with_no_alternative(200, $result);
 	}
 	else {
 		return $self->alert($result);
 
 Review comment:
   This won't return the deprecation notice in the event of an error.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on a change in pull request #4368: deprecates the /cdns/usage/overview endpoint
URL: https://github.com/apache/trafficcontrol/pull/4368#discussion_r374829029
 
 

 ##########
 File path: traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm
 ##########
 @@ -52,10 +52,10 @@ sub get_usage_overview {
 
 	my ( $rc, $result ) = $cstats->get_usage_overview();
 	if ( $rc == SUCCESS ) {
-		return $self->success($result);
+		return $self->deprecation_with_no_alternative(200, $result);
 	}
 	else {
-		return $self->alert($result);
+		return $self->deprecation_with_no_alternative(500, $result);
 
 Review comment:
   weird that it returned a 400 but good catch. changing.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services