feat(nodedeployment): add --genesis-override flag#184
Merged
Conversation
Adds a dedicated `seictl nd apply --genesis-override <key>=<value>` flag that writes flat dotted-key entries into `spec.genesis.overrides` on the rendered SeiNodeDeployment. Mirrors the existing `--override` flag for `spec.template.spec.overrides`. Closes the gap surfaced by #183: `--set` builds nested maps from dotted paths, but the sidecar's applyGenesisOverrides requires the dots to live INSIDE the key. The new flag treats the key as a literal map-key string (no path splitting) and validates the cosmos-module shape (module.field [.field...]) locally, so single-segment keys fail at apply time rather than after the SND has stalled retrying assemble-genesis. Values parse as JSON if they parse (numbers, bools, objects, arrays); otherwise as raw strings. Matches the controller's `map[string]apiextensionsv1.JSON` type for genesis.overrides. Only valid with `--preset genesis-chain` (rpc preset has no `spec.genesis`). Repeatable. Distinct from `--override` which targets per-node config.toml overrides at config-apply time. Test coverage: - TestRender_GenesisOverrideFlag — string, bool, number, object values all round-trip correctly via the renderer - TestRender_GenesisOverrideRejectsNonGenesisPreset - TestApplyGenesisOverride_Errors — missing '=', empty key, single-segment key, empty path segment - TestApplyGenesisOverride_PreservesExistingKeys
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
Platform reviewer + k8s reviewer cross-review on the initial commit caught two: - Reject `--genesis-override key=` (empty value) explicitly in applyGenesisOverride. Mirrors the sidecar's applyGenesisOverrides rejection of empty json.RawMessage at assemble-genesis time, so the failure surfaces at apply time instead of after the SND has stalled. - Document the JSON-quoted-string escape in the --genesis-override usage string so users have a deterministic path to force a numeric-looking value into a string at the YAML level (e.g. --genesis-override foo.bar='"42"' renders foo.bar: "42"). Added TestApplyGenesisOverride_JSONStringEscape covering the escape contract. The empty-value case is added to TestApplyGenesisOverride_Errors. The k8s reviewer's non-finite-float concern (NaN/Inf) is deferred — json.Unmarshal of a textual input never yields NaN/Inf (spec-illegal), and 1e400 → +Inf surfaces a confusing error at SSA time. Acceptable in v1; can be tightened later if it bites.
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
bdchatham
added a commit
that referenced
this pull request
May 18, 2026
Picks up #184 (--genesis-override flag) so the harbor-dev skill can land its follow-up that replaces the yq-patching workaround with the canonical CLI invocation.
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.
Summary
Closes #183. Adds a dedicated
seictl nd apply --genesis-override <key>=<value>flag that writes flat dotted-key entries intospec.genesis.overrideson the rendered SeiNodeDeployment. Mirrors the existing--overrideflag (which targetsspec.template.spec.overrides).Why
spec.genesis.overrides(shipped this morning via #181 + sei-k8s-controller#270) requires a flatmap[string]<JSON>with dotted cosmos-module keys ("staking.params.unbonding_time": "600s"). The sidecar'sapplyGenesisOverridesenforces this: keys must bemodule.field[.field...], first segment must be a cosmos module inapp_state.seictl --set spec.genesis.overrides.<path>=<value>cannot emit that shape —--set's path parser splits unconditionally on.and builds a nested map. Today's first attempt at the field (sei-protocol/harbor-engineering-workspace#14) shipped the nested-map shape and the sidecar rejected it on every retry withkey "app_state" must be of the form module.field[.field...]. Required a manualyq-patching workaround (sei-protocol/harbor-engineering-workspace#16).What this PR does
Renders:
module.field[.field...]) fails fast at apply time rather than after the SND has stalled--preset != genesis-chain(rpc preset has nospec.genesis)--overrideTests
TestRender_GenesisOverrideFlag— string / bool / number / object values all round-trip correctly through the rendererTestRender_GenesisOverrideRejectsNonGenesisPresetTestApplyGenesisOverride_Errors— missing=, empty key, single-segment key, empty path segmentTestApplyGenesisOverride_PreservesExistingKeys— multiple flag uses accumulate into one mapmake testpasses.Follow-ups
After this releases (v0.0.51?), the harbor-dev skill docs in sei-protocol/Tide get a follow-up PR that replaces the manual-
yqworkaround with the canonical--genesis-overrideinvocation. Will land separately.🤖 Generated with Claude Code