Tune/fix action cleanup tenant properties (#2782)

* actions.cleanup.onQuotaHit.percent -> action.cleanup.onQuotaHit.percent
* action.cleanup.enabled - removed - instead enabled / disable <=> expire < / >= 0
* action.cleanup.actionExpiry -> action.cleanup.auto.expiry and action.cleanup.auto.status - so both are under action.cleanup.auto, and differentiate from on quota hit
* auto db convert of props with one backward incompatibility - if you had action.cleanup.enabled=true and not set action.cleanup.actionExpiry (assuming default 30 days) - auto cleanup will be disabled
  you should set action.cleanup.auto.expiry=2592000000 in order to get the old behavior
* Note that if you have configured global action cleanup the properties are changed also this config you shall change manually

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-10-28 12:40:37 +02:00
committed by GitHub
parent f9ff15f671
commit 64bdced682
16 changed files with 99 additions and 143 deletions

View File

@@ -104,18 +104,18 @@ public class TenantConfigurationProperties {
* Repository on autoclose mode instead of canceling in case of new Distribution Set assignment over active actions.
*/
public static final String REPOSITORY_ACTIONS_AUTOCLOSE_ENABLED = "repository.actions.autoclose.enabled";
/**
* Switch to enable/disable automatic action cleanup.
*/
public static final String ACTION_CLEANUP_ENABLED = "action.cleanup.enabled";
/**
* Specifies the action expiry in milliseconds.
*/
public static final String ACTION_CLEANUP_ACTION_EXPIRY = "action.cleanup.actionExpiry";
public static final String ACTION_CLEANUP_AUTO_EXPIRY = "action.cleanup.auto.expiry";
/**
* Specifies the action status.
*/
public static final String ACTION_CLEANUP_ACTION_STATUS = "action.cleanup.actionStatus";
public static final String ACTION_CLEANUP_AUTO_STATUS = "action.cleanup.auto.status";
/**
* Configuration value for percentage of oldest actions to be cleaned if @maxActionsPerTarget quota is hit
*/
public static final String ACTION_PURGE_PERCENTAGE_ON_QUOTA_HIT = "action.cleanup.onQuotaHit.percent";
/**
* Switch to enable/disable the multi-assignment feature.
*/
@@ -133,11 +133,6 @@ public class TenantConfigurationProperties {
*/
public static final String IMPLICIT_LOCK_ENABLED = "implicit.lock.enabled";
/**
* Configuration value for percentage of oldest actions to be cleaned if @maxActionsPerTarget quota is hit
*/
public static final String ACTIONS_PURGE_PERCENTAGE_ON_QUOTA_HIT = "actions.cleanup.onQuotaHit.percent";
private static final Map<Class<? extends Serializable>, TenantConfigurationValidator> DEFAULT_TYPE_VALIDATORS = Map.of(
Boolean.class, new TenantConfigurationBooleanValidator(),
Integer.class, new TenantConfigurationIntegerValidator(),