chore: drop stale dead_code allows + the unused operator_questions get method
This commit is contained in:
parent
43776afbfd
commit
2a840c14a2
2 changed files with 0 additions and 20 deletions
|
|
@ -30,7 +30,6 @@ const GIT_EMAIL: &str = "c0re@hyperhive.local";
|
||||||
static META_LOCK: Mutex<()> = Mutex::const_new(());
|
static META_LOCK: Mutex<()> = Mutex::const_new(());
|
||||||
|
|
||||||
/// Where the manager sees this directory inside its container (RO bind).
|
/// Where the manager sees this directory inside its container (RO bind).
|
||||||
#[allow(dead_code)] // wired up by set_nspawn_flags in a follow-up commit
|
|
||||||
pub const CONTAINER_MANAGER_META_MOUNT: &str = "/meta";
|
pub const CONTAINER_MANAGER_META_MOUNT: &str = "/meta";
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
@ -50,7 +49,6 @@ pub fn meta_dir() -> PathBuf {
|
||||||
/// seed commit. Subsequent calls only touch `flake.nix` when the
|
/// seed commit. Subsequent calls only touch `flake.nix` when the
|
||||||
/// rendered contents differ from disk; an unchanged `flake.nix` is a
|
/// rendered contents differ from disk; an unchanged `flake.nix` is a
|
||||||
/// no-op.
|
/// no-op.
|
||||||
#[allow(dead_code, clippy::implicit_hasher)] // first caller lands in a later commit
|
|
||||||
pub async fn sync_agents(hive: &HiveEnv, agents: &[AgentSpec]) -> Result<()> {
|
pub async fn sync_agents(hive: &HiveEnv, agents: &[AgentSpec]) -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
@ -215,7 +213,6 @@ pub async fn sync_agents(hive: &HiveEnv, agents: &[AgentSpec]) -> Result<()> {
|
||||||
/// the index. Doesn't commit — `finalize_deploy` commits on build
|
/// the index. Doesn't commit — `finalize_deploy` commits on build
|
||||||
/// success, `abort_deploy` drops the staged change on failure so
|
/// success, `abort_deploy` drops the staged change on failure so
|
||||||
/// meta history only carries successful deploys.
|
/// meta history only carries successful deploys.
|
||||||
#[allow(dead_code)] // wired up by actions::run_apply_commit in a later commit
|
|
||||||
pub async fn prepare_deploy(name: &str) -> Result<()> {
|
pub async fn prepare_deploy(name: &str) -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
@ -230,7 +227,6 @@ pub async fn prepare_deploy(name: &str) -> Result<()> {
|
||||||
/// Phase 2-success. Commit the staged lock with the deployed tag +
|
/// Phase 2-success. Commit the staged lock with the deployed tag +
|
||||||
/// sha as the message. No-op when the rev was already at the right
|
/// sha as the message. No-op when the rev was already at the right
|
||||||
/// place (nothing staged → nothing to commit).
|
/// place (nothing staged → nothing to commit).
|
||||||
#[allow(dead_code)]
|
|
||||||
pub async fn finalize_deploy(name: &str, sha: &str, tag: &str) -> Result<()> {
|
pub async fn finalize_deploy(name: &str, sha: &str, tag: &str) -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
@ -244,7 +240,6 @@ pub async fn finalize_deploy(name: &str, sha: &str, tag: &str) -> Result<()> {
|
||||||
/// Phase 2-failure. Unstage + restore the lock so meta returns to
|
/// Phase 2-failure. Unstage + restore the lock so meta returns to
|
||||||
/// the previously-committed shas. The failed proposal is still
|
/// the previously-committed shas. The failed proposal is still
|
||||||
/// captured in `applied/<n>`'s annotated `failed/<id>` tag.
|
/// captured in `applied/<n>`'s annotated `failed/<id>` tag.
|
||||||
#[allow(dead_code)]
|
|
||||||
pub async fn abort_deploy() -> Result<()> {
|
pub async fn abort_deploy() -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
@ -271,7 +266,6 @@ async fn has_staged_changes(dir: &Path) -> Result<bool> {
|
||||||
/// agent's input and commit the lock change if any. Single-phase
|
/// agent's input and commit the lock change if any. Single-phase
|
||||||
/// (no separate finalize) because rebuild has no failure-revert
|
/// (no separate finalize) because rebuild has no failure-revert
|
||||||
/// semantics — it always wants the latest main.
|
/// semantics — it always wants the latest main.
|
||||||
#[allow(dead_code)] // wired up by lifecycle::rebuild in this commit
|
|
||||||
pub async fn lock_update_for_rebuild(name: &str) -> Result<()> {
|
pub async fn lock_update_for_rebuild(name: &str) -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
@ -319,7 +313,6 @@ pub async fn lock_update(inputs: &[String]) -> Result<()> {
|
||||||
/// One-shot used by the auto-update path: pin the latest hyperhive
|
/// One-shot used by the auto-update path: pin the latest hyperhive
|
||||||
/// rev, commit if the lock changed. Cheaper than `sync_agents`
|
/// rev, commit if the lock changed. Cheaper than `sync_agents`
|
||||||
/// because the per-agent inputs aren't touched.
|
/// because the per-agent inputs aren't touched.
|
||||||
#[allow(dead_code)]
|
|
||||||
pub async fn lock_update_hyperhive() -> Result<()> {
|
pub async fn lock_update_hyperhive() -> Result<()> {
|
||||||
let _guard = META_LOCK.lock().await;
|
let _guard = META_LOCK.lock().await;
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
|
|
|
||||||
|
|
@ -238,19 +238,6 @@ impl OperatorQuestions {
|
||||||
Ok((question, asker, target))
|
Ok((question, asker, target))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn get(&self, id: i64) -> Result<Option<OpQuestion>> {
|
|
||||||
let conn = self.conn.lock().unwrap();
|
|
||||||
conn.query_row(
|
|
||||||
"SELECT id, asker, question, options_json, multi, asked_at, answered_at, answer, deadline_at, target
|
|
||||||
FROM operator_questions WHERE id = ?1",
|
|
||||||
params![id],
|
|
||||||
row_to_question,
|
|
||||||
)
|
|
||||||
.optional()
|
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Every pending question, operator-targeted or peer-to-peer.
|
/// Every pending question, operator-targeted or peer-to-peer.
|
||||||
/// Drives the dashboard's questions pane now that peer threads
|
/// Drives the dashboard's questions pane now that peer threads
|
||||||
/// are surfaced for visibility + operator override-answer.
|
/// are surfaced for visibility + operator override-answer.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue