For eleven hours a web application's port was open and its program ran while every request hung; liveness and a TCP check both say it fine. R145 raises a web server whose application never answers, has the node-engine at its commit look at it with the module's declared HTTP check, and the controller at its commit raise the module's condition on the second look. Proved: it fails on the trunk before Phase B and passes on it.
129 lines
7.6 KiB
Go
129 lines
7.6 KiB
Go
// Package replays is the lab's replay of every core incident (novox/hq to-be 45 §9, M9): a scripted
|
|
// replay of what happened, asserting the rule's outcome, run before every merge of a core repository —
|
|
// and proved, once, to fail on the commit before its fix and to pass on the fix.
|
|
//
|
|
// **Where a replay lives.** A replay of one component's logic is a test in that component's repository,
|
|
// written only with what the component had before its fix, so it can be laid over the older commit
|
|
// (the controller's replays_test.go). A replay of what the mesh runs rather than what it wrote — the bus
|
|
// server's release, the resolver the catalogue configures, under both C libraries — lives here, where a
|
|
// container runtime and a bus of a given release are at hand. Every one is in Register, with the issue,
|
|
// the fix, and how the prover runs it at a commit.
|
|
//
|
|
// **A new core issue resolves with its replay added here, or with a stated reason none is possible**
|
|
// (hq 00-META/checks/cycle.py holds the issue to it: `replay:` names an entry here, or `replay-none:`
|
|
// says why).
|
|
package replays
|
|
|
|
// Kind is how a replay is run at a commit.
|
|
type Kind string
|
|
|
|
const (
|
|
// InRepository is a test in the fixed repository, laid over the commit and run there with go test.
|
|
InRepository Kind = "test"
|
|
// Bus is the bus replay here, run against a server of the release the catalogue pinned at the commit.
|
|
Bus Kind = "bus"
|
|
// Resolver is the resolver replay here, run with the catalogue's resolver configuration at the commit,
|
|
// asked by a program under musl and one under glibc.
|
|
Resolver Kind = "resolver"
|
|
// Gate is a test of the merge gate itself: before its fix there was no check to fail, so the commit
|
|
// before is held to fail by not having it.
|
|
Gate Kind = "gate"
|
|
// Liveness is the crash-loop replay here: a container that exits at start, raised on the runtime here,
|
|
// judged by the node-engine at the commit, and the controller at the commit judging its gate from what
|
|
// the engine said (novox/hq ADR 0240). Two repositories move together: Repository and With.
|
|
Liveness Kind = "liveness"
|
|
)
|
|
|
|
// Also is another repository a replay runs at its own commits beside Repository's: before its fix and on
|
|
// it, as Repository is.
|
|
type Also struct {
|
|
Repository string
|
|
Fix string
|
|
// Before is the commit the replay runs this repository at before the fix, when that is not Fix's
|
|
// first parent.
|
|
Before string
|
|
}
|
|
|
|
// Replay is one incident, replayed.
|
|
type Replay struct {
|
|
ID string
|
|
Issue int
|
|
// What is the incident in a line, and Asserts the rule's outcome the replay holds.
|
|
What, Asserts string
|
|
Kind Kind
|
|
// Repository is where the fix is, and Fix the fix's commit there: the replay must fail on Fix's first
|
|
// parent and pass on Fix.
|
|
Repository string
|
|
Fix string
|
|
// Before is the commit the replay must fail on, when that is not Fix's first parent: a fix still on its
|
|
// branch is proved against the main it branched from. Set to "" once the fix is merged.
|
|
Before string
|
|
// Package and Test are where the replay is run: a package of Repository for InRepository and Gate,
|
|
// of this module otherwise; Files are the files laid over the commit, from where the replay lives.
|
|
Package string
|
|
Test string
|
|
Files []string
|
|
// Home is where the replay's files live, when that is not the fix: the repository and ref.
|
|
Home, HomeRef string
|
|
// With is the other repositories the replay runs at their commits beside Repository's (Liveness).
|
|
With []Also
|
|
}
|
|
|
|
// Register is every replay, by incident.
|
|
var Register = []Replay{
|
|
{ID: "R236", Issue: 236, Kind: Gate, Repository: "mesh-controller", Fix: "feat/merge-gate",
|
|
Before: "origin/main",
|
|
What: "a login manager's service passed the catalogue check and was refused whole by the node-engine",
|
|
Asserts: "a manifest the node-engine refuses fails its pull request, naming the machine and the module",
|
|
Package: "./cmd/mesh-controller", Test: "TestIssue236", Files: []string{"cmd/mesh-controller/merge_gate_test.go"}},
|
|
{ID: "R262", Issue: 262, Kind: Resolver, Repository: "mesh-catalog", Fix: "20603b63e67323f2c725b242c0ea87281d4dee93",
|
|
What: "an Alpine container could not find a machine by its mesh name: NXDOMAIN for IPv6 is final to musl",
|
|
Asserts: "every machine's name resolves through the catalogue's resolver under musl and under glibc",
|
|
Package: ".", Test: "TestReplay262"},
|
|
{ID: "R263", Issue: 263, Kind: InRepository, Repository: "mesh-controller", Fix: "6d620f77c3f3f967be953ff760823c6a51b7b8d3",
|
|
What: "a consumer's 26-character identity refused the resolver holder's whole declaration",
|
|
Asserts: "a provider's machine composes whatever its consumers are called",
|
|
Package: "./cmd/mesh-controller", Test: "TestReplay263", Files: []string{"cmd/mesh-controller/replays_test.go"},
|
|
Home: "mesh-controller", HomeRef: "feat/replays"},
|
|
{ID: "R266", Issue: 266, Kind: Bus, Repository: "mesh-catalog", Fix: "0275c2e",
|
|
What: "a merge on the bus was never handed to the controller: 2.10 skipped messages on a consumer with several filters",
|
|
Asserts: "a consumer filtered like the controller's is handed every followed message under the mesh's traffic",
|
|
Package: ".", Test: "TestReplay266"},
|
|
{ID: "R273", Issue: 273, Kind: InRepository, Repository: "mesh-controller", Fix: "8bfaf1523ed2dddde80daa0994f1044e59db44b1",
|
|
What: "a rule for the resolver re-bound a machine's database consumers to empty databases elsewhere",
|
|
Asserts: "a consumer beside its store stays bound to it while another machine holds the store's seat",
|
|
Package: "./cmd/mesh-controller", Test: "TestReplay273", Files: []string{"cmd/mesh-controller/replays_test.go"},
|
|
Home: "mesh-controller", HomeRef: "feat/replays"},
|
|
// Not a core incident, and the first of its kind: a module's. The crash loop was found by a person
|
|
// reading the agent server's log for another reason (issue 268); research 032 measured it, and ADR
|
|
// 0240 makes the node-engine judge it and the gate fail it.
|
|
{ID: "R-crashloop", Issue: 268, Kind: Liveness, Repository: "mesh-controller",
|
|
Fix: "feat/a-module-says-how-it-is-healthy", Before: "origin/main",
|
|
With: []Also{{Repository: "mesh-host", Fix: "feat/a-module-says-how-it-is-healthy", Before: "origin/main"}},
|
|
What: "the agent server crash-looped about a hundred times while the mesh read it applied, its tools served " +
|
|
"and nothing raised: the gate judged a module by what the mesh saw from outside",
|
|
Asserts: "a container whose program exits at start is said unhealthy by the node-engine, and its build fails " +
|
|
"its gate on the first machine and is put back there",
|
|
Package: ".", Test: "TestReplayCrashLoop", Files: []string{"cmd/mesh-controller/replays_test.go"}},
|
|
// A module's again: the silent web application, which no liveness and no TCP check sees, raised by the
|
|
// HTTP check its module declares (ADR 0240 Phase B).
|
|
{ID: "R145", Issue: 145, Kind: Liveness, Repository: "mesh-controller",
|
|
Fix: "feat/health-the-field", Before: "origin/main",
|
|
With: []Also{{Repository: "mesh-host", Fix: "feat/health-the-field", Before: "origin/main"}},
|
|
What: "a web application accepted TCP and answered nothing for eleven hours while the mesh said its machine " +
|
|
"healthy: its port was open and its program ran",
|
|
Asserts: "a web server whose application never answers is said unhealthy by its declared HTTP check within two " +
|
|
"looks, and the controller raises the module's condition on the second",
|
|
Package: ".", Test: "TestReplaySilentWebApp", Files: []string{"cmd/mesh-controller/replays_test.go"}},
|
|
}
|
|
|
|
// Find is the replay of that id, or of that issue.
|
|
func Find(id string) (Replay, bool) {
|
|
for _, r := range Register {
|
|
if r.ID == id || r.ID == "R"+id {
|
|
return r, true
|
|
}
|
|
}
|
|
return Replay{}, false
|
|
}
|