docs: fix quickstart CLI drift, add smoke test for documented journey - #1007
docs: fix quickstart CLI drift, add smoke test for documented journey#1007swsarancodes wants to merge 3 commits into
Conversation
The database quickstart documented CLI behavior that no longer exists: a --lang flag on helix init, a "local" instance name (the CLI creates "dev"), a generated queries.rs file, and a helix dashboard command that was never implemented. The docs check only validates syntax and metadata, so none of this was caught. Rewrite the quickstart around the real helix init -> helix start -> helix query -> helix stop journey using the actual dev instance and examples/request.json naming, and link to SDK setup instead of claiming helix init scaffolds language projects. Add crates/cli/tests/docs_smoke.rs, an integration test that runs the exact documented commands and JSON request against an isolated fixture with a real Docker-backed instance, and wire it into a new docs-smoke job in cli-tests.yml so drift between the docs and the CLI fails CI going forward.
helix start pulls ghcr.io/helixdb/helixdb:v0.0.4 by tag with no --platform override, matching what a reader following the quickstart does. Run the smoke test on the same architecture as that default resolution instead of the arm64 runner, per review feedback.
|
fixed it |
xav-db
left a comment
There was a problem hiding this comment.
Two inline findings from the exact-head review.
|
|
||
| - Docker or Podman | ||
| - Rust, Node.js 20+, Go, Python 3.11+, or the `helix` CLI for raw JSON | ||
| - The `helix` CLI |
There was a problem hiding this comment.
[P1] Podman-only users cannot complete this quickstart as written. helix init local always writes container_runtime = "docker", so helix start dev fails unless they make an undocumented helix.toml edit. Either require Docker here, document the Podman setting, or make init select the available runtime.
| /// Mirrors docs/database/helix-db/start-here/quickstart.mdx's write-users example | ||
| /// exactly (`examples/write-users.json` step). If the documented request shape or | ||
| /// its expected response changes, update both the doc and this constant together. | ||
| const WRITE_USERS_REQUEST: &str = r#"{ |
There was a problem hiding this comment.
[P2] This constant is independent of the MDX, so a doc-only edit can break the fenced JSON while CI keeps testing this old copy and passes. The test also overrides the documented init defaults and checks only response substrings. Please parse the documented request and expected response or share one fixture, and validate bare helix init local defaults before changing the port for test isolation.
1 similar comment
|
ok it wad night here ill looki into it and fix it |
The database quickstart documented CLI behavior that no longer exists: a --lang flag on helix init, a "local" instance name (the CLI creates "dev"), a generated queries.rs file, and a helix dashboard command that was never implemented. The docs check only validates syntax and metadata, so none of this was caught.
Rewrite the quickstart around the real helix init -> helix start -> helix query -> helix stop journey using the actual dev instance and examples/request.json naming, and link to SDK setup instead of claiming helix init scaffolds language projects.
Add crates/cli/tests/docs_smoke.rs, an integration test that runs the exact documented commands and JSON request against an isolated fixture with a real Docker-backed instance, and wire it into a new docs-smoke job in cli-tests.yml so drift between the docs and the CLI fails CI going forward.
Greptile Summary
The PR updates the database quickstart to match the current CLI and adds a Docker-backed integration test and CI job intended to keep that journey synchronized.
init → start → query → stopCLI flow.Important Files Changed
Sequence Diagram
Reviews (1): Last reviewed commit: "docs: fix quickstart CLI drift, add smok..." | Re-trigger Greptile
Context used: