Skip to content

[Admin API] Prevent setting an invalid Retention Policy #8346

Description

@lhotari

Problem
Currently if one sets in the retention policy --time to some value and sets --size to 0, this will lead to the situation where there is no retention. Such retention policy should be rejected since the time setting will have no meaning when size is 0. (the same applies the other way around, setting time to 0 and size to some value)

Describe the solution you'd like
An retention policy where either time or size is non-zero and other is zero should be rejected in validation. This would be useful to prevent users creating invalid retention policies.

Additional context
#8345

Metadata

Metadata

Assignees

No one assigned

    Labels

    docYour PR contains doc changes, no matter whether the changes are in markdown or code files.type/enhancementThe enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions