Skip to content

fix(orchestrator): use collision-free delimiters for harness config templating#25

Merged
yusufozturk merged 1 commit into
mainfrom
dev-temp-fix
Jun 26, 2026
Merged

fix(orchestrator): use collision-free delimiters for harness config templating#25
yusufozturk merged 1 commit into
mainfrom
dev-temp-fix

Conversation

@yusufozturk

@yusufozturk yusufozturk commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

The harness rendered subject configs with Go's default text/template
delimiters ({{ }}). This collided with subject configs that carry their
own native templating using the conventional {{ }} / {{{ }}} braces
— e.g. vmetric smart-routing tokens like {{{_vmetric.table}}} and
file-target names like {{.Timestamp}}.

The result:

  • The Go parser choked on {{{ (unexpected "{" in command).
  • Subjects' own {{ }} 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 and
every native {{ }} / {{{ }}} token passes through verbatim.

Changes

  • internal/orchestrator/docker.go

    • Introduce harnessTmplLeft ({{@) / harnessTmplRight (@}}) constants
      with a comment explaining the delimiter collision they avoid.
    • renderSubjectConfig now detects and parses templates using the harness
      delimiters via .Delims(...), instead of the default {{.
    • Updated the doc comment to clarify that configs using only their own
      native {{ }} tokens are passed through unchanged.
  • cases/*/configs/axosyslog.conf (5 files)

    • Update the harness-owned {{.CPUs}} placeholder to the new
      {{@.CPUs@}} syntax:
      • otlp_grpc_to_otlp_grpc_correctness
      • otlp_grpc_to_otlp_grpc_performance
      • tcp_to_http_5min_performance
      • tcp_to_http_performance
      • tcp_to_http_persistent_correctness

Impact

  • Non-templated subjects, directory-form configs (e.g. cribl-stream), and the
    existing missing-path tolerance are unaffected.
  • Subjects that rely on native {{ }} / {{{ }}} templating now render
    correctly instead of failing or being corrupted.

Summary by CodeRabbit

  • Bug Fixes
    • Improved template handling so configurations are rendered only when the new harness-style markers are present, reducing conflicts with existing config syntax.
    • Updated several performance and correctness test configurations to use the supported CPU placeholder format, helping tests run consistently across scenarios.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a98d32b0-58ba-463b-b00b-d7bed611c701

📥 Commits

Reviewing files that changed from the base of the PR and between b586ab1 and 2533593.

📒 Files selected for processing (6)
  • cases/otlp_grpc_to_otlp_grpc_correctness/configs/axosyslog.conf
  • cases/otlp_grpc_to_otlp_grpc_performance/configs/axosyslog.conf
  • cases/tcp_to_http_5min_performance/configs/axosyslog.conf
  • cases/tcp_to_http_performance/configs/axosyslog.conf
  • cases/tcp_to_http_persistent_correctness/configs/axosyslog.conf
  • internal/orchestrator/docker.go

Walkthrough

The 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 workers(...) placeholders to the same harness syntax.

Changes

Harness templating update

Layer / File(s) Summary
Rendering delimiters
internal/orchestrator/docker.go
renderSubjectConfig now checks for harness-delimited template markers and parses with explicit custom delimiters.
Case config placeholders
cases/otlp_grpc_to_otlp_grpc_*/configs/axosyslog.conf, cases/tcp_to_http_*/configs/axosyslog.conf
Five axosyslog.conf cases switch workers(...) from {{.CPUs}} to the harness-delimited CPU placeholder syntax.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • VirtualMetric/PipeBench#3: Introduces the templating path this PR refines by switching the renderer to harness delimiters and updating the matching case placeholders.

Poem

A bunny hopped by the config gate,
With curly braces now in a safer state.
{{@ and @}} dance neat and clear,
CPUs count fluff with less to fear.
🐇🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: switching harness templating to collision-free delimiters in the orchestrator.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-temp-fix

Comment @coderabbitai help to get the list of available commands.

@yusufozturk yusufozturk merged commit ca591c1 into main Jun 26, 2026
5 checks passed
@yusufozturk yusufozturk deleted the dev-temp-fix branch June 26, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant