github robintra/perf-sentinel v0.5.26

latest releases: chart-v0.2.63, v0.8.14, chart-v0.2.62...
one month ago

What's new in v0.5.26

v0.5.26 starts the soft deprecation of the eight legacy top-level configuration keys that have been silently shadowing their [detection] and [daemon] section equivalents since the early versions. Behavior is preserved bit-for-bit, the sectioned form keeps winning over the flat form when both are set, and configurations using only the section form stay completely silent. What changes is the signal: when an operator's .perf-sentinel.toml only carries the flat form, perf-sentinel now logs a WARN-level event at config load pointing to the recommended sectioned key.

The eight deprecated keys are n_plus_one_threshold, window_duration_ms, listen_addr, listen_port, max_active_traces, trace_ttl_ms, max_events_per_trace, max_payload_size. Three of them migrate to a renamed sectioned key (n_plus_one_threshold to [detection] n_plus_one_min_occurrences, listen_addr to [daemon] listen_address, listen_port to [daemon] listen_port_http), the other five keep the same name under their section. The full migration table with before/after examples is in docs/CONFIGURATION.md and the FR mirror.

The deprecation event carries structured tracing fields rather than relying on regex extraction from the formatted message. legacy_key and replacement are exposed alongside the human-readable string so log shippers can count occurrences per flat or alert on operators who still ship deprecated configurations. The format string itself is constant per call site, no user-controlled value (including listen_addr's string content) reaches the log line. Cardinality is bounded at eight, one event per legacy key per Config::from(RawConfig) call.

Implementation lives in a single private helper resolve_with_deprecation_warning<T> in crates/sentinel-core/src/config.rs, generic on T without a Copy bound to handle the Option<String> case (listen_addr). The helper is #[must_use] to prevent a future refactor from silently dropping the resolved value. Eight resolution sites in impl From<RawConfig> for Config now route through it, the priority stays section > flat > default. Nineteen new tests lock the contract: sixteen for resolution priority (two per flat, one with only the flat set, one with both set and the section winning), one for the no-noise guarantee when neither form is set (defaults apply), and two captures via tracing-test 0.2.6 (dev-dependency) asserting the warning fires exactly when expected with the structured fields visible and stays silent when a section overrides the flat.

Two e2e test fixes ride along on the watch daemon spawn path. The two cli_watch_* tests now use distinct override port pairs in the +20000 zone (24318/24317 for the listen-address override test, 24320/24319 for the SIGTERM responsiveness test). Both pairs sit outside the daemon defaults (4318/4317) and outside the +10000 dogfooding zone (14318/14317) used by local development daemons, so the suite no longer collides with a developer running perf-sentinel in another shell. The SIGTERM test additionally asserts daemon liveness via try_wait before issuing the kill, so a silent bind failure (process exits 1 on its own) no longer satisfies the !status.success() check by accident.

Helm chart 0.2.29 ships in lockstep, bumping appVersion to 0.5.26 and the default daemon image tag to ghcr.io/robintra/perf-sentinel:0.5.26. The artifacthub.io/images annotation is updated in lockstep. No chart-level template change beyond the image tag, the v0.5.26 surface is a pure runtime addition on the daemon side.

Added

  • resolve_with_deprecation_warning helper in crates/sentinel-core/src/config.rs (#[must_use], generic over T without Copy). Emits a tracing::warn! event with structured fields legacy_key and replacement exactly when the legacy flat form is set without its section override. The eight resolution sites in impl From<RawConfig> for Config now route through it.
  • 19 new tests in crates/sentinel-core/src/config.rs::tests: 16 priority tests (resolves_to_value + yields_to_section per flat), 1 silence-when-unset assertion locking the no-noise default-only path, 2 capture tests via tracing-test 0.2.6 (new dev-dependency) asserting the warning fires with the expected structured fields and stays silent when the section overrides the flat.
  • Deprecated configuration keys section in docs/CONFIGURATION.md with the full migration table and a before/after migration example. FR mirror in docs/FR/CONFIGURATION-FR.md.

Changed

  • Helm chart 0.2.28 to 0.2.29, appVersion 0.5.25 to 0.5.26. The artifacthub.io/images annotation is updated in lockstep. No chart template change.
  • cli_watch_* e2e tests now use override port pairs in the +20000 zone (24318/24317 and 24320/24319) to avoid colliding with daemon defaults (4318/4317) and the local +10000 dogfooding zone (14318/14317). The SIGTERM test asserts daemon liveness via try_wait before kill, so a silent bind failure no longer passes the test by accident.

Deprecated

  • Eight top-level (flat) configuration keys: n_plus_one_threshold, window_duration_ms, listen_addr, listen_port, max_active_traces, trace_ttl_ms, max_events_per_trace, max_payload_size. They still resolve correctly for backward compatibility but emit a WARN-level deprecation event at config load when no section override is set. They will be removed in a future release.

Notes

  • Behavior is preserved bit-for-bit. When both the flat and the sectioned form are set for the same setting, the sectioned form wins exactly as before, no warning is emitted in that case. When neither form is set, the default applies silently. Operators using only the sectioned format see no behavior change and no log output from this release.
  • Structured logging fields are stable. legacy_key carries the deprecated key name as a &'static str, replacement carries the recommended sectioned path (for example [detection] n_plus_one_min_occurrences). Both are constants from the eight call sites, no user-controlled input feeds either field, no user-supplied value (including listen_addr's string content) is logged.
  • Removal is not scheduled for a specific version. The flat form will be removed in a future release once the community has had time to migrate. The current contract is "warn only", with no hard error or runtime rejection.

Install

Pre-built static binaries are attached to this release for linux-amd64, linux-arm64, macos-arm64, and windows-amd64. Verify the SHA256 from SHA256SUMS.txt before extracting. Crate consumers can cargo install perf-sentinel --version 0.5.26 once the workflow finishes propagating.

Helm operators bump to chart 0.2.29 for the matching appVersion, no values.yaml change required.

Full Changelog: v0.5.25...v0.5.26

Don't miss a new perf-sentinel release

NewReleases is sending notifications on new releases.