From 832860ac8dd03c082853985b7f0883ad276de7f4 Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Tue, 17 Jan 2023 15:44:38 -0700 Subject: [PATCH 1/3] Fix ISE when GETting sslkeys_expirations endpoint --- CHANGELOG.md | 1 + .../trafficvault/backends/postgres/postgres.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a266f123b1..6306cd83e3 100644 --- a/CHANGELOG.md +++ b/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`. - [#7252](https://github.com/apache/trafficcontrol/issues/7252) *Traffic Router* Fixed integer overflow for `czCount`, by resetting the count to max value when it overflows. - [#7221](https://github.com/apache/trafficcontrol/issues/7221) *Docs* Fixed request structure spec in cdn locks description in APIv4. - [#7225](https://github.com/apache/trafficcontrol/issues/7225) *Docs* Fixed docs for /roles response description in APIv4. diff --git a/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go b/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go index f537a8ad55..c6da5b7840 100644 --- a/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go +++ b/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'" iaRows, err := tx.Query(inactiveQuery) if err != nil { return []tc.SSLKeyExpirationInformation{}, err From 15eb1b1b2a95efb1f6dca7bf087d627ad079db01 Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Wed, 18 Jan 2023 10:37:55 -0700 Subject: [PATCH 2/3] code review --- .../trafficvault/backends/postgres/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go b/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go index c6da5b7840..b1bdc1b394 100644 --- a/traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go +++ b/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 active = 'INACTIVE'" + inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE active = 'INACTIVE' OR active = 'PRIMED'" iaRows, err := tx.Query(inactiveQuery) if err != nil { return []tc.SSLKeyExpirationInformation{}, err From 0cb99be546967d5aa65f76fd2c2acafebca2464f Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Thu, 19 Jan 2023 21:44:29 -0700 Subject: [PATCH 3/3] removing changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6306cd83e3..a266f123b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,6 @@ 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`. - [#7252](https://github.com/apache/trafficcontrol/issues/7252) *Traffic Router* Fixed integer overflow for `czCount`, by resetting the count to max value when it overflows. - [#7221](https://github.com/apache/trafficcontrol/issues/7221) *Docs* Fixed request structure spec in cdn locks description in APIv4. - [#7225](https://github.com/apache/trafficcontrol/issues/7225) *Docs* Fixed docs for /roles response description in APIv4.