feat: add local-db manifest URL command#2553
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a ManifestUrls CLI command that parses local-DB remotes settings and prints each resolved manifest URL line-by-line, enhances YAML parsing to error on duplicate remote URLs, and wires the command into the local-db CLI dispatcher. ChangesManifestUrls CLI Command with URL Validation
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9b33a3c to
6ffe9ad
Compare
How to use the Graphite Merge QueueAdd the label Raindex-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
6ffe9ad to
3f8691a
Compare
Merge activity
|
## Chained PRs - #2526 ## Motivation `rain.local-db.remote` currently fetches a settings YAML file and parses `local-db-remotes` in shell to discover manifest URLs. That duplicates settings parsing logic outside Rust and can drift from the CLI/parser behavior. ## Solution Add a `local-db manifest-urls` CLI command that prints local DB remote manifest URLs from settings YAML: ```sh raindex_cli local-db manifest-urls --settings-yaml "$settings_yaml" ``` - Parse settings through `RaindexYaml`, so normal settings requirements such as `version` and `local-db-remotes` validation apply. - Print only manifest URLs to stdout, one URL per line, sorted by remote key for deterministic script output. - Keep diagnostics/errors on stderr through the existing CLI error path. - Reject duplicate `local-db-remotes` URL values in the core settings parser, so all settings consumers share the same uniqueness rule. - Add focused parser and CLI tests for single URL output, duplicate URL rejection, no-remotes output, missing version failure, and exact stdout formatting. ## Checks By submitting this for review, I'm confirming I've done the following: - [x] made this PR as small as possible - [x] unit-tested any new functionality - [ ] linked any relevant issues or PRs - [ ] included screenshots (if this involves a front-end change) Verified locally: - `nix develop -c cargo fmt --all` - `nix develop -c cargo test -p raindex_app_settings local_db_remotes` - `nix develop -c cargo test -p raindex_cli manifest_urls` - `nix develop -c cargo test -p raindex_cli verify_cli` - `nix develop -c rainix-rs-static` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added `manifest-urls` CLI subcommand to list manifest URLs from local-DB remotes configuration. * Improved validation to detect duplicate URLs in remotes settings with detailed error reporting. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/rainlanguage/raindex/pull/2553?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
3f8691a to
7e32a38
Compare
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
|
Tip For best results, initiate chat on the files or code changes. SIZE=M |
…esting (#5) ## Depends on - rainlanguage/raindex#2553 must be merged first. This PR pins `lib/raindex` to commit `9b33a3c4eca44726b4602f1a2d4046982584ef93` from that PR and uses its `local-db manifest-urls` command. ## Motivation The local DB remote deployment should no longer depend on legacy SSH recipients that are not intended to have access in this repo. This PR updates the provisioning/deployment access model to use the new `github_do` key, keeps `arda` as the only additional recipient, and makes the manual GitHub workflows testable from a non-`main` branch so provisioning and deploy can be exercised before merge. ## Solution - change the Terraform SSH key lookup to use `github_do` - update the encrypted-recipient config in `keys.nix` so only `github_do` and `arda` retain access - remove the old `st0x-op`, `sid`, and `ci` recipients from the repo config - update `Provision Host` to accept `target_ref` and `allow_non_main`, check out the selected ref, and persist Terraform state back to that same ref - update `Deploy` to accept `target_ref` and `allow_non_main` so the branch version of the workflow can be exercised against the real host before merge - keep the default production path unchanged by defaulting both workflows to `target_ref=main` and `allow_non_main=false` ## Checks By submitting this for review, I am confirming I have done the following: - [x] made this PR as small as possible - [ ] unit-tested any new functionality - [x] linked any relevant issues or PRs - [ ] included screenshots (if this involves a front-end change) Validated locally with: - not run yet; workflow changes have been reviewed but not exercised through GitHub Actions from this branch <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Deployment and provisioning workflows now let you choose a target Git ref, include a validation toggle for non-main refs, and show the selected target in summaries. Workflows decrypt and load runtime config at runtime for deployment and storage operations; state persistence follows the chosen target. * Infrastructure defaults updated: new default SSH key, larger VM size, and simplified role assignments for SSH/infra credentials. * **Documentation** * Added example runtime env and terraform vars entries documenting optional overrides. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Chained PRs
Motivation
rain.local-db.remotecurrently fetches a settings YAML file and parseslocal-db-remotesin shell to discover manifest URLs. That duplicates settings parsing logic outside Rust and can drift from the CLI/parser behavior.Solution
Add a
local-db manifest-urlsCLI command that prints local DB remote manifest URLs from settings YAML:raindex_cli local-db manifest-urls --settings-yaml "$settings_yaml"RaindexYaml, so normal settings requirements such asversionandlocal-db-remotesvalidation apply.local-db-remotesURL values in the core settings parser, so all settings consumers share the same uniqueness rule.Checks
By submitting this for review, I'm confirming I've done the following:
Verified locally:
nix develop -c cargo fmt --allnix develop -c cargo test -p raindex_app_settings local_db_remotesnix develop -c cargo test -p raindex_cli manifest_urlsnix develop -c cargo test -p raindex_cli verify_clinix develop -c rainix-rs-staticSummary by CodeRabbit
New Features
Improvements
Tests