Skip to content

traffic_ctl config convert remap#13053

Open
bneradt wants to merge 1 commit intoapache:masterfrom
bneradt:refactor-remapyaml-parsing
Open

traffic_ctl config convert remap#13053
bneradt wants to merge 1 commit intoapache:masterfrom
bneradt:refactor-remapyaml-parsing

Conversation

@bneradt
Copy link
Copy Markdown
Contributor

@bneradt bneradt commented Apr 2, 2026

Move ATS core off the remaining remap-only parsing path and route remap.config loading through the shared src/config remap parser. This lets traffic_ctl and traffic_server use the same conversion logic while leaving only runtime regex-mapping helpers in the remap loader.

This builds off of the work to support remap.yaml here: #12997

@bneradt bneradt added this to the 11.0.0 milestone Apr 2, 2026
@bneradt bneradt requested a review from masaori335 April 2, 2026 19:56
@bneradt bneradt self-assigned this Apr 2, 2026
@bneradt bneradt added Remap traffic_ctl traffic_ctl related work. labels Apr 2, 2026
Move ATS core off the remaining remap-only parsing path and
route remap.config loading through the shared src/config remap
parser. This lets traffic_ctl and traffic_server use the
same conversion logic while leaving only runtime regex-mapping helpers
in the remap loader.

This builds off of the work to support remap.yaml here: apache#12997
@bneradt bneradt force-pushed the refactor-remapyaml-parsing branch from 5c17ee4 to 22db9c6 Compare April 2, 2026 21:42

constexpr swoc::Errata::Severity ERRATA_NOTE_SEV{static_cast<swoc::Errata::severity_type>(DL_Note)};
constexpr swoc::Errata::Severity ERRATA_ERROR_SEV{static_cast<swoc::Errata::severity_type>(DL_Error)};

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.

I prefer YAML key names definition in the beginning.

namespace config
{

using RemapConfig = YAML::Node;
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.

Hmm, can we define some struct describes remap.yaml node tree? It'll help us understanding type of node - int, string, list, map.

DbgCtl dbg_ctl_url_rewrite{"url_rewrite"};

swoc::Errata
parse_yaml_volume(const YAML::Node &node, url_mapping *url_mapping)
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.

I feel these parsers in this file should moved to config/remap.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Remap traffic_ctl traffic_ctl related work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants