feat(update-check): add dunite-update-check leaf crate #38
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/DEV-530-update-check-crate"
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?
What
Adds the
dunite-update-checkleaf crate (DEV-530, under BUNYIP-340) - the self-hosted update checker extracted from bunyip-api'sversion.rs, made config-driven with no product identity.UpdateChecker::new(url, token, current, user_agent)polls a Forgejo/Giteareleases/latest, readstag_name, semver-compares it againstcurrent, and TTL-caches the result (1h on success, 60s on error).UpdateStatusserializes the operator-facing result. The running version, endpoint, token, andUser-Agentare all caller-supplied. It only reports; applying an update stays a deliberate operator action.The image-upload hardening (the other half of DEV-530's spec) already shipped as
dunite-image-upload(DEV-531), so this issue's remaining scope is the update-checker.Deps
No new workspace deps:
reqwest/serde/serde_json/chronowere already present. The cache usesstd::sync::RwLock(noparking_lot).Validation
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test -p dunite-update-checkgreen in the pinned rust-builder image (semver parsing, newer-detection,tag_nameextraction).Consumer follow-up (bunyip, after merge)
bunyip keeps
current_version()(itsCARGO_PKG_VERSION) andgit_revision()(BUNYIP_GIT_SHA);version.rsre-exportsUpdateChecker/UpdateStatusfrom the crate, and the construction site passescurrent_version().to_string()plus the bunyipUser-Agent. Leaf crate, so bunyip'sdunite-corerev does not move.#DEV-530