Skip to content

chore(release): v2.0.1 hardening patch#40

Open
fxthiry wants to merge 1 commit intomainfrom
release/2.0.1
Open

chore(release): v2.0.1 hardening patch#40
fxthiry wants to merge 1 commit intomainfrom
release/2.0.1

Conversation

@fxthiry
Copy link
Copy Markdown
Owner

@fxthiry fxthiry commented Apr 17, 2026

Summary

Post-v2.0.0 hardening patch. Three focused fixes, no breaking changes, no new features.

  • SecretString now wraps every notifier config secret (bot_token, webhook_url, webhook headers, SMTP password). A Debug dump of the parsed config renders [REDACTED] rather than leaking the token. Guarded by a canary regression test.
  • Loading a v1.x victorialogs.url config against v2.x now emits an actionable error: plain-English incompatibility line, YAML before/after, direct MIGRATION.md link, rollback hint.
  • valerter_vl_source_up gauge is debounced. Three consecutive failures (HTTP error, connection error, or mid-stream EOF) are required before the gauge flips to 0. Transient hiccups no longer page. Any single success resets the counter.

Threshold is fixed at 3 (not configurable) to keep the contract simple; operators wanting a different window can use Prometheus for: on their alert rule.

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (556 tests pass)
  • Unit: notifier_config_debug_never_leaks_secrets asserts no canary secret surfaces through Debug for Telegram / Mattermost / Webhook / Email configs
  • Unit: should_report_source_down_debounces_until_threshold asserts the gauge-flip gate returns false below the threshold and true at/above it
  • Manual: loading a v1.x config surfaces the new error with MIGRATION.md link + rollback hint
  • Manual: VL container stopped mid-stream: gauge stayed at 1 through 2 consecutive failures, flipped to 0 at the 3rd, recovered to 1 on container restart

Refs deferred-work items D-22-1, D-doc-1, D-vl-obs-1.

…debounce)

Three post-v2.0.0 fixes bundled into one coherent "durability" patch.

- Notifier config secrets (bot_token, webhook_url, Webhook headers, SMTP
  password) are now SecretString, so a format!("{:?}", config) or a
  tracing context carrying the parsed config renders [REDACTED] instead
  of leaking the secret. Regression-guard test
  notifier_config_debug_never_leaks_secrets runs canaries through each
  notifier config's Debug output.
- The migration error emitted when a v1.x config is loaded against v2.x
  now leads with a human-readable incompatibility line, includes the
  before/after YAML diff, a direct link to MIGRATION.md, and a rollback
  hint.
- valerter_vl_source_up gauge is now debounced to 3 consecutive failures
  before flipping to 0, via VL_SOURCE_UP_FAILURE_THRESHOLD. Transient
  5xx / EOF / timeout no longer page. Flip back to 1 on any single
  success, counter resets.

No breaking changes. No new features. Dashboards and alerts are
unchanged (the gauge contract for a persistently-down source is
identical).
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 64.28571% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tail.rs 37.50% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

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