Documentation
¶
Overview ¶
Package helm holds tool-layer CompositeError parsers for helm jobs. They register at errparse.LayerTool so a provider-specific cause (e.g. an AWS IAM denial parsed at LayerProvider) still wins, but any recognised helm failure yields a clean, structured error instead of falling through to the raw generic dump.
The runner drives helm through the Go SDK (helm.sh/helm/v4 pkg/action), not the CLI, so the familiar "INSTALLATION FAILED"/"UPGRADE FAILED" phase prefixes never appear, since those are added only by helm's cmd layer. What is reliably present is the runner's own wrapper around the SDK error ("unable to upgrade helm release: <sdk error>", "unable to execute with dry-run: <sdk error>"). The parser leads the headline at the SDK error by stripping that wrapper, and falls back to a set of verified helm v4 SDK cause strings when the wrapper is absent from the captured output.
The anchored cause is then classified into a specific helm failure type (helm.immutable_field, helm.ownership_conflict, ...) which carries a distinct discriminator (for UI badging and the parse-coverage metric) and retry hints (deterministic config errors set skip_auto_retry so the orchestrator parks the step for manual retry instead of burning attempts). An unclassified helm failure still yields the generic helm.error so it beats the raw dump.
Index ¶
Constants ¶
const ( // HelmErrorType is the fallback discriminator for a helm failure that no // specific classifier recognised. HelmErrorType compositeerrors.Type = "helm.error" // HelmImmutableFieldType is a rejected patch to an immutable/forbidden field // (e.g. a StatefulSet selector), which a blind retry can never fix. HelmImmutableFieldType compositeerrors.Type = "helm.immutable_field" // HelmOwnershipConflictType is a resource that already exists and is not // owned by this release, so it cannot be adopted. HelmOwnershipConflictType compositeerrors.Type = "helm.ownership_conflict" // HelmNameInUseType is a release name still held by another (often stuck) // release. HelmNameInUseType compositeerrors.Type = "helm.name_in_use" // HelmNoDeployedReleaseType is an upgrade with no prior deployed release. HelmNoDeployedReleaseType compositeerrors.Type = "helm.no_deployed_release" // HelmHookFailedType is a lifecycle hook (pre/post install/upgrade) that // failed; this can be transient so it stays auto-retryable. HelmHookFailedType compositeerrors.Type = "helm.hook_failed" // HelmWaitTimeoutType is a --wait timeout on resources becoming ready; often // transient (image pull, scheduling) so it stays auto-retryable. HelmWaitTimeoutType compositeerrors.Type = "helm.wait_timeout" // HelmRenderErrorType is a chart render / manifest build failure (template // execution, YAML, unknown kind), a deterministic config error. HelmRenderErrorType compositeerrors.Type = "helm.render_error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HelmError ¶
type HelmError struct {
Reason string `json:"reason,omitempty"`
Summary string `json:"summary"`
Output string `json:"output,omitempty"`
// contains filtered or unexported fields
}
HelmError is the tool-layer payload: the classified helm failure. Summary is the SDK error with the runner's wrapper stripped; Reason is the specific failure class (empty for the generic fallback); Output is the cleaned context.
func (*HelmError) Hints ¶ added in v0.19.1050
func (e *HelmError) Hints() compositeerrors.Hints
func (*HelmError) Sections ¶
func (e *HelmError) Sections() []compositeerrors.Section
func (*HelmError) Severity ¶
func (e *HelmError) Severity() compositeerrors.Severity
func (*HelmError) Type ¶
func (e *HelmError) Type() compositeerrors.Type