You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2020/11/13 20:19:40 UTC
[trafficcontrol] branch master updated: fixed federations/all IMS
(#5269)
This is an automated email from the ASF dual-hosted git repository.
zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new f6a8056 fixed federations/all IMS (#5269)
f6a8056 is described below
commit f6a805651310c2efcba6290ab16761fd50ad81e2
Author: mattjackson220 <33...@users.noreply.github.com>
AuthorDate: Fri Nov 13 13:19:25 2020 -0700
fixed federations/all IMS (#5269)
* fixed federations/all IMS
* updated changelog
* missed issue number
* updated my changelog to match format on others
---
CHANGELOG.md | 1 +
traffic_ops/traffic_ops_golang/federations/allfederations.go | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ebce43..4b454cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
to Basho's repo responding with 402 Payment Required. The repo has been removed from the image.
- [#5069](https://github.com/apache/trafficcontrol/issues/5069) - For LetsEncryptDnsChallengerWatcher in Traffic Router,
the cr-config location is configurable instead of only looking at `/opt/traffic_router/db/cr-config.json`
+- [#5191](https://github.com/apache/trafficcontrol/issues/5191) - Error from IMS requests to /federations/all
## [5.0.0] - 2020-10-20
### Added
diff --git a/traffic_ops/traffic_ops_golang/federations/allfederations.go b/traffic_ops/traffic_ops_golang/federations/allfederations.go
index cf5539b..20cfc08 100644
--- a/traffic_ops/traffic_ops_golang/federations/allfederations.go
+++ b/traffic_ops/traffic_ops_golang/federations/allfederations.go
@@ -237,7 +237,15 @@ func tryIfModifiedSinceQuery(header http.Header, tx *sql.Tx, param string, imsQu
return runSecond, max
}
- rows, err := tx.Query(imsQuery, param)
+ var rows *sql.Rows
+ var err error
+
+ if param == "" {
+ rows, err = tx.Query(imsQuery)
+ } else {
+ rows, err = tx.Query(imsQuery, param)
+ }
+
if err != nil {
log.Warnf("Couldn't get the max last updated time: %v", err)
return runSecond, max