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 2023/01/17 22:46:45 UTC

[GitHub] [trafficcontrol] srijeet0406 opened a new pull request, #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

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

   <!--
   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: #7293 
   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 closes #7293 
   
   <!-- **^ 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 Ops
   
   
   ## What is the best way to verify this PR?
   <!-- 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. -->
   Hit the `sslkeys_expirations` endpoint and make sure you see the expected result without errors.
   
   ## 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
   - [ ] 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. -->
   - [x] 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] srijeet0406 commented on a diff in pull request #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

Posted by GitBox <gi...@apache.org>.
srijeet0406 commented on code in PR #7294:
URL: https://github.com/apache/trafficcontrol/pull/7294#discussion_r1073857066


##########
traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go:
##########
@@ -180,7 +180,7 @@ func (p *Postgres) GetExpirationInformation(tx *sql.Tx, ctx context.Context, day
 		fedMap[fedString] = true
 	}
 
-	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE NOT active"
+	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE active = 'INACTIVE'"

Review Comment:
   You're right. It should be INACTIVE OR PRIMED. I've changed it.



-- 
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] ocket8888 commented on a diff in pull request #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #7294:
URL: https://github.com/apache/trafficcontrol/pull/7294#discussion_r1081589154


##########
CHANGELOG.md:
##########
@@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 - [#7120](https://github.com/apache/trafficcontrol/pull/7120) *Docs* Update t3c documentation regarding parent.config parent_retry.
 
 ### Fixed
+- [#7293](https://github.com/apache/trafficcontrol/issues/7293) *Traffic Ops* Fixed Internal Server Error on GETting `/sslkeys_expirations`.

Review Comment:
   This bug came from unreleased changes, so it doesn't need a Changelog entry because nothing will have actually changed in this regard between releases



-- 
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] ocket8888 commented on a diff in pull request #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #7294:
URL: https://github.com/apache/trafficcontrol/pull/7294#discussion_r1073024491


##########
traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go:
##########
@@ -180,7 +180,7 @@ func (p *Postgres) GetExpirationInformation(tx *sql.Tx, ctx context.Context, day
 		fedMap[fedString] = true
 	}
 
-	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE NOT active"
+	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE active = 'INACTIVE'"

Review Comment:
   What's the intention here? Is this meant to be getting all Delivery Services that aren't being served? Or do we specifically want all of the Delivery Services which both aren't being served **and** don't have deployed configurations. I could see reasons for each; the former because any DS that's not being routed is draining so we don't anticipate the key expiry is actually an issue, the latter because those certs are still in use by clients.
   
   If we want all DS's that aren't routed, then this should be `active = 'INACTIVE' OR active = 'PRIMED';`. If we want DSs that both aren't routed and don't have configuration deployed to cache servers, then technically we're changing behavior since that wasn't possible previously. Which, idk maybe should just go in the Changelog.



-- 
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] ocket8888 merged pull request #7294: Fix Internal Server Error when GETting sslkey_expirations endpoint

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


-- 
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 #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #7294:
URL: https://github.com/apache/trafficcontrol/pull/7294#issuecomment-1386190430

   # [Codecov](https://codecov.io/gh/apache/trafficcontrol/pull/7294?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 [#7294](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (832860a) into [master](https://codecov.io/gh/apache/trafficcontrol/commit/1c5607c1d40a8d1f69c46e2bf1b2e7a9c429227f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c5607c) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #7294      +/-   ##
   ============================================
   - Coverage     28.29%   28.26%   -0.03%     
     Complexity       98       98              
   ============================================
     Files           617      616       -1     
     Lines         69652    69625      -27     
     Branches         90       90              
   ============================================
   - Hits          19705    19678      -27     
   - Misses        48127    48129       +2     
   + Partials       1820     1818       -2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | golib_unit | `53.01% <ø> (-0.09%)` | :arrow_down: |
   | grove_unit | `4.60% <ø> (ø)` | |
   | t3c_generate_unit | `24.96% <ø> (ø)` | |
   | traffic_monitor_unit | `20.43% <ø> (ø)` | |
   | traffic_ops_unit | `19.67% <0.00%> (-0.01%)` | :arrow_down: |
   | traffic_stats_unit | `10.41% <ø> (ø)` | |
   
   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.
   
   | [Impacted Files](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...\_golang/trafficvault/backends/postgres/postgres.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dHJhZmZpY19vcHMvdHJhZmZpY19vcHNfZ29sYW5nL3RyYWZmaWN2YXVsdC9iYWNrZW5kcy9wb3N0Z3Jlcy9wb3N0Z3Jlcy5nbw==) | `0.47% <0.00%> (ø)` | |
   | [lib/go-atscfg/parentabstraction.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLWF0c2NmZy9wYXJlbnRhYnN0cmFjdGlvbi5nbw==) | `79.47% <0.00%> (-0.53%)` | :arrow_down: |
   | [lib/go-tc/deliveryservice\_requests.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLXRjL2RlbGl2ZXJ5c2VydmljZV9yZXF1ZXN0cy5nbw==) | `40.86% <0.00%> (ø)` | |
   | [...fic\_ops\_golang/deliveryservice/request/requests.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dHJhZmZpY19vcHMvdHJhZmZpY19vcHNfZ29sYW5nL2RlbGl2ZXJ5c2VydmljZS9yZXF1ZXN0L3JlcXVlc3RzLmdv) | `0.00% <0.00%> (ø)` | |
   | [...fic\_ops\_golang/deliveryservice/request/validate.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dHJhZmZpY19vcHMvdHJhZmZpY19vcHNfZ29sYW5nL2RlbGl2ZXJ5c2VydmljZS9yZXF1ZXN0L3ZhbGlkYXRlLmdv) | `0.00% <0.00%> (ø)` | |
   | [lib/go-tc/copy.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLXRjL2NvcHkuZ28=) | | |
   | [lib/go-atscfg/atscfg.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLWF0c2NmZy9hdHNjZmcuZ28=) | `58.23% <0.00%> (+0.20%)` | :arrow_up: |
   | [lib/go-atscfg/remapdotconfig.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLWF0c2NmZy9yZW1hcGRvdGNvbmZpZy5nbw==) | `76.63% <0.00%> (+0.45%)` | :arrow_up: |
   | [lib/go-util/ptr.go](https://codecov.io/gh/apache/trafficcontrol/pull/7294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2dvLXV0aWwvcHRyLmdv) | `100.00% <0.00%> (+9.09%)` | :arrow_up: |
   
   :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] ocket8888 commented on pull request #7294: Fix Internal Server Error when GETting sslkey_expirations endpoint

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

   Other than the Changelog, this looks good to go. Tested it and it's working.


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