goharbor/harbor · error

is too large

Error message

%s is too large

What it means

Validation guard in the dayspl (last N days with pull) rule's Valid function: the 'n_days' parameter exceeds the hard-coded ceiling 20190904 (a sentinel-style max chosen to block absurd values). Any parsed n_days greater than that bound is rejected to keep retention windows sane.

Solutions

  1. Use an n_days value at or below 20190904 — in practice any realistic retention window (e.g. 30, 90, 365 days)
  2. Check the rule JSON for accidentally large or garbage numeric values
  3. Correct the parameter and resubmit the retention policy
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/pkg/retention/policy/rule/dayspl/evaluator.go:83 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/54bf89c20e921f86. Report an issue: GitHub.

Appendix: source

Thrown at src/pkg/retention/policy/rule/dayspl/evaluator.go:83

			}
		}
	}

	log.Warningf("default parameter %d used for rule %s", DefaultN, TemplateID)

	return &evaluator{n: DefaultN}
}

// Valid ...
func Valid(params rule.Parameters) error {
	if params != nil {
		if p, ok := params[ParameterN]; ok {
			if v, ok := utils.ParseJSONInt(p); ok {
				if v < 0 {
					return fmt.Errorf("%s is less than zero", ParameterN)
				}
				if v > 20190904 {
					return fmt.Errorf("%s is too large", ParameterN)
				}
			} else {
				return fmt.Errorf("%s type error", ParameterN)
			}
		}
	}
	return nil
}

View on GitHub (pinned to 7b2fd08cc5)