Skip to content

Commit 13c9a5f

Browse files
committed
Add error documentation for job retention configuration
1 parent 07aeb61 commit 13c9a5f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/reference/modules/ROOT/pages/configuration-reference.adoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,37 @@ Configure job retention periods to control how long job data is kept. Job retent
496496

497497
For more information on cache retention, see the xref:guides:optimize:persist-data.adoc#custom-storage-usage[Persisting data overview] page.
498498

499+
[#retention-errors]
500+
==== Common errors
501+
502+
When configuring job retention, you may encounter the following validation errors:
503+
504+
* **Invalid time format**: The retention period must use the format `^([1-9]|[12][0-9]|30)d$` (1-30 days with "d" suffix). For example, use `"7d"` instead of `"12h"` or `"1w"`.
505+
506+
* **Incorrect data type**: The `retention` key expects a map with `caches` as a string value, not a direct string.
507+
508+
*Example:*
509+
510+
[source,yaml]
511+
----
512+
# ❌ Incorrect - direct string value
513+
jobs:
514+
say-hello:
515+
retention: "12h" # Error: expected type: String, found: Mapping
516+
517+
# ❌ Incorrect - invalid time format
518+
jobs:
519+
say-hello:
520+
retention:
521+
caches: "12h" # Error: does not match pattern ^([1-9]|[12][0-9]|30)d$
522+
523+
# ✅ Correct - proper format
524+
jobs:
525+
say-hello:
526+
retention:
527+
caches: "7d" # Valid: 7 days
528+
----
529+
499530
*Example:*
500531

501532
[source,yaml]

0 commit comments

Comments
 (0)