GRI-2187: grimoirix-server crate and server skeleton #2
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoirix-backend-libs!2
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2187-grimoirix-server-skeleton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v0.1 scope, per the issue's "Done when" list.
Included
crates/grimoirix-server/: a small lib crate with one helper per issue item —config— figment loader: built-in defaults → optional TOML file →<caller-chosen-prefix>-scoped env vars (__-nested). The prefix is a function parameter, never hard-coded, per GRI-1884.telemetry—tracing-subscriberinit, text or JSON,RUST_LOGoverriding the configured level.shutdown— a future resolving on SIGTERM/SIGINT (Ctrl-C on non-unix), foraxum::serve(..).with_graceful_shutdown(..).health—/healthz(always ok) and/readyz(a caller-supplied async readiness check, 200/503 + JSON body).security_headers— atower::Layersetting CSP (configurable, restrictive default), HSTS, X-Content-Type-Options, Referrer-Policy, X-Frame-Options.error—ApiError(thiserror) →(StatusCode, JSON {"error": ...}), withInternal's cause logged viatracingand never shown to the client.template/: a minimal binary depending on the crate (path dep inside this workspace; a real new project depends on the published version instead), with its ownAppConfigextendingCommonConfigvia#[serde(flatten)], a sampleconfig.sample.toml, and aContainerfile.scripts/local-gates.sh: fmt, clippy -D warnings, test (incl. doc tests),cargo deny check— the only gates this repo needs (no database, no front end)..github/workflows/ci.yml: the same gates as separate jobs..githooks/pre-push+scripts/install-git-hooks.sh: the house branch-naming/protected-branch hook, trimmed of the GitHub-mirror exception (not applicable here)..repo-boundary,deny.toml(licenses allow-list incl.AGPL-3.0-onlyfor this workspace's own crates),.cargo/config.toml(thegrimoirixregistry alias),LICENSE.md.README.md: what's in the repo, how to start a new project fromtemplate/, how to depend on the published crate, and the release steps.Deliberately excluded (per the issue)
Database, auth/sessions, mail, object store — product-specific, added per-project until a second product needs the same one. Moving helpdesk or signage onto this crate is a separate, later decision.
Verified locally
./scripts/local-gates.sh— all five gates pass (fmt clean, clippy clean with-D warnings, 21/21 tests + 0 doc tests,cargo deny check: advisories/bans/licenses/sources all ok).Outstanding
cargo publishto the forge's Cargo registry has not been run. The forge token available in this environment has scopeswrite:issue,write:repository,read:user— notwrite:package. Publishinggrimoirix-server 0.1.0needs a token with that scope; README.md documents the exact command. This is a credential/governance step, not an implementation gap.Once published,
grimoirix-www(GRI-2176 M1) can take a dependency on it.