Skip to content

Release v1.2.1#33

Merged
fxthiry merged 4 commits intomainfrom
release/1.2.1
Apr 16, 2026
Merged

Release v1.2.1#33
fxthiry merged 4 commits intomainfrom
release/1.2.1

Conversation

@fxthiry
Copy link
Copy Markdown
Owner

@fxthiry fxthiry commented Apr 16, 2026

Promotes release/1.2.1 to main. Patch release bundling the fix for #31 and a related consistency fix in the throttle key renderer.

Bundled

  • fix [Bug]: The issue is with the rule_name in Telegram. #31: {{ rule_name }} is now available in top-level templates (templates.<name>.title, body, email_body_html) and in the throttle.key template, not just in notifier-level templates. Synthetic wins over any event field literally named rule_name.
  • consistency: the unflatten_dotted_keys step that v1.2.0 added for template rendering ([Bug]: Error warning when fields contain dot characters, sample nginx.http.request_id #25) now also applies to the throttle key, so dotted event fields like {{ nginx.http.status_code }} resolve consistently in throttle.key / title / body.
  • docs: docs/configuration.md and config/config.example.yaml clarify which variables are available at each templating level.

Validation

  • Live tested end-to-end against the synthetic nginx event shape (flat dotted nginx.http.* keys). Both email and Telegram delivered the expected rendered content with {{ rule_name }} resolved. No 400 from Telegram, no empty-body fallback triggered.
  • 451 unit tests (baseline 444 + 7 new).

Non-breaking

Existing configs that referenced {{ rule_name }} at layer 1 continue to compile; they now produce the rule name instead of an empty string. Configs that did not use these variables render byte-identically to v1.2.0.

Release flow

After this merge, v1.2.1 gets tagged on the merge commit and the release build produces the final binaries and debs.

François-Xavier THIRY and others added 4 commits April 16, 2026 08:43
Users writing `{{ rule_name }}` inside a top-level template (`templates.<name>.title`,
`body`, `email_body_html`) or inside a `throttle.key` template previously got
an empty string, because rule_name was only injected into the notifier-level
contexts (email subject_template, telegram body_template, etc.). Congto hit
this trying to build a Telegram alert with the rule name in the body.

Inject the synthetic `rule_name` String into the rendering context at both
locations, with a collision policy that has the synthetic value win over any
event field literally named `rule_name`, matching the behaviour of the
notifier-level contexts.

Apply the same unflatten step to the throttle key renderer as the one added
in v1.2.0 for templates (issue #25), so dotted event fields like
`{{ nginx.http.status_code }}` resolve the same way in `throttle.key` as
they do in `title` / `body` / `email_body_html`.

Non-breaking. Existing configs that referenced `{{ rule_name }}` at the top
level continue to compile; they now produce the expected value instead of
an empty string. Configs that did not reference these variables render
identically to v1.2.0.
fix(templates): expose rule_name at layer 1 and in throttle key (#31)
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fxthiry fxthiry merged commit da8827f into main Apr 16, 2026
5 checks passed
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.

[Bug]: The issue is with the rule_name in Telegram.

1 participant