Repository navigation
feat(conformity): lint finds placement, quorum and durability rules no cluster can meet - #430
Merged
Merged
Conversation
…o cluster can meet kates conformity lint's incoherence stage gains 11 checks, and the two-pass engine PR #420 held back for them. Errors, which no cluster can pass, so check stops with exit 2: - zones-unreachable: more zones than the pod count allows. - skew-unreachable: no allowed count and zones split with an allowed skew. - pernode-cannot-place-count: perNode cannot place the pods that zones, skew or kafka.rackAwareness require on a node. - config-value-kafka-refuses: with source brokers, a value Kafka never accepts for the key. - sensitive-config-from-brokers: with source brokers, a password-type key, whose value Kafka never returns. Warnings: - controller-quorum-even and controller-quorum-zone-loss; - replication-factor-exceeds-brokers, min-isr-not-below-rf and isr-lost-with-one-zone, which read spec.topics as well as kafka.config; - unclean-election-required. When a rule an error reads is tolerated (severity warn, or an active waiver), the check can still pass, so the error becomes a rule-never-passes warning. Each finding names the rules it read and gets its own verdict, so a tolerated controllers rule does not soften a hard brokers error.
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 8b of the conformity pre-flight (plan D1: the core 21 checks).
kates conformity lint's incoherence stage gains 11 checks, plus the two-pass engine that #420 held back for them.Errors
No cluster can pass these, so
checkstops with exit 2 before it calls the API.zones-unreachableskew-unreachablepernode-cannot-place-countkafka.rackAwareness(source cr) require on a nodeconfig-value-kafka-refusessource: brokers, a validated key admits no value Kafka accepts, such asmin.insync.replicas: {max: 0}sensitive-config-from-brokerssource: brokers, a password-type key, whose value Kafka never returnsWarnings
controller-quorum-evencontroller-quorum-zone-lossreplication-factor-exceeds-brokersmin-isr-not-below-rfisr-lost-with-one-zoneunclean-election-requiredunclean.leader.election.enablemust be true on more than one brokerThe replication-factor and min-ISR checks read
spec.topics.replicationFactorandminInsyncReplicas(#419) as well askafka.config.Two passes
When a rule an error depends on is tolerated (severity
warn, or an active waiver), the check can still pass. The engine then reportsrule-never-passes, a warning that names each tolerated rule. Each finding lists the rule ids it read and gets its own verdict, so a tolerated controllers rule does not soften a hard brokers error (TestTwoPassJudgesEachFindingAlone).Where this differs from the 8b brief and the draft
touchedset is gone. That set named every tolerated rule a check had read, including rules unrelated to the finding.big.Rat. Rounding is monotone, so a check can only fire less often, never falsely.rat/ratswait for 8c's quantity checks.default.replication.factor < 1warning forms ofconfig-value-kafka-refuses;oneOfis read as its least-to-greatest range (ashortcut:comment marks this). It can only fire less often.rule-never-passescatalogue entry is now triggered throughzones-unreachablewith a waived zones rule, because b60c2ee's trigger used an 8c check.Tests
TestCatalogue: every check fires on its trigger and not on its near miss.TestEveryCatalogueRuleIsRegisterednow passes both ways, withrule-never-passescounted when a two-pass check is registered.TestSkewFitsMatchesEverySplitcompares the skew maths with brute force over every split up to 14 pods.cli:go test ./...,go vet ./...,golangci-lint run --new-from-rev=origin/main ./...(0 issues), govulncheck,scripts/check-cli-style.shandscripts/check-cli-compat.sh;kates:./mvnw test -Dquarkus.grpc.codegen.skip=true -Dquarkus.http.test-port=0.Docs: one sentence in the book's
conformity checksection says that a tolerated rule that can never pass gives a warning, not an error.