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/04/12 08:39:35 UTC

[GitHub] [trafficcontrol] dmohan001c opened a new pull request #5736: Adds TO client api tests for Division automation

dmohan001c opened a new pull request #5736:
URL: https://github.com/apache/trafficcontrol/pull/5736


   <!--
   ************ 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.
   -->
   
   - [ ] This PR fixes #REPLACE_ME OR is not related to any Issue <!-- 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. -->
   
   - CDN in a Box
   - Traffic Ops
   - CI tests
   
   ## 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. -->
   
   ## 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!
   
   -->
   
   - [ ] This PR includes tests OR I have explained why tests are unnecessary
   - [ ] This PR includes documentation OR I have explained why documentation is unnecessary
   - [ ] This PR includes an update to CHANGELOG.md OR such an update is not necessary
   - [ ] This PR includes any and all required license headers
   - [ ] 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] ocket8888 commented on pull request #5736: Adds TO client api tests for DS automation

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


   yeah, on master I can see:
   ```
               "profileName": null,
   ```
   So your tests are depending on a specific Delivery Service in the test data having a ProfileName that is safe to dereference, but it just doesn't. It's possible that this is because the fixtures data has changed since the time these tests were written.


-- 
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 merged pull request #5736: Adds TO client api tests for DS automation

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


   


-- 
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 edited a comment on pull request #5736: Adds TO client api tests for DS automation

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


   ~~Sounds like your port 6060 is already in use and it's trying to start Traffic Ops listening to that port. `netstat -nlptu | grep 6060` should be able to find the PID/Process name using it. You might need to use `sudo` if the process isn't owned by your user~~
   
   Sorry, I forgot; it's passing locallynot on GH.
   
   That error is unrelated. You can see the same thing in runs that pass successfully, e.g.: https://pipelines.actions.githubusercontent.com/SkCuvZ6pt0n8Mrp79gaiS27VlL7eMS1136UzeqF4MLjw7Edjex/_apis/pipelines/1/runs/13944/signedlogcontent/3?urlExpires=2021-04-15T06%3A44%3A08.9489784Z&urlSigningMethod=HMACV1&urlSignature=xZn7%2Fbh%2FpCDT7QHg5a8ISv0zgCnin%2BsW191JhFLh9kw%3D
   
   Not sure what it means


-- 
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 #5736: Adds TO client api tests for DS automation

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


   Error message indicates that `testData.DeliveryServices[0].ProfileName` is nil - are you working with the same tc-fixtures as master?


-- 
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] dmohan001c commented on pull request #5736: Adds TO client api tests for DS automation

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


   yes, that's fine. I will update it. But this error is not related to the profile name null value. 
   Error Message: Traffic Ops: ERROR: traffic_ops_golang.go:161: 2021-04-14T04:50:58.152866453Z: listen tcp 127.0.0.1:6060: bind: address already in use


-- 
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 #5736: Adds TO client api tests for DS automation

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


   Sounds like your port 6060 is already in use and it's trying to start Traffic Ops listening to that port. `netstat -nlptu | grep 6060` should be able to find the PID/Process name using it. You might need to use `sudo` if the process isn't owned by your user


-- 
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 #5736: Adds TO client api tests for DS automation

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



##########
File path: .github/actions/to-integration-tests/entrypoint.sh
##########
@@ -179,13 +181,16 @@ envsubst <"${resources}/riak.json" >riak.conf
 truncate --size=0 warning.log error.log # Removes output from previous API versions and makes sure files exist
 ./traffic_ops_golang --cfg ./cdn.conf --dbcfg ./database.conf -riakcfg riak.conf &
 
-# TODO - Make these logs build artifacts
-# 2>&1 makes terminal output go faster, even though stderr will not contain anything
-tail -f warning.log 2>&1 | color_and_prefix "${yellow_bg}" 'Traffic Ops' &
-tail -f error.log 2>&1 | color_and_prefix "${red_bg}" 'Traffic Ops' &
-
-
 cd "../testing/api/v$INPUT_VERSION"
 
 cp "${resources}/traffic-ops-test.json" traffic-ops-test.conf
-go test -test.v --cfg traffic-ops-test.conf
+go test -test.v --cfg traffic-ops-test.conf || code="$?" && code="$?"
+
+# TODO - Make these logs build artifacts
+# 2>&1 makes terminal output go faster, even though stderr will not contain anything
+echo "------------ TRAFFIC OPS LOGS ------------"
+cd -
+color_and_prefix "${yellow_bg}" 'Traffic Ops' <warning.log 2>&1
+color_and_prefix "${red_bg}" 'Traffic Ops' <error.log 2>&1
+
+exit "$code"

Review comment:
       Missing newline at EOF




-- 
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] dmohan001c closed pull request #5736: Adds TO client api tests for DS automation

Posted by GitBox <gi...@apache.org>.
dmohan001c closed pull request #5736:
URL: https://github.com/apache/trafficcontrol/pull/5736


   


-- 
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] dmohan001c commented on pull request #5736: Adds TO client api tests for DS automation

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


   Re-opening pull request to check errors.


-- 
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] dmohan001c commented on pull request #5736: Adds TO client api tests for DS automation

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


   I am not sure why I am getting errors when I am adding these tests. It's working fine in local.


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