Skip to content

test(compose): gate the sched log topic in mixed clusters - #586

Draft
emlautarom1-agent[bot] wants to merge 2 commits into
mainfrom
test/revalidate-sched-exclusion
Draft

test(compose): gate the sched log topic in mixed clusters#586
emlautarom1-agent[bot] wants to merge 2 commits into
mainfrom
test/revalidate-sched-exclusion

Conversation

@emlautarom1-agent

@emlautarom1-agent emlautarom1-agent Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #583

Summary

mixed_2_charon_2_pluto exempted the sched log topic from the Warn Log Rate gate on the grounds that pluto did not serve /charon/priority/2.0.0 but this is no longer true with #574.

This PR removes this suppression and verifies that test continue to stay green. We also drop the additional config code that was introduced only to deal with this suppression.

Out of scope

Currently, the tests do not pass cleanly with only this fix since #585 is required:
inclusion checker rejects its own simnet mock's block responses on every due slot, flooding each pluto node's warn log and resulting in failing tests.

@emlautarom1-agent emlautarom1-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline notes for reviewers.

@@ -236,12 +236,6 @@ func smokeScenarios() []smokeScenario {
}
// `pluto run` fails fast on --synthetic-block-proposals.
conf.SyntheticBlockProposals = false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up if you run this locally. The scenario fails today, before and after this change, on #585 — the inclusion checker rejects charon beaconmock's block responses and re-warns every tick, so both pluto nodes trip Warn Log Rate. To reproduce the charon-side verdict this change is actually about, temporarily add conf.AlertExcludeJobs = []string{"node2", "node3"} here; it passes with "No alerts detected". That exemption is deliberately not committed.

Comment on lines +70 to 76
// TestWriteAlertRulesWarnTopics asserts the Warn Log Rate gate excludes exactly
// the two charon mock-noise topics, so every other topic — including the empty
// one pluto emits — stays gated.
func TestWriteAlertRulesWarnTopics(t *testing.T) {
content := writeRules(t, NewDefaultConfig())
require.Contains(t, content, `increase(app_log_warn_total{topic!~"vmock|tracker"}[30s]) > 2`)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deliberately a stricter test than the one it replaces. The previous case asserted the knob's append behaviour; with the knob gone this pins the exclusion list exactly, so adding a third topic has to be an explicit edit here rather than a scenario-local escape hatch. Given that #583 exists because a topic was excluded on a rationale nobody re-checked, making the list hard to extend quietly is the point.

Charon's infosync exchange with pluto peers completes cleanly over
/charon/priority/2.0.0, so no warning is logged under topic=sched and the
Warn Log Rate gate has nothing to suppress. Measured across three
mixed_2_charon_2_pluto runs: app_log_warn_total{topic="sched"} is never
created on the charon nodes, no sched-topic WARN or ERROR line appears in
their logs, and charon never logs "P2P sending failing" — the warning the
exclusion named.

mixed_2_charon_2_pluto was the exclusion's only user, so
AlertWarnExcludeTopics goes with it. The two remaining warn-topic
exclusions are pinned by test instead, since both name charon components
and neither occurs on pluto — pluto sets a log topic on almost nothing, so
its warnings carry no topic label and stay gated.

Closes #583
@emlautarom1-agent
emlautarom1-agent Bot force-pushed the test/revalidate-sched-exclusion branch from 7287d4f to addc64e Compare August 4, 2026 18:42

@emlautarom1-agent emlautarom1-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-anchored after a rebase; the note below is the reason removing sched is safe.

Comment on lines +479 to +483
// Both are mock artifacts, not node behavior; every other warn topic stays
// gated. Both name charon components and only ever occur on charon nodes:
// pluto sets a log topic on almost nothing, so its warnings carry no topic
// label and this exclusion never applies to them.
const warnTopics = "vmock|tracker"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing sched is safe, and the trap to avoid. Pluto attaches a log topic in exactly one live code path (the health checker's health span). Everything else it warns about is recorded with no topic label, and Prometheus drops empty label values at ingest, so those series carry no topic key at all. A negative regex matcher selects a series whose label is absent, which means topic!~"vmock|tracker" and topic!~"vmock|tracker|sched" gate pluto's warnings identically — verified with promtool test rules on the pinned Prometheus version. That is why dropping sched cannot alter the pluto side of the verdict, and why the control run failed the same way as the un-excluded one.

The trap: both remaining topics are named after charon components, and the matcher itself is not scoped by job. If pluto ever adopts charon's topic convention, a pluto node emitting topic=tracker would start being excluded silently. Worth scoping this to charon jobs at that point rather than discovering it the way #583 was discovered.

(Charon labels its own untopiced warnings topic="unknown" rather than leaving the label empty — a divergence that happens not to matter here, since both forms are gated.)

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.

Re-validate mixed_2_charon_2_pluto smoke scenario without the sched alert exclusion

0 participants