Skip to content

Commit

Permalink
records.config to records.yaml (#9264)
Browse files Browse the repository at this point in the history
This commit contains:

* records.yaml - Rename records that will have issues when migrated to
yaml.

To avoid issues with fields which the main root key holds value and also children fields I had to rename them in order to make it compatible with YAML.

So fields like this:

proxy.config.exec_thread.autoconfig INT 1 << can’t have value and children fields
proxy.config.exec_thread.autoconfig.scale FLOAT 1.0

So this now looks like this:

proxy.config.exec_thread.autoconfig.enabled INT 1

So when migrated to YAML it will looks like this:

exec_thread:
    autoconfig:
      enabled: 1 << new field.
      scale: 1.0

* records.yaml: replace records.config configuration file and use YAML
format instead.
- This change keeps the original internals and only adds a new layer for parsing YAML instead of records.
- YAML nodes are converted to record names (dot(.) separated) and use the same internal features.
- traffic_ctl still works with record names.
- All the internal API to query and set records remains unchanged.

* record.yaml - Add basic unit test for some specific cases.
* Add test for fields with multipliers
* Docs update.
  • Loading branch information
brbzull0 authored Feb 2, 2023
1 parent 15c39da commit aebef45
Show file tree
Hide file tree
Showing 152 changed files with 3,994 additions and 1,638 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ config.cache
config.status
config.nice

configs/records.config.default
configs/records.yaml.default
configs/storage.config.default

doc/_build
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/ats_conf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$recedit->set(conf => "proxy.config.http.server_ports", val => "80 80:ipv6 443:ssl 443:ipv6:ssl");

# Threads
$recedit->set(conf => "proxy.config.exec_thread.autoconfig", val => "0");
$recedit->set(conf => "proxy.config.exec_thread.autoconfig.enabled", val => "0");
$recedit->set(conf => "proxy.config.exec_thread.limit", val => "8");
$recedit->set(conf => "proxy.config.cache.threads_per_disk", val => "8");
$recedit->set(conf => "proxy.config.accept_threads", val => "0");
Expand All @@ -42,7 +42,7 @@
# TLS
$recedit->set(conf => "proxy.config.ssl.hsts_max_age", val => "17280000");
#$recedit->set(conf => "proxy.config.ssl.max_record_size", val => "-1");
$recedit->set(conf => "proxy.config.ssl.session_cache", val => "2");
$recedit->set(conf => "proxy.config.ssl.session_cache.value", val => "2");
$recedit->set(conf => "proxy.config.ssl.ocsp.enabled", val => "1");
$recedit->set(conf => "proxy.config.http2.stream_priority_enabled", val => "1");
$recedit->set(conf => "proxy.config.ssl.max_record_size", val => "-1");
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/remap.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ reverse_map http://192.168.3.17:6969 https://ci.trafficserver.apache.org

# Read-the-docs
#map http://docs.trafficserver.apache.org \
# http://trafficserver.readthedocs.org/en/latest/reference/configuration/records.config.en.html
# http://trafficserver.readthedocs.org/en/latest/reference/configuration/records.yaml.en.html
redirect http://docs.trafficserver.apache.org https://docs.trafficserver.apache.org

map https://docs.trafficserver.apache.org/__RTD http://192.168.3.17/RTD

map https://docs.trafficserver.apache.org/records.config \
https://trafficserver.readthedocs.org/en/latest/reference/configuration/records.config.en.html \
https://trafficserver.readthedocs.org/en/latest/reference/configuration/records.yaml.en.html \
@plugin=conf_remap.so @pparam=records.config.pristine

map https://docs.trafficserver.apache.org https://trafficserver.readthedocs.org \
Expand Down
4 changes: 2 additions & 2 deletions configs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

SUBDIRS = body_factory
EXTRA_DIST = \
records.config.default.in \
records.yaml.default.in \
storage.config.default.in

sysconfdir = $(pkgsysconfdir)
nodist_sysconf_DATA = \
records.config.default \
records.yaml.default \
storage.config.default

dist_sysconf_DATA = \
Expand Down
180 changes: 0 additions & 180 deletions configs/records.config.default.in

This file was deleted.

Loading

0 comments on commit aebef45

Please sign in to comment.