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

[GitHub] [trafficcontrol] shamrickus opened a new pull request, #7440: Fix TPv2 e2e ciab container and add config file

shamrickus opened a new pull request, #7440:
URL: https://github.com/apache/trafficcontrol/pull/7440

   <!--
   Thank you for contributing! Please be sure to read our contribution guidelines: https://github.com/apache/trafficcontrol/blob/master/CONTRIBUTING.md
   If this closes or relates to an existing issue, please reference it using one of the following:
   
   Closes: #ISSUE
   Related: #ISSUE
   
   If this PR fixes a security vulnerability, DO NOT submit! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://apache.org/security regarding vulnerability disclosure.
   -->
   
   This PR fixes an issue with the TPv2 e2e container. It also adds a config file to nightwatch such that it can be edited instead of manually editing source files _and_ `jq` can be used. It also adds some timeout options to the nightwatch conf that are set to the default values for the purpose of modifying if any CI systems need longer timeouts.
   <!-- **^ Add meaningful description above** --><hr/>
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this PR.
   Feel free to add the name of a tool or script that is affected but not on the list.
   -->
   - Traffic Portal v2
   - CDN in a Box
   
   ## What is the best way to verify this PR?
   Run the TPv2 e2e container and verify that it succeeds.
   <!-- Please include here ALL the steps necessary to test your PR.
   If your PR has tests (and most should), provide the steps needed to run the tests.
   If not, please provide step-by-step instructions to test the PR manually and explain why your PR does not need tests. -->
   
   
   ## If this is a bugfix, which Traffic Control versions contained the bug?
   <!-- Delete this section if the PR is not a bugfix, or if the bug is only in the master branch.
   Examples:
   - 5.1.2
   - 5.1.3 (RC1)
    -->
   - master
   
   ## PR submission checklist
   - [x] This PR has tests <!-- If not, please delete this text and explain why this PR does not need tests. -->
   - [ ] This PR has documentation <!-- If not, please delete this text and explain why this PR does not need documentation. -->
   - [ ] This PR has a CHANGELOG.md entry <!-- A fix for a bug from an ATC release, an improvement, or a new feature should have a changelog entry. -->
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7440: Fix TPv2 e2e ciab container and add config file

Posted by "zrhoffman (via GitHub)" <gi...@apache.org>.
zrhoffman commented on code in PR #7440:
URL: https://github.com/apache/trafficcontrol/pull/7440#discussion_r1161852726


##########
infrastructure/cdn-in-a-box/traffic_portal_v2_e2e_test/run.sh:
##########
@@ -50,12 +50,12 @@ fi;
 
 cd /lang/traffic-portal
 
-sed -i 's@launch_url: .*,$@launch_url: "'"$TP_URL"'",@' nightwatch/nightwatch.conf.js
-sed -i 's@trafficOpsURL: .*,$@trafficOpsURL: "https://'"$TO_FQDN"':'"$TO_PORT"'",@' nightwatch/globals/globals.ts
+jq '.tp_url = "'"$TP_URL"'" | .to_url = "https://'"$TO_FQDN"':'"$TO_PORT"'"' \

Review Comment:
   `jq` args let you avoid bash variable expansion within the jq filter. Something like this:
   
   ```shell
   jq --arg "$TP_URL" TP_URL --arg TO_URL "https://$TO_FQDN:$TO_PORT" '.tp_url = $TP_URL | .to_url = $TO_URL'
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman merged pull request #7440: Fix TPv2 e2e ciab container and add config file

Posted by "zrhoffman (via GitHub)" <gi...@apache.org>.
zrhoffman merged PR #7440:
URL: https://github.com/apache/trafficcontrol/pull/7440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] codecov[bot] commented on pull request #7440: Fix TPv2 e2e ciab container and add config file

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7440:
URL: https://github.com/apache/trafficcontrol/pull/7440#issuecomment-1501981675

   ## [Codecov](https://codecov.io/gh/apache/trafficcontrol/pull/7440?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7440](https://codecov.io/gh/apache/trafficcontrol/pull/7440?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5299a90) into [master](https://codecov.io/gh/apache/trafficcontrol/commit/b616c062649119649dc02687bc93a6865ba2c23f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b616c06) will **increase** coverage by `33.93%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #7440       +/-   ##
   =============================================
   + Coverage     27.12%   61.05%   +33.93%     
     Complexity       98       98               
   =============================================
     Files           685      302      -383     
     Lines         77421    11535    -65886     
     Branches         90      779      +689     
   =============================================
   - Hits          20998     7043    -13955     
   + Misses        54431     4146    -50285     
   + Partials       1992      346     -1646     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | golib_unit | `?` | |
   | grove_unit | `?` | |
   | t3c_unit | `?` | |
   | traffic_monitor_unit | `?` | |
   | traffic_ops_unit | `?` | |
   | traffic_portal_v2 | `64.24% <ø> (?)` | |
   | traffic_stats_unit | `?` | |
   | unit_tests | `64.24% <ø> (+40.55%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   [see 576 files with indirect coverage changes](https://codecov.io/gh/apache/trafficcontrol/pull/7440/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on a diff in pull request #7440: Fix TPv2 e2e ciab container and add config file

Posted by "zrhoffman (via GitHub)" <gi...@apache.org>.
zrhoffman commented on code in PR #7440:
URL: https://github.com/apache/trafficcontrol/pull/7440#discussion_r1161852726


##########
infrastructure/cdn-in-a-box/traffic_portal_v2_e2e_test/run.sh:
##########
@@ -50,12 +50,12 @@ fi;
 
 cd /lang/traffic-portal
 
-sed -i 's@launch_url: .*,$@launch_url: "'"$TP_URL"'",@' nightwatch/nightwatch.conf.js
-sed -i 's@trafficOpsURL: .*,$@trafficOpsURL: "https://'"$TO_FQDN"':'"$TO_PORT"'",@' nightwatch/globals/globals.ts
+jq '.tp_url = "'"$TP_URL"'" | .to_url = "https://'"$TO_FQDN"':'"$TO_PORT"'"' \

Review Comment:
   `jq` args let you avoid bash variable expansion within the jq filter. Something like this:
   
   ```shell
   jq --arg TP_URL "$TP_URL" --arg TO_URL "https://$TO_FQDN:$TO_PORT" '.tp_url = $TP_URL | .to_url = $TO_URL'
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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