Admin console: Reshards nav page + auto-discovering config-store explorer#923
Merged
Conversation
…orer Reshards in the left nav: new GET /api/v1/reshards (all orgs, newest first) + a Reshards page listing every operation — org link, from->to, state, current step, runtime, maintenance-mode duration — each row linking to the live operation page. Starting a reshard stays on the org detail page. Config Store page becomes a real database explorer: the models API now auto-discovers every base table in the config and runtime schemas from information_schema (fresh per request, so tables created by migrations or AutoMigrate after boot appear immediately) and surfaces the ones without a typed descriptor under an "Other" group, columns in ordinal order. Typed descriptors keep their precise json-tag redaction; the auto path errs toward redaction instead — values of credential-shaped columns (password/secret/ciphertext/token/nonce/credential) come back as [redacted], and auto keys are validated against a fresh information_schema read so a crafted key can never smuggle SQL. Tests: models postgres test seeds an unregistered table with an api_password column and asserts discovery + redaction + the crafted-key 404; reshard handler test covers the global list; e2e models_explorer asserts goose_db_version + duckgres_reshard_operations are discovered and list with columns, and reshard_validation checks the global-list envelope.
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: needs review Warnings
|
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.
Two console improvements:
Reshards in the left nav
New
GET /api/v1/reshards(all orgs, newest first, limit param) + a Reshards page: every operation with org link, from→to, state badge, current step, runtime, and maintenance-mode duration — each row links to the live operation page (log, cancel). Starting a reshard stays on the org detail page; this is the fleet overview.Config Store page → real database explorer
The models API previously showed only a hand-curated registry of typed models — every new table (reshard ops, storage usage, spawn log, goose bookkeeping…) needed a registry edit to become visible. Now it auto-discovers every base table in the config schema + CP runtime schema from
information_schema, fresh per request (tables created by migrations/AutoMigrate after boot appear immediately). Unregistered tables surface under an Other group with columns in ordinal order; the existing UI groups dynamically, so they render with zero frontend changes.Safety kept intact:
json:"-"redaction (password hashes, ciphertexts) — unchanged.password|secret|ciphertext|token|nonce|credential) return[redacted].information_schemaread before any query — a crafted key 404s, never reaches SQL.Tests
models_api_test.go(postgres, CI): seeds an unregistered table with anapi_passwordcolumn → asserts sidebar discovery (probe +goose_db_version), value redaction, column headers, and the crafted-key 404.reshard_test.go: global list envelope.models_explorer_apiassertsgoose_db_version+duckgres_reshard_operationsare auto-discovered and list with real columns;reshard_validationchecks the global-list envelope.🤖 Generated with Claude Code