Skip to content

Commit

Permalink
Remove inline topology comment from parent.config generation (#5376)
Browse files Browse the repository at this point in the history
ATS doesn't support inline comments in parent.config.

(cherry picked from commit df92555)
  • Loading branch information
rawlinp authored and ocket8888 committed Dec 14, 2020
1 parent c6bb8ca commit b7609b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- #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 - Error from IMS requests to /federations/all
- Fixed Astats csv issue where it could crash if caches dont return proc data
- Fixed parent.config generation for topology-based delivery services (inline comments not supported)

### Changed
- Changed some Traffic Ops Go Client methods to use `DeliveryServiceNullable` inputs and outputs.
Expand Down
1 change: 0 additions & 1 deletion lib/go-atscfg/parentdotconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ func getTopologyParentConfigLine(
txt += ` qstring=` + getTopologyQueryString(ds, serverParams, serverPlacement.IsLastCacheTier, dsParams.Algorithm, dsParams.QueryStringHandling)
txt += getTopologyParentIsProxyStr(serverPlacement.IsLastCacheTier)
txt += getParentRetryStr(serverPlacement.IsLastCacheTier, atsMajorVer, dsParams.ParentRetry, dsParams.UnavailableServerRetryResponses, dsParams.MaxSimpleRetries, dsParams.MaxUnavailableServerRetries)
txt += " # topology '" + *ds.Topology + "'"
txt += "\n"
return txt, warnings, nil
}
Expand Down
4 changes: 4 additions & 0 deletions lib/go-atscfg/parentdotconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ func TestMakeParentDotConfigTopologies(t *testing.T) {
if !strings.Contains(txt, "qstring=myQStringHandlingParam") {
t.Errorf("expected qstring from param 'qstring=myQStringHandlingParam', actual: '%v'", txt)
}
if strings.Contains(txt, "# topology") {
// ATS doesn't support inline comments in parent.config
t.Errorf("expected: no inline '# topology' comment, actual: '%v'", txt)
}
}

// TestMakeParentDotConfigNotInTopologies tests when a given edge is NOT in a Topology, that it doesn't add a remap line.
Expand Down

0 comments on commit b7609b3

Please sign in to comment.