mirror of
https://github.com/hanzoai/dns.git
synced 2026-10-30 18:40:55 +00:00
Nine packages failed. Eight of them for one reason: `go test ./...` ran without
the tags the Makefile ships with (GOTAGS = grpcnotrace metrics), and
luxfi/metric is `//go:build !metrics` — every counter, gauge and histogram is a
no-op unless that tag is set. So metrics, metrics/vars and the kubernetes
object counters were all asserting on numbers that could never move:
RequestCount was not incremented. Before: 0.000000, After: 0.000000
The shipping binary does set it, so this was never a production defect — but a
gate that builds something other than what ships cannot see one either.
The rest were real, and none of them are about metrics:
test/metric_naming_test.go declared a local `type metric` while importing
the package named metric, which every other file here imports too. The
local type is the newcomer; renamed it visitor, for the ast.Visitor it is.
Its BuildFQName call went back to prometheus, which is whose name format is
under test — luxfi/metric has no three-part equivalent, only
AppendNamespace(namespace, name).
Three %q verbs applied to numbers — an MX preference, an Rcode, a SOA
serial. Newer vet rejects them, and `go test` runs vet, so three packages
failed to build without ever reaching a test.
TestImportOrdering walked operator/, which is its own module
(github.com/hanzoai/dns-operator) and imports no coredns, so the
std -> coredns -> 3rd shape it checks for has no middle group to find.
Skipped like pb/ and vendor/ already are, for the same reason.
Eight of the nine pass now. The ninth is test/, where seven metrics
integration tests scrape /metrics and find nothing — the counters record but
are not exposed. That is the other half of the luxfi/metric migration and
wants its own change.