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 2021/03/04 19:39:06 UTC

[GitHub] [trafficcontrol] rimashah25 opened a new pull request #5605: Added the ability to change a server capability name

rimashah25 opened a new pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605


   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   
   - [ x This PR fixes #5479  <!-- You can check for an issue here: https://github.com/apache/trafficcontrol/issues -->
   
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - Documentation
   - Traffic Ops
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   Method 1: curl PUT API end point `api/4.0/server_capabilities?name=<server_capability_name>
   ```
   {"alerts":[{
       "text":"server capability was updated.",
       "level":"success"}],
     "response":{"RequestedName":"tar","name":"tar","lastUpdated":"2021-03-04 02:50:49+00"}
   }
   ```
   Method 2: Using TP's page for server capability to edit(update) the name and verify name was updated with write message
   
   Method 3: Run TP's end to end test.
   
   Method 4: Run TO's API-v4 test casse
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   <!-- If this PR fixes a bug, please list here all of the affected versions - to
   the best of your knowledge. It's also pretty helpful to include a commit hash
   of where 'master' is at the time this PR is opened (if it affects master),
   because what 'master' means will change over time. For example, if this PR
   fixes a bug that's present in master (at commit hash '1df853c8'), in v4.0.0,
   and in the current 4.0.1 Release candidate (e.g. RC1), then this list would
   look like:
   
   - master (1df853c8)
   - 4.0.0
   - 4.0.1 (RC1)
   
   If you don't know what other versions might have this bug, AND don't know how
   to find the commit hash of 'master', then feel free to leave this section
   blank (or, preferably, delete it entirely).
    -->
   
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] This PR includes tests
   - [x] This PR includes documentation
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [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)
   
   
   ## Additional Information
   <!-- If you would like to include any additional information on the PR for
   potential reviewers please put it here.
   
   Some examples of this would be:
   
   - Before and after screenshots/gifs of the Traffic Portal if it is affected
   - Links to other dependent Pull Requests
   - References to relevant context (e.g. new/updates to dependent libraries,
   mailing list records, blueprints)
   
   Feel free to leave this section blank (or, preferably, delete it entirely).
   -->
   
   <!--
   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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588780491



##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       In GetServerCapabilityWithHdr(), the check is already present and hence I didn't add the check.

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Same comment as above, in GetServerCapabilityWithHdr(), the check is already present and hence I didn't add the check.




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



[GitHub] [trafficcontrol] mitchell852 commented on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-793265965


   I don't understand the `RequestedName` property of the PUT response. Is this something new we are doing?


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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588777198



##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	// Get updated name
+	getResp, _, err := TOSession.GetServerCapabilityWithHdr(newSCName, header)
+	if err != nil {

Review comment:
       In GetServerCapabilityWithHdr(), the check is already present and hence I didn't add the check.




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588777394



##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Same comment as above, in GetServerCapabilityWithHdr(), the check is already present and hence I didn't add the check.




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



[GitHub] [trafficcontrol] srijeet0406 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
srijeet0406 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588539667



##########
File path: traffic_ops/app/db/migrations/2021030300000000_server_capability_update_cascade.sql
##########
@@ -0,0 +1,28 @@
+/*
+    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.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;

Review comment:
       Do you need the `public` prefix? 

##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Could you add a check for `len(resp) != 1` here, so that we can avoid chances of a panic on line 101/ 103?

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Same comment about `len(resp)` here.

##########
File path: traffic_ops/app/db/migrations/2021030300000000_server_capability_update_cascade.sql
##########
@@ -0,0 +1,28 @@
+/*
+    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.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;
+ALTER TABLE public.deliveryservices_required_capability DROP CONSTRAINT fk_required_capability;
+ALTER TABLE public.server_server_capability ADD CONSTRAINT fk_server_capability FOREIGN KEY (server_capability) REFERENCES server_capability(name) ON UPDATE CASCADE ON DELETE RESTRICT;
+ALTER TABLE public.deliveryservices_required_capability ADD CONSTRAINT fk_required_capability FOREIGN KEY (required_capability) REFERENCES server_capability(name) ON UPDATE CASCADE ON DELETE RESTRICT;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;
+ALTER TABLE public.deliveryservices_required_capability DROP CONSTRAINT fk_required_capability;
+ALTER TABLE public.server_server_capability ADD CONSTRAINT fk_server_capability FOREIGN KEY (server_capability) REFERENCES server_capability(name) ON DELETE RESTRICT;
+ALTER TABLE public.deliveryservices_required_capability ADD CONSTRAINT fk_required_capability FOREIGN KEY (required_capability) REFERENCES server_capability(name) ON DELETE RESTRICT;
+
+

Review comment:
       There are 2 extra blank lines at the end.

##########
File path: traffic_ops/traffic_ops_golang/servercapability/servercapability.go
##########
@@ -105,6 +119,29 @@ func (v *TOServerCapability) Read(h http.Header, useIMS bool) ([]interface{}, er
 	api.DefaultSort(v.APIInfo(), "name")
 	return api.GenericRead(h, v, useIMS)
 }
+
+func (v *TOServerCapability) Update(h http.Header) (error, error, int) {
+	sc, userErr, sysErr, errCode, _ := v.Read(h, false)
+	if userErr != nil || sysErr != nil {
+		return userErr, sysErr, errCode
+	}
+	if len(sc) != 1 {
+		return fmt.Errorf("cannot find exactly one server capability with the query string provided"), nil, http.StatusBadRequest
+	}
+	rows, err := v.ReqInfo.Tx.Query(v.updateQuery(), v.RequestedName, v.Name)
+	if err != nil {
+		return nil, fmt.Errorf("server capability update: error setting the name for server capability %v: %v", v.Name, err.Error()), http.StatusInternalServerError
+	}
+	defer log.Close(rows, "unable to close DB connection")

Review comment:
       You need to add checks for if the capability was already modified by someone else before you updated it. Look at 
   https://github.com/apache/trafficcontrol/blob/ae2ced905d223789c818831ead1c6979c488eaf0/traffic_ops/traffic_ops_golang/origin/origins.go#L303
   to
   https://github.com/apache/trafficcontrol/blob/ae2ced905d223789c818831ead1c6979c488eaf0/traffic_ops/traffic_ops_golang/origin/origins.go#L313 

##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	// Get updated name
+	getResp, _, err := TOSession.GetServerCapabilityWithHdr(newSCName, header)
+	if err != nil {

Review comment:
       Could you add a nil check for `getResp` here?

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	//To check whether the primary key change trickled down to server table
+	ssc, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &newSCName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", newSCName, err)
+	}
+	for i, s := range ssc {
+		if *s.ServerCapability != *ssc[i].ServerCapability {

Review comment:
       This will always be same. Basically, you're just comparing the element with what you get when you get the element by its index. IMO, the test should be like this:
   1.) You already have a list of servers with assigned server capabilities; Keep a track of which servers are assigned to the capability in question
   2.) Update the name of this server capability
   3.) Get the list of servers associated with this (updated)capability again
   4.) Make sure the list in 1 matches the list in 3; If not, throw error.
    
   Also, missing nil checks before dereferencing pointers.




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r589698035



##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	//To check whether the primary key change trickled down to server table
+	ssc, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &newSCName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", newSCName, err)
+	}
+	for i, s := range ssc {
+		if *s.ServerCapability != *ssc[i].ServerCapability {

Review comment:
       Updated test case to correctly check the trickle of server capability name change.




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



[GitHub] [trafficcontrol] srijeet0406 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
srijeet0406 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r590527939



##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,61 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	if len(resp) == 0 {
+		t.Fatal("no server capability in response, quitting")
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Get all servers related to original sever capability name
+	servResp, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &origName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", origName, err)
+	}
+	if len(servResp) == 0 {
+		t.Fatalf("no servers with associate server capability name: %s", origName)
+	}
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	//To check whether the primary key change trickled down to server table
+	ssc, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &newSCName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", newSCName, err)
+	}
+	if len(ssc) == 0 {
+		t.Fatalf("no server with associated server capability name:%s", newSCName)
+	}
+	for i, s := range ssc {
+		if newSCName != *ssc[i].ServerCapability {

Review comment:
       nit: I would suggest using the same format in both the checks (this one and the one on line 268)
   Basically, either use `ssc[i]` or `s` in both the checks, because they are both the same element. Makes it easier for the reader to see whats going on.

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,61 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	if len(resp) == 0 {
+		t.Fatal("no server capability in response, quitting")
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Get all servers related to original sever capability name
+	servResp, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &origName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", origName, err)
+	}
+	if len(servResp) == 0 {
+		t.Fatalf("no servers with associate server capability name: %s", origName)
+	}
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	//To check whether the primary key change trickled down to server table
+	ssc, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &newSCName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", newSCName, err)
+	}
+	if len(ssc) == 0 {
+		t.Fatalf("no server with associated server capability name:%s", newSCName)
+	}
+	for i, s := range ssc {
+		if newSCName != *ssc[i].ServerCapability {
+			t.Errorf("GET server server capabilities by server capability returned non-matching server capability: %s", *s.ServerCapability)
+		}
+		if *servResp[i].Server != *s.Server {

Review comment:
       Is it guaranteed that the sequence of the servers will be the same in both the responses? If they are not, this check will fail.

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,61 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	if len(resp) == 0 {
+		t.Fatal("no server capability in response, quitting")
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Get all servers related to original sever capability name
+	servResp, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &origName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", origName, err)
+	}
+	if len(servResp) == 0 {
+		t.Fatalf("no servers with associate server capability name: %s", origName)

Review comment:
       nit: with associate -> associated with




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r589679807



##########
File path: traffic_ops/traffic_ops_golang/servercapability/servercapability.go
##########
@@ -105,6 +119,29 @@ func (v *TOServerCapability) Read(h http.Header, useIMS bool) ([]interface{}, er
 	api.DefaultSort(v.APIInfo(), "name")
 	return api.GenericRead(h, v, useIMS)
 }
+
+func (v *TOServerCapability) Update(h http.Header) (error, error, int) {
+	sc, userErr, sysErr, errCode, _ := v.Read(h, false)
+	if userErr != nil || sysErr != nil {
+		return userErr, sysErr, errCode
+	}
+	if len(sc) != 1 {
+		return fmt.Errorf("cannot find exactly one server capability with the query string provided"), nil, http.StatusBadRequest
+	}
+	rows, err := v.ReqInfo.Tx.Query(v.updateQuery(), v.RequestedName, v.Name)
+	if err != nil {
+		return nil, fmt.Errorf("server capability update: error setting the name for server capability %v: %v", v.Name, err.Error()), http.StatusInternalServerError
+	}
+	defer log.Close(rows, "unable to close DB connection")

Review comment:
       Done.




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



[GitHub] [trafficcontrol] rimashah25 edited a comment on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 edited a comment on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-796053852


   > > Yes, so server_capability API uses CRUDer function. In CRUD Update, there is a function (SetKeys) that basically sets the name field (primary key) to that of the param key value. Due to which, we lose the new name (RequestedName) that the user is trying to change to. To ensure, we don't lose the new name and at the same time ensure CRUDer functionality says un-impacted, this new variable was introduced.
   > 
   > Not that I think you need to/should do so in this PR, but this is something that would motivate me to rewrite the endpoint to not use the "CRUDer"
   
   IMO, we should get rid of all CRUDer functionality. This PR is a good example of how we end up applying a bandaid to not impact existing functionality


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



[GitHub] [trafficcontrol] ocket8888 commented on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-796038754


   > Yes, so server_capability API uses CRUDer function. In CRUD Update, there is a function (SetKeys) that basically sets the name field (primary key) to that of the param key value. Due to which, we lose the new name (RequestedName) that the user is trying to change to. To ensure, we don't lose the new name and at the same time ensure CRUDer functionality says un-impacted, this new variable was introduced.
   
   Not that I think you need to/should do so in this PR, but this is something that would motivate me to rewrite the endpoint to not use the "CRUDer"
   


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



[GitHub] [trafficcontrol] rimashah25 edited a comment on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 edited a comment on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-796053852






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



[GitHub] [trafficcontrol] rimashah25 commented on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-796053852


   > > Yes, so server_capability API uses CRUDer function. In CRUD Update, there is a function (SetKeys) that basically sets the name field (primary key) to that of the param key value. Due to which, we lose the new name (RequestedName) that the user is trying to change to. To ensure, we don't lose the new name and at the same time ensure CRUDer functionality says un-impacted, this new variable was introduced.
   > 
   > Not that I think you need to/should do so in this PR, but this is something that would motivate me to rewrite the endpoint to not use the "CRUDer"
   
   IMO, we should get rid of all CRUDer functionality.


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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588788554



##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Done

##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,43 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       Done




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



[GitHub] [trafficcontrol] ocket8888 commented on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-796082784


   > IMO, we should get rid of all CRUDer functionality. This PR is a good example of how we end up applying a bandaid to not impact exists functionality
   
   I would love that. It's just hard to justify the time it would take to yank all of that stuff out.


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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r589779456



##########
File path: traffic_portal/app/src/common/api/ServerCapabilityService.js
##########
@@ -68,6 +68,19 @@ var ServerCapabilityService = function($http, ENV, locationUtils, messageModel)
 		);
 	};
 
+	this.updateServerCapability = function(currentName, serverCapability) {
+		return $http.put(ENV.api['root'] + 'server_capabilities', serverCapability, {params: {"name": currentName}}).then(
+			function(result) {
+				// messageModel.setMessages(result.data.alerts, false);

Review comment:
       ok, done.




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r589779456



##########
File path: traffic_portal/app/src/common/api/ServerCapabilityService.js
##########
@@ -68,6 +68,19 @@ var ServerCapabilityService = function($http, ENV, locationUtils, messageModel)
 		);
 	};
 
+	this.updateServerCapability = function(currentName, serverCapability) {
+		return $http.put(ENV.api['root'] + 'server_capabilities', serverCapability, {params: {"name": currentName}}).then(
+			function(result) {
+				// messageModel.setMessages(result.data.alerts, false);

Review comment:
       ok




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



[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588603832



##########
File path: traffic_ops/app/db/migrations/2021030300000000_server_capability_update_cascade.sql
##########
@@ -0,0 +1,28 @@
+/*
+    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.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;

Review comment:
       Yes, we do. The schema needs to be explicit or some people who have been running ATC since pre-1.4 will be unable to run the migration successfully.




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



[GitHub] [trafficcontrol] zrhoffman merged pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
zrhoffman merged pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605


   


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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588785326



##########
File path: traffic_ops/traffic_ops_golang/servercapability/servercapability.go
##########
@@ -105,6 +119,29 @@ func (v *TOServerCapability) Read(h http.Header, useIMS bool) ([]interface{}, er
 	api.DefaultSort(v.APIInfo(), "name")
 	return api.GenericRead(h, v, useIMS)
 }
+
+func (v *TOServerCapability) Update(h http.Header) (error, error, int) {
+	sc, userErr, sysErr, errCode, _ := v.Read(h, false)
+	if userErr != nil || sysErr != nil {
+		return userErr, sysErr, errCode
+	}
+	if len(sc) != 1 {
+		return fmt.Errorf("cannot find exactly one server capability with the query string provided"), nil, http.StatusBadRequest
+	}
+	rows, err := v.ReqInfo.Tx.Query(v.updateQuery(), v.RequestedName, v.Name)
+	if err != nil {
+		return nil, fmt.Errorf("server capability update: error setting the name for server capability %v: %v", v.Name, err.Error()), http.StatusInternalServerError
+	}
+	defer log.Close(rows, "unable to close DB connection")

Review comment:
       Done.




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588785326



##########
File path: traffic_ops/traffic_ops_golang/servercapability/servercapability.go
##########
@@ -105,6 +119,29 @@ func (v *TOServerCapability) Read(h http.Header, useIMS bool) ([]interface{}, er
 	api.DefaultSort(v.APIInfo(), "name")
 	return api.GenericRead(h, v, useIMS)
 }
+
+func (v *TOServerCapability) Update(h http.Header) (error, error, int) {
+	sc, userErr, sysErr, errCode, _ := v.Read(h, false)
+	if userErr != nil || sysErr != nil {
+		return userErr, sysErr, errCode
+	}
+	if len(sc) != 1 {
+		return fmt.Errorf("cannot find exactly one server capability with the query string provided"), nil, http.StatusBadRequest
+	}
+	rows, err := v.ReqInfo.Tx.Query(v.updateQuery(), v.RequestedName, v.Name)
+	if err != nil {
+		return nil, fmt.Errorf("server capability update: error setting the name for server capability %v: %v", v.Name, err.Error()), http.StatusInternalServerError
+	}
+	defer log.Close(rows, "unable to close DB connection")

Review comment:
       Done.




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588780491



##########
File path: traffic_ops/testing/api/v4/servercapabilities_test.go
##########
@@ -89,6 +90,41 @@ func ValidationTestServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {

Review comment:
       In GetServerCapabilityWithHdr(), the check is already present and hence I didn't add the check.




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



[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r589772604



##########
File path: traffic_portal/app/src/common/api/ServerCapabilityService.js
##########
@@ -68,6 +68,19 @@ var ServerCapabilityService = function($http, ENV, locationUtils, messageModel)
 		);
 	};
 
+	this.updateServerCapability = function(currentName, serverCapability) {
+		return $http.put(ENV.api['root'] + 'server_capabilities', serverCapability, {params: {"name": currentName}}).then(
+			function(result) {
+				// messageModel.setMessages(result.data.alerts, false);

Review comment:
       u can delete that commented out line




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r590715259



##########
File path: traffic_ops/testing/api/v4/serverservercapability_test.go
##########
@@ -222,6 +223,61 @@ func GetTestServerServerCapabilities(t *testing.T) {
 	}
 }
 
+func UpdateTestServerServerCapabilities(t *testing.T) {
+	var header http.Header
+
+	// Get server capability name and edit it to a new name
+	resp, _, err := TOSession.GetServerCapabilitiesWithHdr(header)
+	if err != nil {
+		t.Fatalf("Expected no error, but got %v", err.Error())
+	}
+	if len(resp) == 0 {
+		t.Fatal("no server capability in response, quitting")
+	}
+	origName := resp[0].Name
+	newSCName := "sc-test"
+	resp[0].Name = newSCName
+
+	// Get all servers related to original sever capability name
+	servResp, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &origName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", origName, err)
+	}
+	if len(servResp) == 0 {
+		t.Fatalf("no servers with associate server capability name: %s", origName)
+	}
+
+	// Update server capability with new name
+	updateResponse, _, err := TOSession.UpdateServerCapabilityByName(origName, &resp[0])
+	if err != nil {
+		t.Errorf("cannot PUT server capability: %v - %v", err, updateResponse)
+	}
+
+	//To check whether the primary key change trickled down to server table
+	ssc, _, err := TOSession.GetServerServerCapabilitiesWithHdr(nil, nil, &newSCName, nil)
+	if err != nil {
+		t.Fatalf("cannot GET server capabilities assigned to servers by server capability name %v: %v", newSCName, err)
+	}
+	if len(ssc) == 0 {
+		t.Fatalf("no server with associated server capability name:%s", newSCName)
+	}
+	for i, s := range ssc {
+		if newSCName != *ssc[i].ServerCapability {
+			t.Errorf("GET server server capabilities by server capability returned non-matching server capability: %s", *s.ServerCapability)
+		}
+		if *servResp[i].Server != *s.Server {

Review comment:
       Yes because of the SortTestServerServerCapabilities() that is ran before UpdateTestServerServerCapabilities().




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



[GitHub] [trafficcontrol] rimashah25 commented on a change in pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on a change in pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#discussion_r588781067



##########
File path: traffic_ops/app/db/migrations/2021030300000000_server_capability_update_cascade.sql
##########
@@ -0,0 +1,28 @@
+/*
+    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.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;
+ALTER TABLE public.deliveryservices_required_capability DROP CONSTRAINT fk_required_capability;
+ALTER TABLE public.server_server_capability ADD CONSTRAINT fk_server_capability FOREIGN KEY (server_capability) REFERENCES server_capability(name) ON UPDATE CASCADE ON DELETE RESTRICT;
+ALTER TABLE public.deliveryservices_required_capability ADD CONSTRAINT fk_required_capability FOREIGN KEY (required_capability) REFERENCES server_capability(name) ON UPDATE CASCADE ON DELETE RESTRICT;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+ALTER TABLE public.server_server_capability DROP CONSTRAINT fk_server_capability;
+ALTER TABLE public.deliveryservices_required_capability DROP CONSTRAINT fk_required_capability;
+ALTER TABLE public.server_server_capability ADD CONSTRAINT fk_server_capability FOREIGN KEY (server_capability) REFERENCES server_capability(name) ON DELETE RESTRICT;
+ALTER TABLE public.deliveryservices_required_capability ADD CONSTRAINT fk_required_capability FOREIGN KEY (required_capability) REFERENCES server_capability(name) ON DELETE RESTRICT;
+
+

Review comment:
       Done.




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



[GitHub] [trafficcontrol] rimashah25 commented on pull request #5605: Added the ability to change a server capability name

Posted by GitBox <gi...@apache.org>.
rimashah25 commented on pull request #5605:
URL: https://github.com/apache/trafficcontrol/pull/5605#issuecomment-794052021


   > I don't understand the `RequestedName` property of the PUT response. Is this something new we are doing?
   
   Yes, so server_capability API uses CRUDer function. In CRUD Update, there is a function (SetKeys) that basically sets the name field (primary key) to that of the param key value. Due to which, we lose the new name (RequestedName) that the user is trying to change to. To ensure, we don't lose the new name and at the same time ensure CRUDer functionality says un-impacted, this new variable was introduced. 


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