docs: clarify YAML quoting vs matcher token quoting#5264
docs: clarify YAML quoting vs matcher token quoting#5264Cloud-Architect-Emma wants to merge 1 commit into
Conversation
Fixes prometheus#5099 Add a note under UTF-8 matchers explaining that YAML quoting applies to the entire matcher string, not individual tokens. Include guidance on plain-style, single-quoted, and double-quoted YAML matchers. Co-authored-by: Cloud-Architect-Emma <Cloud-Architect-Emma@users.noreply.github.com> Signed-off-by: Cloud-Architect-Emma <emmanuela_prince@yahoo.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation note added to clarify that YAML quoting rules apply to entire matcher strings, not individual tokens. Examples demonstrate plain-style, single-quoted, and double-quoted YAML scalar approaches for matcher entries. ChangesMatcher YAML Quoting Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi maintainers, could someone please approve the workflow run so the build and test checks can execute? This is a documentation-only change adding a note to clarify YAML quoting vs matcher token quoting as reported in #5099. DCO is passing. Thanks! |
Fixes #5099
Adds a note under the "UTF-8 matchers" section clarifying the distinction between YAML quoting and matcher token quoting.
Problem: The documentation describes double-quoting of individual matcher tokens (label name, label value) but does not explain that this quoting is handled by Alertmanager's own parser, not by YAML. Users writing env =~ "prod" without surrounding YAML quotes may believe the inner double quotes protect against YAML special characters, which they do not.
Change: Added a blockquote note explaining the three YAML quoting styles (plain, single-quoted, double-quoted) with examples, and explicitly clarifying that inner double quotes on matcher tokens provide no YAML-level protection.
Summary by CodeRabbit