Repository navigation
Render Brainstore Deployments and ConfigMaps from shared defines - #138
Pierre Massat (phacops) wants to merge 1 commit into
Conversation
The reader, writer, and fastreader Deployments were identical apart from the role name, the automation writer differed in three places, and the four ConfigMaps differed by a handful of keys. AGENTS.md had to ask contributors to edit all four ConfigMaps by hand. Move the shared bodies into braintrust.brainstore.deployment and braintrust.brainstore.configmap. Each role file now includes the define with its values map; role-only settings (BRAINSTORE_WRITER_LOOP_CONFIG, the automation writer's guard, defaults merge, probe port, and Azure disk condition) stay in the role files. The per-role files remain because the checksum and pod-template fingerprint helpers render them by name. Rendered output is byte-identical to the previous templates, so pod checksums and fingerprints do not change and upgrades cause no restarts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01449dBcsndUJDCqCacbrEvW
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Confidence Score: 5/5
[Low impact] The PR appears safe to merge; no actionable regressions or repository-rule violations were found. SummaryMoves the four Brainstore roles’ repeated Deployment and ConfigMap bodies into shared defines.
phacops explicitly deferred changing reader, writer, and fastreader probes to follow each role’s service port because that would change rendered output.
|
Summary
The reader, writer and fastreader Deployments were identical apart from the role name (204 lines each). The automation writer differed in three places, and the four ConfigMaps differed by a few keys. AGENTS.md asked contributors to edit all four ConfigMaps by hand.
braintrust.brainstore.deployment(_brainstore-deployment.tpl) andbraintrust.brainstore.configmap(_brainstore-configmap.tpl).BRAINSTORE_WRITER_LOOP_CONFIG, and the automation writer's absent-map guard, defaults merge, probe-port override and Azure disk condition.braintrust.brainstore.podAnnotationsand the startup gate render them by name.The net change is about 1,000 fewer lines.
Rendered output is byte-identical
Pod checksum annotations hash each ConfigMap's raw rendered text, so any whitespace change would restart every Brainstore pod on upgrade.
helm templateoutput was compared byte for byte betweenmainand this branch across 22 value sets, with zero differences:ci/values-*.yaml;examples/*/values.yamlon top of ci/values-google;replicas: 0andlocksBackend: objectStorage;--reuse-valuesfixtures: pre-automationwriter, reuse-automationwriter-replicas, pre-brainstore-pdb, pre-rollout, and a nullbrainstore.automationwritermap.A one-character change to the ConfigMap define changes 8 checksum annotations in that comparison, so a whitespace regression would show up. The failure messages are also unchanged: progressDeadlineSeconds validation and the
volume.size must be seterrors.Input matrix
No row renders differently, so there are no new unit tests. The existing suites cover every row, and
./test.shpasses (675 tests).*-values.yamlfixturesbrainstore-automationwriter_test.yaml,brainstore-writer-configmap_test.yamlbrainstore-automationwriter_test.yamlbrainstore-startup-gate_test.yaml, automation writer validate testsmigrations_test.yaml,brainstore-startup-gate_test.yamlFollow-up (not in this PR)
Reader, writer and fastreader still use the hardcoded
brainstore.livenessProbe.httpGet.port: 4000, even when<role>.service.portis changed. PassingprobePortfor them, as the automation writer does, would fix that in one place, but it changes rendered output, so it belongs in its own PR.Generated by Claude Code