Skip to content

Conversation

@brbzull0
Copy link
Contributor

@brbzull0 brbzull0 commented Feb 13, 2023

This includes 2 changes.

1 - Support for loading multiple YAML documents from the same records.yaml file. This is done basically to keep the same behavior as we had before with records.config where the latest config set overwrites a previous set. So basically:

records.yaml:

---
ts:
  diags:
    debug:
      enabled: 0
---
ts:
  diags:
    debug:
      enabled: 1

So, enabled=1 will be the variable value after loading.

2 - Add support for modifying a records.yaml file using traffic_ctl, this will let traffic_ctl to:

  • Append a new configuration field in a new YAML doc (same file)
traffic_ctl config set proxy.config.diags.debug.enabled 1 -c [file]
  • Modify the latest(top to bottom) YAML doc without appending a new doc
traffic_ctl config set proxy.config.diags.debug.enabled 1 -u -c [file]
  • Get a value from a records.yaml file
traffic_ctl config get proxy.config.diags.debug.enabled -c [file]

traffic_ctl docs are updated to reflect these changes.

#9384

@brbzull0 brbzull0 self-assigned this Feb 13, 2023
@brbzull0 brbzull0 force-pushed the records_load_all_docs branch 5 times, most recently from 0f2ea79 to 0a1436c Compare February 15, 2023 12:25
@brbzull0 brbzull0 added this to the 10.0.0 milestone Feb 15, 2023
@brbzull0 brbzull0 changed the title DRAFT - records.yaml - Add support to load multiple YAML docs from the same file. DRAFT - records.yaml - Add support to load multiple YAML docs from the same file and let traffic_ctl to modify a records.yaml file Feb 15, 2023
@brbzull0 brbzull0 added the Tools label Feb 15, 2023
@brbzull0 brbzull0 changed the title DRAFT - records.yaml - Add support to load multiple YAML docs from the same file and let traffic_ctl to modify a records.yaml file records.yaml - Add support to load multiple YAML docs from the same file and let traffic_ctl to modify a records.yaml file Feb 15, 2023
@brbzull0 brbzull0 marked this pull request as ready for review February 15, 2023 20:15
Copy link
Contributor

@cmcfarlen cmcfarlen left a comment

Choose a reason for hiding this comment

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

looks good. just some comment cleanup.

} // namespace

// } // namespace
// using namespace print_utils;
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comment

@brbzull0 brbzull0 force-pushed the records_load_all_docs branch from 0a1436c to dc28bbb Compare February 20, 2023 17:07
@brbzull0 brbzull0 requested a review from cmcfarlen February 20, 2023 17:48
@cmcfarlen
Copy link
Contributor

This will help to build tooling around records.yaml. Thanks so much!

@brbzull0 brbzull0 merged commit 6846b06 into apache:master Feb 20, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master: (49 commits)
  Cleanup: removing some traffic_manager leftovers. (apache#9425)
  records.yaml - Add support to load multiple YAML docs from the same file and let traffic_ctl to modify a records.yaml file (apache#9404)
  QUIC-quiche: Use configured disable_active_migration param at quiche transport configuration. (apache#9447)
  records.yaml: Make sure we fail if we found a legacy records.config file. (apache#9435)
  Use TSDbg in webp_transform plugin (apache#9439)
  quic: make sure we create a stream if none available. (apache#9436)
  Fixes comparison with the wrong type (apache#9441)
  On arm64 macOS, do not use pagezero linker flag when using luajit (apache#9430)
  tscore: Remove unneeded and mispelled libswoc reference. (apache#9429)
  Remove UDP_stubs.h (apache#9413)
  Make jsonrcp restricted_api false by default. (apache#9415)
  Histogram: rename members because Zwoop. (apache#9417)
  FileManager string update (apache#9416)
  P_SSLUtils.h include updates (apache#9414)
  libswoc: update build support to fix issues with 10-Dev merge. (apache#9397)
  QUIC: Remove hardcoded quiche set_initial_max_streams and use config values instead. (apache#9412)
  Fixes the compile to work with LLVM15 (apache#9410)
  update cmake for rpc and swoc (apache#9409)
  Removes the UglyStub file (apache#9401)
  TSan: Make Thread::cur_time thread local (apache#9184)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants