Skip to main content

IssueCode

Enum IssueCode 

Source
#[non_exhaustive]
pub enum IssueCode {
Show 42 variants EmptyWorkflowId, NoTasks, MissingStepId, DuplicateStepId, EmptyGroup, GroupTooDeep, MissingFunction, InvalidFunctionName, InvalidTerminal, UnguardedValidation, InvalidHaltOn, GroupContinueOnError, InvalidMapping, NullMapping, LoopIncrementTooSmall, LoopBoundEmpty, LoopCounterInvalid, LoopSlotInvalid, LoopItemWithoutOver, LoopSlotCollision, LoopOverInvalid, InvalidForEach, UnknownFunction, InputParse, TemplateCompile, UnknownSecret, SecretInMessageWrite, DuplicateTemplateKey, EscapedTemplateKey, ParseFailed, MixedSpelling, ExtCollision, LikelyTypo, UnknownKey, V3Spelling, NullCondition, PayloadVar, OperatorInDocument, SecretInDocument, InvalidPath, UnresolvedReference, InvalidRollout,
}
Expand description

What an issue is about: v3’s codes, then v4’s.

#[non_exhaustive]: use Self::as_str to serialize.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

EmptyWorkflowId

id is missing or empty.

§

NoTasks

tasks is missing, not an array, or empty.

§

MissingStepId

A step carries no id.

§

DuplicateStepId

Two steps share an id. Groups share the task id namespace.

§

EmptyGroup

A group’s tasks is not a non-empty array.

§

GroupTooDeep

A group is nested at or beyond MAX_GROUP_DEPTH.

§

MissingFunction

A task carries no function.

§

InvalidFunctionName

function is not an object, or its name is missing or empty.

§

InvalidTerminal

terminal is present but not a boolean.

§

UnguardedValidation

A validation task whose failure cannot stop anything: it is not terminal, its on_rejection is continue, and every task after it in the workflow is unguarded. A failing rule returns 400, a rejection, so the pipeline proceeds as if it had passed.

Severity::Advisory — reported by the compat reader in def::parse and never a reason to refuse. Validating purely to record errors is a legitimate shape; this only says the assertion is not acting as a gate.

§

InvalidHaltOn

halt_on is present and is not one of the accepted strings, or is present on a group — a group has no outcome of its own, so the executor could not honour it.

§

GroupContinueOnError

A task group carries continue_on_error, which the engine drops. Error handling is per task and per workflow; a group only gates a span.

Severity::Advisory — reported by the compat reader in def::parse and never a reason to refuse. Unlike Self::InvalidHaltOn, which the parser refuses outright, this key is real at the other two levels and may already sit on a host’s group nodes; refusing it would abort every workflow in the build.

§

InvalidMapping

A map mapping breaks a rule between its keys: it has neither logic nor "unset": true, or both; it carries on_null or mode without logic; or it would remove or append to a context root (data, metadata, temp_data) by a literal path. Reported at the offending key, e.g. tasks[0].function.input.mappings[2].unset.

§

NullMapping

A map mapping whose logic always evaluates to null — "logic": null, or anything that folds to it — under the default on_null: "skip". A null result is skipped, so the mapping can never write anything; it usually stands where the author meant to clear the path, which is "unset": true.

Severity::Advisory — reported by the compat reader in def::parse and never a reason to refuse. The mapping is a no-op, not an error, and refusing it would fail every build that already carries one.

§

LoopIncrementTooSmall

loop.increment is below 1 — the counter would never reach max.

§

LoopBoundEmpty

loop.max is not greater than loop.init — no sweep could ever run.

§

LoopCounterInvalid

loop.counter is not a non-empty dotted path.

§

LoopSlotInvalid

loop.as or loop.scratch is not a non-empty dotted path.

§

LoopItemWithoutOver

loop.as names a slot for the current element, but there is no loop.over to take elements from.

§

LoopSlotCollision

Two of loop.counter, loop.as and loop.scratch name the same temp_data path, or one lies inside the other — a per-iteration reset of one would wipe the other. Reported at the later of the two fields.

§

LoopOverInvalid

loop.over can never yield an array: it is a scalar literal (a string, number, boolean or null), or loop.init is negative, which no array index can be. Reported at loop.over or loop.init respectively.

§

InvalidForEach

A task’s for_each breaks one of its rules — over a scalar literal, as not a slot path, max_concurrency of 0, collect without into or the reverse, a result path outside the context, a collect or into overlapping a binding — or sits on a built-in function, or on a task group. Reported at the offending key, e.g. tasks[0].for_each.max_concurrency, or at …for_each itself.

§

UnknownFunction

No handler will dispatch this function name, and it is not a built-in. Usually a typo or a handler the host forgot to register.

