docs(mariadb): list the operator's Failed reason on the Complete condition

The reason list read as everything the operator writes on Complete,
yet mariadb-operator also sets Complete=False with reason Failed when
a run fails before or outside its Job. A reader taking the list as
exhaustive would treat Failed as an unknown reason, or make it
terminal, while the operator retries those failures. A table row pins
that the driver keeps waiting on it.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
This commit is contained in:
Alexey Artamonov committed 2026-11-08 20:18:29 +03:00
1 parent 69cea9ccbd
commit 5f0da5a09a
2 files changed
+5

No files matched your search

@@ -896,6 +896,7 @@ var mariadbCompleteOutcomeCases = []struct {
{name: "Complete=True with an unknown reason keeps waiting", status: metav1.ConditionTrue, reason: "SomethingElse", message: "Something"},
{name: "Complete=False/JobComplete keeps waiting", status: metav1.ConditionFalse, reason: mariadbtypes.ConditionReasonJobComplete, message: "Success"},
{name: "Complete=False/JobRunning keeps waiting", status: metav1.ConditionFalse, reason: mariadbtypes.ConditionReasonJobRunning, message: "Running"},
{name: "Complete=False/Failed keeps waiting", status: metav1.ConditionFalse, reason: "Failed", message: "Error creating Job"},
{name: "no Complete condition keeps waiting", noCondition: true},
{name: "no Complete condition past the deadline fails", noCondition: true, expired: true, wantFailed: true,
wantMessage: []string{"no Complete condition observed"}},
@@ -37,6 +37,10 @@ const (
// JobFailed -> Status=True (terminal failure of the backing Job).
// JobRunning -> Status=False (still in progress).
// JobSuspended -> Status=False (admin-suspended via spec).
// The operator also writes reason Failed with Status=False and its own
// message ("Error creating Job", "Backup not complete") when a run fails
// outside its Job. It retries those, so the driver keeps waiting on
// Failed until its deadline rather than failing the run at once.
ConditionReasonJobComplete = "JobComplete"
ConditionReasonJobFailed = "JobFailed"
ConditionReasonJobRunning = "JobRunning"