job_queue: drop the NodeKind::Dag/root filter from the QueueNodes lookup
This commit is contained in:
parent
10b0f640af
commit
309c1c91c6
4 changed files with 48 additions and 43 deletions
|
|
@ -214,13 +214,14 @@ pub enum HostRequest {
|
|||
/// `hivectl`'s wait/progress loop. A multi-step op is a single DAG
|
||||
/// (its whole graph in `nodes`). Result: [`HostResponse::dags`].
|
||||
QueueDag { id: u64 },
|
||||
/// Fetch one job-queue DAG's container node plus its live subtree, as
|
||||
/// generic `hive-jobq-wire` nodes — `hivectl`'s wait/progress loop.
|
||||
/// Sibling of [`Self::QueueDag`]: same DAG, same
|
||||
/// `id` (the container's own node id, what `queued_dags` already
|
||||
/// carries), through the generic projection instead of the typed
|
||||
/// `DagView`/`NodeView` (kept for `QueueDag`'s other consumer,
|
||||
/// `/api/state.rebuild_queue`). Result: [`HostResponse::nodes`].
|
||||
/// Fetch one job-queue node plus its live subtree, as generic
|
||||
/// `hive-jobq-wire` nodes — `hivectl`'s wait/progress loop. Sibling of
|
||||
/// [`Self::QueueDag`]: same graph, same `id`, through the generic
|
||||
/// projection instead of the typed `DagView`/`NodeView` (kept for
|
||||
/// `QueueDag`'s other consumer, `/api/state.rebuild_queue`). No
|
||||
/// assumption that `id` names a DAG container or root — whatever node
|
||||
/// has that id, the backend hands back its subtree as-is. Result:
|
||||
/// [`HostResponse::nodes`].
|
||||
QueueNodes { id: u64 },
|
||||
/// List pending approval requests.
|
||||
Pending,
|
||||
|
|
@ -547,13 +548,13 @@ pub struct HostResponse {
|
|||
/// been evicted from the queue's history tail.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub dags: Option<Vec<jobs::DagView>>,
|
||||
/// `QueueNodes` result — the requested DAG's container node plus its
|
||||
/// live subtree, as generic `hive-jobq-wire` nodes. `None` for every
|
||||
/// other request kind. An empty `Vec` means `id` names no live DAG in
|
||||
/// the graph (today: an unknown id — see `JobQueue::dag_nodes`'s doc
|
||||
/// comment for why a *completed* DAG's nodes don't vanish the same way
|
||||
/// `QueueDag`'s do); callers should read the root node's `state` for
|
||||
/// terminality, not emptiness.
|
||||
/// `QueueNodes` result — the requested node plus its live subtree, as
|
||||
/// generic `hive-jobq-wire` nodes. `None` for every other request kind.
|
||||
/// An empty `Vec` means `id` names no live node in the graph (today: an
|
||||
/// unknown id — see `JobQueue::node_subtree`'s doc comment for why a
|
||||
/// *completed* DAG's nodes don't vanish the same way `QueueDag`'s do);
|
||||
/// callers should read the root node's `state` for terminality, not
|
||||
/// emptiness.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub nodes: Option<Vec<hive_jobq_wire::GraphNode>>,
|
||||
/// Free-form operator-facing output lines the client prints verbatim
|
||||
|
|
@ -656,8 +657,8 @@ impl HostResponse {
|
|||
}
|
||||
}
|
||||
|
||||
/// `QueueNodes` result — the polled DAG's container + subtree, as
|
||||
/// generic wire nodes.
|
||||
/// `QueueNodes` result — the polled node + its subtree, as generic
|
||||
/// wire nodes.
|
||||
#[must_use]
|
||||
pub fn nodes(nodes: Vec<hive_jobq_wire::GraphNode>) -> Self {
|
||||
Self {
|
||||
|
|
|
|||
Loading…
Reference in a new issue