fix(orchestrator): use collision-free delimiters for harness config templating#25
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThe orchestrator now renders subject configs only when harness delimiters are present, using explicit delimiter parsing. The OTLP gRPC and TCP-to-HTTP case configs update ChangesHarness templating update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The harness rendered subject configs with Go's default
text/templatedelimiters (
{{ }}). This collided with subject configs that carry theirown native templating using the conventional
{{ }}/{{{ }}}braces— e.g. vmetric smart-routing tokens like
{{{_vmetric.table}}}andfile-target names like
{{.Timestamp}}.The result:
{{{(unexpected "{" in command).{{ }}tokens were mangled before they ever reached the subject.This PR switches the harness to a distinct, collision-free delimiter pair
(
{{@ ... @}}) so that only harness-owned placeholders are rendered andevery native
{{ }}/{{{ }}}token passes through verbatim.Changes
internal/orchestrator/docker.goharnessTmplLeft({{@) /harnessTmplRight(@}}) constantswith a comment explaining the delimiter collision they avoid.
renderSubjectConfignow detects and parses templates using the harnessdelimiters via
.Delims(...), instead of the default{{.native
{{ }}tokens are passed through unchanged.cases/*/configs/axosyslog.conf(5 files){{.CPUs}}placeholder to the new{{@.CPUs@}}syntax:otlp_grpc_to_otlp_grpc_correctnessotlp_grpc_to_otlp_grpc_performancetcp_to_http_5min_performancetcp_to_http_performancetcp_to_http_persistent_correctnessImpact
existing missing-path tolerance are unaffected.
{{ }}/{{{ }}}templating now rendercorrectly instead of failing or being corrupted.
Summary by CodeRabbit