fix: resolve CI failures — RetentionService bean, frontend types, artifact upload
CI — Build, Lint & Security Scan / backend (push) Failing after 1m24s
CI — Build, Lint & Security Scan / frontend (push) Failing after 48s
CI — Build, Lint & Security Scan / image-scan (push) Has been skipped
CI — Build, Lint & Security Scan / secrets-scan (push) Failing after 27s
Deploy to TrueNAS / deploy (push) Successful in 3m0s

- Remove @ConditionalOnProperty from RetentionService class; guard only @Scheduled method
- Fix QuotaStatus property references in frontend tests
- Downgrade upload-artifact to v3 for Gitea compatibility
This commit is contained in:
Patrick Plate
2026-06-19 16:23:18 +02:00
parent 51a9d1db58
commit 53931d9d2b
5 changed files with 17 additions and 11 deletions
@@ -9,7 +9,7 @@ import de.cannamanage.service.repository.DistributionRepository;
import de.cannamanage.service.repository.MemberRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -29,9 +29,11 @@ import java.util.*;
@Slf4j
@Service
@RequiredArgsConstructor
@ConditionalOnProperty(name = "cannamanage.schedulers.enabled", havingValue = "true", matchIfMissing = false)
public class RetentionService {
@Value("${cannamanage.schedulers.enabled:false}")
private boolean schedulersEnabled;
private final ClubRepository clubRepository;
private final MemberRepository memberRepository;
private final DistributionRepository distributionRepository;
@@ -39,11 +41,15 @@ public class RetentionService {
/**
* Daily scheduled retention processing at 2:00 AM.
* Only runs when schedulers are enabled.
* Processes each club independently.
*/
@Scheduled(cron = "0 0 2 * * *")
@Transactional
public void processRetention() {
if (!schedulersEnabled) {
return;
}
log.info("Starting scheduled retention processing");
List<Club> clubs = clubRepository.findAll();
int totalAnonymized = 0;