§

InputParse

A custom task’s input does not deserialize into its handler’s declared Input type.

§

TemplateCompile

A Template field of a custom task’s input does not compile.

§

UnknownSecret

An expression reads {"secret": "name"} and no secret of that name is in the ExprEngine’s store (ExprEngineBuilder::secrets). Only literal names are checked; a dynamic name fails at evaluation instead.

§

SecretInMessageWrite

An expression whose result the engine writes to the message or emits to a log reads a secret — a map mapping, or a log message or field. The store exists so a value is never recorded; an expression that would record it is refused outright, derived or not. Compute derived values in a custom handler.

§

DuplicateTemplateKey

Two keys in one template object collapse to the same name once the template-key escape is stripped — {"$a": 1, "a": 2} emits a twice. The context is a Vec of pairs, so both survive: a later read sees only the first while serialization emits both. Always a bug, so build refuses it.

§

EscapedTemplateKey

A template key carries the escape prefix, so it is emitted with one prefix stripped: $type emits type. Severity::Advisory — reported by Compiler::check and never a reason to refuse.

Exists for migration. The escape strips uniformly from every template key, so a workflow written before 3.9 that emits genuinely $-prefixed keys — MongoDB’s $set/$oid, JSON Schema’s $schema/$ref — changes what it produces, silently. This lists every one so the audit is mechanical rather than archaeological.

§

ParseFailed

A key holds a value of the wrong type, or a required key is missing. Reported at the key’s path, with a message naming what the key takes.

§

MixedSpelling

A v3 policy key (continue_on_error, halt_on) beside a v4 one (on_failure, on_rejection) on one node: the reader cannot tell which the author meant, so it refuses the v3 key. Write only the v4 keys.

§

ExtCollision

A key the reader or the walk keeps in a node’s ext under a name ext already holds: an authored ext entry, or an earlier key kept under the same name. Rename one of them.

§

LikelyTypo

An unknown key within edit distance 1 (keys of up to five characters) or 2 (longer) of a known key at its level: almost certainly a misspelling, so the setting it was meant to carry is silently lost.

Default severity Severity::Defect.

§

UnknownKey

An unknown key that resembles no known key at its level. It moves into ext under the compat reader and is refused without it.

Default severity Severity::Advisory.

§

V3Spelling

The compat reader rewrote a v3 spelling to its v4 counterpart.

Default severity Severity::Advisory.

§

NullCondition

A literal null condition. It is kept as the literal expression null, which is falsy, so the step never runs; omit the key for no condition, or write the expression that was meant.

Default severity Severity::Advisory.

§

PayloadVar

A literal var rooted at payload. The evaluation context is {data, metadata, temp_data}, so it resolves to nothing.

Default severity Severity::Defect.

§

OperatorInDocument

A single-key object inside an interpolated document whose key is a live operator name. A document is never evaluated, so it stays data.

Default severity Severity::Advisory.

§

SecretInDocument

A {"secret": ...} node inside an interpolated document. A document is never evaluated, so the secret would never be substituted.

Default severity Severity::Rejected.

§

InvalidPath

A literal context path that is not rooted at data, metadata or temp_data, or a document hole whose path is not a literal.

Default severity Severity::Rejected.

§

UnresolvedReference

A Reference field whose value is a literal string the host’s ResourceOracle does not resolve, such as a connector no deployment declares, or one of the wrong type; the message leads with the oracle’s reason when it gives one. A computed or absent value is not checked.

Default severity Severity::Defect: the workflow loads, then fails every call.

§

InvalidRollout

A workflow’s rollout range can never match: its bucket_end is below bucket_start, or above 100. Such a range serves no traffic, so the workflow silently never runs.

Default severity Severity::Defect: the definition loads, then the workflow is never selected.

Implementations§

Source§

impl IssueCode

Source

pub const ALL: &'static [Self]

Every code, in the table’s order: v3’s, then v4’s.

Source

pub fn as_str(self) -> &'static str

The stable string form, SCREAMING_SNAKE, v3’s spellings unchanged.

Source

pub fn severity(self) -> Severity

The default severity of an issue carrying this code. An issue may carry a different one (Issue::with_severity).

Trait Implementations§

Source§

impl Clone for IssueCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for IssueCode

Source§

impl Debug for IssueCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for IssueCode

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for IssueCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for IssueCode

Source§

impl FromStr for IssueCode

Source§

fn from_str(text: &str) -> Result<Self, Self::Err>

The inverse of IssueCode::as_str, for reading recordings.

Source§

type Err = ParseIssueCodeError

The associated error which can be returned from parsing.
Source§

impl Hash for IssueCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for IssueCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for IssueCode

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for IssueCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.