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

Cleanup parent.config generation code#6618

Merged
rawlinp merged 1 commit intoapache:masterfrom
rob05c:cleanup-parent-symbols
May 11, 2022
Merged

Cleanup parent.config generation code#6618
rawlinp merged 1 commit intoapache:masterfrom
rob05c:cleanup-parent-symbols

Conversation

@rob05c
Copy link
Member

@rob05c rob05c commented Mar 4, 2022

Various techdebt cleanup of parent.config generation, inherited from ancient transliterated Perl.

Generated config should be byte-for-byte identical with or without this PR.

  • combines profileCache and originServers into a single serversWithParams variable, since the params apply to and are only ever useful with their corresponding server
  • renames profileCache struct to parentServerParams, which is what it is, and matches the corresponding parentDSParams. The profileCache name was inherited from ancient Perl code
  • removes unused parentConfigDS* symbols
  • removes cgServer struct and replaces usage with real Servers; also inherited from ancient Perl code

Which Traffic Control components are affected by this PR?

  • Traffic Control Cache Config (T3C, formerly ORT)

What is the best way to verify this PR?

Run tests. Generate config, verify config is unchanged.

If this is a bugfix, which Traffic Control versions contained the bug?

Not a bug fix.

PR submission checklist

  • [x] This PR has tests tests exist for all affected code
  • [x] This PR has documentation no docs, no interface change
  • [x] This PR has a CHANGELOG.md entry no interface change, no behavioral change
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@rob05c rob05c added tech debt rework due to choosing easy/limited solution cache-config Cache config generation labels Mar 4, 2022
Copy link
Contributor

@jpappa200 jpappa200 left a comment

Choose a reason for hiding this comment

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

👍 LGTM generated config and config was unchanged.

Various techdebt cleanup of parent.config generation. Generated config
should be byte-for-byte identical with or without this PR.

- combines "profileCache" and "originServers" into a single "serversWithParams" variable, since the params apply to and are only ever useful with their corresponding server
- renames "profileCache" struct to "parentServerParams", which is what it is, profileCache is an incredibly unmeaningful name inherited from ancient Perl code
- removes unused parentConfigDS symbols
- removes cgServer struct and replaces usage with real Servers; also inherited from ancient Perl code
@rob05c rob05c force-pushed the cleanup-parent-symbols branch from cd68ae3 to 191695d Compare May 5, 2022 15:46
@rob05c rob05c mentioned this pull request May 11, 2022
2 tasks
@rawlinp rawlinp merged commit b0a673f into apache:master May 11, 2022
zrhoffman pushed a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
Various techdebt cleanup of parent.config generation. Generated config
should be byte-for-byte identical with or without this PR.

- combines "profileCache" and "originServers" into a single "serversWithParams" variable, since the params apply to and are only ever useful with their corresponding server
- renames "profileCache" struct to "parentServerParams", which is what it is, profileCache is an incredibly unmeaningful name inherited from ancient Perl code
- removes unused parentConfigDS symbols
- removes cgServer struct and replaces usage with real Servers; also inherited from ancient Perl code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cache-config Cache config generation tech debt rework due to choosing easy/limited solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants