Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Fix atscfg not adding hdr_rw_mid files to meta cfg#4304

Merged
rawlinp merged 1 commit into
apache:masterfrom
rob05c:atscfg-fix-meta-missing-hdr-rw-mid
Jan 16, 2020
Merged

Fix atscfg not adding hdr_rw_mid files to meta cfg#4304
rawlinp merged 1 commit into
apache:masterfrom
rob05c:atscfg-fix-meta-missing-hdr-rw-mid

Conversation

@rob05c

@rob05c rob05c commented Jan 16, 2020

Copy link
Copy Markdown
Member

Fix atscfg not adding hdr_rw_mid files to meta cfg

Includes integration tests for TO side. ORT side doesn't have an integration test framework yet; manually tested, verified config includes hdr_rw_mid_ for all DSes in that Mid's CDN with location params.
No docs, no interface change.
No changelog, no interface change (and the bug isn't in a release).

Which Traffic Control components are affected by this PR?

  • Traffic Ops ORT

What is the best way to verify this PR?

Run TO API Tests. Request /servers/mid-hostname/configfiles/ats and verify returned meta contains hdr_rw_mid_ files. Run atstccfg for /servers/mid-hostname/configfiles/ats and verify returned meta contains hdr_rw_mid_ files.

If this is a bug fix, what versions of Traffic Control are affected?

  • master
  • 4.0.x (RC1)

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@rob05c rob05c added bug something isn't working as intended high impact impacts the basic function, deployment, or operation of a CDN cache-config Cache config generation labels Jan 16, 2020
@mitchell852 mitchell852 added the Traffic Ops related to Traffic Ops label Jan 16, 2020

@rawlinp rawlinp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All UTs pass, TO API tests pass, manually tested atstccfg against a test environment and got the expected response containing hdr_rw_mid files.

Just one small nit, but I won't hold up merging.

}
dsNames[tc.DeliveryServiceName(*ds.XMLID)] = struct{}{}
}
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think if-else code is generally easier to read when the shorter block comes first (i.e. inverting the logic to if tc.CacheTypeFromString(server.Type) == tc.CacheTypeMid and moving this block up).

@rawlinp
rawlinp merged commit c389e84 into apache:master Jan 16, 2020
mitchell852 added a commit to mitchell852/trafficcontrol that referenced this pull request Jan 21, 2020
…apache#4304)

* prevents line breaks in ds.remapText (UI and API)

* adds test to ensure ds.remapText cannot include a line break

* updated fixtures to include valid line breaks for edge/mid header rewrites, regex remap and tr request/response headers

* adds period to GoDoc

* no need for ng-pattern

* textarea does not support pattern so switching back to ng-pattern

(cherry picked from commit c025d22)
mitchell852 added a commit to mitchell852/trafficcontrol that referenced this pull request Jan 21, 2020
…apache#4304)

* prevents line breaks in ds.remapText (UI and API)

* adds test to ensure ds.remapText cannot include a line break

* updated fixtures to include valid line breaks for edge/mid header rewrites, regex remap and tr request/response headers

* adds period to GoDoc

* no need for ng-pattern

* textarea does not support pattern so switching back to ng-pattern

(cherry picked from commit c025d22)
rawlinp pushed a commit to rawlinp/trafficcontrol that referenced this pull request Jan 21, 2020
rawlinp added a commit that referenced this pull request Jan 21, 2020
(cherry picked from commit c389e84)

Co-authored-by: Robert Butts <rob05c@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended cache-config Cache config generation high impact impacts the basic function, deployment, or operation of a CDN Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go version of GET servers/{server-name-or-id}/configfiles/ats does not return hdr_rw_mid.config files for mids

3 participants