fix: finish worker wording cleanup

This commit is contained in:
2026-06-29 04:54:33 +09:00
parent 17a9488a4a
commit c46e880b50
3 changed files with 14 additions and 14 deletions
@@ -1,4 +1,4 @@
//! Error type for mutating pod-worker allocation operations.
//! Error type for mutating Worker allocation operations.
use std::io;
use std::path::PathBuf;
@@ -6,14 +6,14 @@ use std::path::PathBuf;
use manifest::{ScopeError, ScopeRule};
use session_store::SegmentId;
/// Errors raised by the mutating pod-worker allocation operations.
/// Errors raised by the mutating Worker allocation operations.
#[derive(Debug, thiserror::Error)]
pub enum ScopeLockError {
#[error("I/O error on workers.json: {0}")]
Io(#[from] io::Error),
#[error("pod name `{0}` is already registered")]
#[error("worker `{0}` is already allocated")]
DuplicateWorkerName(String),
#[error("requested scope `{}` conflicts with pod `{competitor}` rule `{}`", .rule.target.display(), .competitor_rule.target.display())]
#[error("requested scope `{}` conflicts with worker allocation `{competitor}` rule `{}`", .rule.target.display(), .competitor_rule.target.display())]
WriteConflict {
competitor: String,
rule: ScopeRule,
@@ -26,10 +26,10 @@ pub enum ScopeLockError {
NotSubset { spawner: String, rule: ScopeRule },
#[error("invalid delegation scope: {source}")]
InvalidScope { source: ScopeError },
#[error("pod `{0}` is not registered")]
#[error("worker `{0}` is not allocated")]
UnknownWorker(String),
#[error(
"session {segment_id} is already held by pod `{worker_name}` at {}",
"session {segment_id} is already allocated to worker `{worker_name}` at {}",
.socket.display()
)]
SegmentConflict {
+2 -2
View File
@@ -239,7 +239,7 @@ async fn run_delete(
let Some(metadata) = metadata else {
return Ok(WorkerCleanupCliOutput {
stdout: format!(
"yoi worker delete\nstatus: refused\npod: {}\nreason: worker metadata is missing\n",
"yoi worker delete\nstatus: refused\nworker: {}\nreason: worker metadata is missing\n",
options.name
),
status: WorkerCleanupCliStatus::Failure,
@@ -250,7 +250,7 @@ async fn run_delete(
if let Some(reason) = probe.refusal_reason() {
return Ok(WorkerCleanupCliOutput {
stdout: format!(
"yoi worker delete\nstatus: refused\npod: {}\nreason: {}\nsocket: {}\n",
"yoi worker delete\nstatus: refused\nworker: {}\nreason: {}\nsocket: {}\n",
options.name,
reason,
probe.socket_path.display()