pub enum AdapterError {
Command {
command: String,
code: Option<i32>,
stderr: String,
},
Io {
command: String,
source: String,
},
Filesystem {
path: String,
source: String,
},
Unsupported {
adapter: Adapter,
operation: &'static str,
},
IndexTimeout {
package: String,
version: String,
waited_secs: u64,
},
RegistryUnavailable {
package: String,
version: String,
source: String,
},
PublishNotVisible {
package: String,
version: String,
waited_secs: u64,
},
UnsupportedRegistry {
adapter: Adapter,
registry: Registry,
},
}Expand description
Why an adapter step failed. Distinct from a verify discrepancy, which is a
successful read modelled by VerifyOutcome rather than an error.
Variants§
Command
A command exited non-zero (or was signalled). Carries the rendered
command, its exit code (None on signal), and captured stderr.
Fields
Io
A command could not be spawned at all (the port returned an I/O error).
Fields
Filesystem
A local filesystem write an adapter performs between commands failed —
distinct from Self::Io (a process that could not be spawned). The
homebrew first-formula create writes the generated
.rb into the tap checkout between the clone and the commit; a failure
there is this.
Fields
Unsupported
The adapter has no real implementation of this operation from this host (e.g. a CI-only trusted-publisher publish). Named so the coordinator can surface a precise, honest message rather than a fabricated receipt.
Fields
IndexTimeout
A just-published artifact did not become visible on its registry index
within the wait ceiling, so a dependent artifact could not be published
safely. Distinct from Self::Command: the publish itself succeeded —
only the between-publishes index-wait timed out (the multi-crate cargo
workspace path, where a dependent crate must not publish until its
workspace dependency is index-visible; see cargo).
Fields
The registry could not be reached to determine a crate’s published state,
so the publish path cannot make a safe decision and fails closed rather
than guess. Raised in two places (see cargo): the pre-publish
idempotency probe (cannot prove the crate has not already landed, so a
duplicate irreversible upload is refused), and the dependency index-wait
(every poll for a workspace dependency failed, so its visibility is unknown
— surfaced honestly instead of a misleading Self::IndexTimeout). Mirrors
the reconcile layer’s outage ⇒ VerifyOutcome::Unknown discipline: an
unknown remote state is never read as “safe to (re)publish”.
PublishNotVisible
A target’s own cargo publish exited successfully, but the published
{package}@{version} was not confirmable on the registry index within
the wait ceiling — the registry answered but never showed the version. The
upload may have landed (a slow index) or may have shipped nothing (a silent
no-op: a registry-alias/credential/env difference, or an under-declared
target). Either way the cut fails closed here rather than journal a
PublishReceipt for a publish it cannot confirm (the
cut-noop-self-visibility-check / issuectl 0.8.1 signature) — the operator
resumes/verifies once the index catches up, or investigates a genuine no-op.
Distinct from Self::IndexTimeout (a dependency a dependent was waiting
on) and from Self::RegistryUnavailable (the registry was never reachable —
an outage): this is the self-visibility confirm of the crate the adapter
just published, the registry reachable but the version observed absent.
Fields
UnsupportedRegistry
An adapter was handed a target whose declared registry
it does not support, so it refuses the target before any external action
rather than risk publishing to an unexpected destination. Raised by the
cargo adapter for any rust target whose registry is not
Registry::CratesIo (the only rust registry ossctl supports today): cargo
honors ambient registry config, so an unpinned publish could land on the
wrong registry while the engine probes crates.io and records a crates.io
receipt. A typed error keeps this a fail-fast misconfiguration, distinct from
a command failure (Self::Command).
Trait Implementations§
Source§impl Debug for AdapterError
impl Debug for AdapterError
Source§impl Display for AdapterError
impl Display for AdapterError
Source§impl Error for AdapterError
impl Error for AdapterError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()