feat(database): surface standby topology in apply and list (Phase 3) - #569
Open
guptadev21 wants to merge 8 commits into
Open
feat(database): surface standby topology in apply and list (Phase 3)#569guptadev21 wants to merge 8 commits into
guptadev21 wants to merge 8 commits into
Conversation
* feat(database): add Database CLI commands and apply support (Phase 1) Adds the `rio database` command group and wires up the Database resource into the declarative apply/delete workflow: - `rio database list` — tabular listing with phase, device, version - `rio database inspect` — YAML/JSON output via the existing inspect helper - `rio database delete` — single, regex, or --all with parallel workers - `riocli/database/model.py` — Model subclass for `rio apply` and `rio delete` - `riocli/apply/manifests/database.yaml` — sample manifest for `rio explain database` - KIND_TO_CLASS entry so `rio apply` dispatches Database manifests correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(deps): pin rapyuta-io-sdk-v2 to feat/database branch Overrides the published SDK version with the feat/database git branch so the CLI picks up the new Database models and client methods while this phase is under review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: database phase 2
…on (#561) * chore(deps): pin rapyuta-io-sdk-v2 to feat/database-secrets-integration feat/database-secrets-integration's database/backup secret-reference work is already present on feat/database; only the SDK source pin was unique to this branch. * chore: update packages * fix(dependencies): update rapyuta-io-sdk-v2 source to use feat/database branch
- Sample manifest: fix the credentials block, which was keyed `credentials` with a nested `secretKeyRef` while the API field is `users` with the ref inline. PostgresSpec ignores unknown keys, so the block was silently dropped and the server rejected the apply. Drop the backup user too — it is generated server-side and any caller-supplied value is overwritten. - Sample manifest: document the optional `standby` block. - `rio database list`: add a Standby column reporting running/desired standby devices, "-" when the database has none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The cherry-picked standby work needs an SDK that models `spec.postgres.standby`; the pinned `feat/database` ref does not have it, and PostgresSpec ignores unknown keys, so the topology would be dropped silently and the Standby column would read "-" for every database. - pyproject: pin rapyuta-io-sdk-v2 at feat/managed-database-phase-3. Revert to @feat/database once rapyuta-io-sdk-v2#67 merges. - tests: `rio database list` renders the Standby column as running/desired, and a primary-only database reads "-" rather than "0/0". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBCzX6sbXL1Tt3zS8w4qb6
guptadev21
requested review from
ankitrgadiya and
sharmayajush
and removed request for
a team
August 17, 2026 06:13
|
🤖 Pull Request Artifacts (#32105231136) 🎉 |
The pg_hba trust network is settable now. Left commented with its default so a reader knows it exists without changing behaviour by uncommenting the block.
sreeraj22
force-pushed
the
feat/database
branch
from
August 25, 2026 14:43
6d70acf to
9f21500
Compare
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.
What
Brings
rioup to the managed-database Phase 3 surface (standby replicas), matchingrapyuta_io@feat/managed-database-phase-3.rio explain database) — documents the optionalstandbyblock (primaryInterface+devices[];primaryHostis server-resolved, do not set it).credentials:with a nestedsecretKeyRef, while the API field isusers:with the ref inline as{name, key}.PostgresSpecignores unknown keys, so the whole block was dropped silently and the server then rejected the apply with "database credentials are not specified". The backup user is dropped too — it is generated server-side and anything supplied is overwritten.rio database list— a Standby column reportingrunning/desiredstandby devices,-when the database has none.SDK pin
pyproject.tomlis pinned atrapyuta-io-sdk-v2@feat/managed-database-phase-3because@feat/databasehas nospec.postgres.standbyyet — without the bump the topology is silently dropped and the Standby column reads-for every database.Revert the pin to
@feat/databaseonce rapyuta-robotics/rapyuta-io-sdk-v2#67 merges.Tests
tests/unit/test_database_util.py—_standby_summaryacross no-standby / all-running / partially-running / no-status-reported.tests/unit/test_database_list.py—rio database listrenders the column asrunning/desired, and a primary-only database reads-rather than a misleading0/0.uv run ruff check .andruff format --checkclean;uv run pytest tests/unit/— 294 passed. Verified the sample manifest round-trips through the apply model withstandbyuncommented.Notes
riocli/jsonschema/schemas/has no database schema andModel.validate()is only called byriocli/device/model.py— v2 resources validate through the SDK pydantic model inDatabase.__init__.kind: Restore) is Phase 4 and is not in this PR.DELETE /v2/databases/{name}/?force=true(skip waiting for device ACKs) is a Phase-3 API addition left unexposed by decision —--forceonrio database deleteis the confirmation-skip flag and the name is taken.Adjacent issue, not fixed here
riocli/database/util.fetch_databasesuses the unpaginatedclient.list_databases().itemswhilebackup/util.pyuseswalk_pages, sorio database delete --allsilently misses databases past the first page.🤖 Generated with Claude Code
https://claude.ai/code/session_01NBCzX6sbXL1Tt3zS8w4qb6