Documentation
¶
Overview ¶
Package failure explains why a finding stopped: which stage failed (the repository gate, the investigation, the remediation or the pull request's review), which run and attempt, the outcome code and the message.
The Finding carries the pieces but not the answer. status.lastFailureReason is a single "outcome: message" string with several writers, and none of the transitions that do not fail clears it, so on its own it can name an earlier attempt's failure. Describe reads the phase log to find the edge that ended the finding and reports a failure only when that edge was one, so the status page and the tracking issue never show a stale reason as the current one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failure ¶
type Failure struct {
Stage Stage
// Run names the Investigation or Remediation child that failed; empty for
// the repository and review stages.
Run string
// Attempt is the failed run's attempt ordinal; zero when there is no run.
Attempt int32
// Outcome is the run's outcome code (the envelope vocabulary, such as
// commit_failed or timeout); empty when the failure has none.
Outcome string
// Message is the detail, without the outcome prefix.
Message string
}
Failure is why a finding stopped.
type Stage ¶
type Stage string
Stage names the part of the pipeline that failed.
const ( // StageRepository: the gate could not resolve a repository to work on // and handed the finding to humans. StageRepository Stage = "repository" // StageInvestigation: the investigation ran out of attempts, or failed in // a way another attempt cannot fix. StageInvestigation Stage = "investigation" // StageRemediation: the remediation ran out of attempts, or failed in a // way another attempt cannot fix. StageRemediation Stage = "remediation" // StageReview: the remediation's pull request was closed without being // merged. StageReview Stage = "review" )
The stages a finding can stop in.