Skip to content

[studio] fix: refresh K8s certificate expiry status - #765

Merged
lizhimins merged 1 commit into
apache:rocketmq-studiofrom
ai-yang:agent/fix-k8s-cert-expiry-status
Aug 3, 2026
Merged

[studio] fix: refresh K8s certificate expiry status#765
lizhimins merged 1 commit into
apache:rocketmq-studiofrom
ai-yang:agent/fix-k8s-cert-expiry-status

Conversation

@ai-yang

@ai-yang ai-yang commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • derive certificate status and daysRemaining from the current time when certificates are listed or updated
  • keep repository values detached by refreshing copied response objects
  • use one injectable Clock for create, update, renew, and read-time expiry calculations
  • preserve the existing 30-day expiring threshold and mutable list behavior

Root cause

K8sCertService calculated time-derived fields only when a certificate was created or renewed. A long-running Studio instance therefore kept returning the persisted historical status even after the certificate crossed the expiring or expired boundary.

The service now refreshes these derived fields at the read/update boundary without mutating stored objects returned by the repository.

Validation

  • unmodified Java 21 baseline: deterministic regression failed in 5/5 isolated Maven processes
  • fixed list/update expiry regressions: 20 isolated Java 21 Maven processes, 2/2 each (40/40)
  • K8sCertServiceTest: 15/15
  • K8sCertControllerTest: 9/9
  • complete server suite: 488/488
  • Maven package: 488/488
  • Maven validate and Checkstyle: passed
  • git diff --check: passed

Fixes #759

@ai-yang
ai-yang marked this pull request as ready for review August 2, 2026 14:24
Signed-off-by: Rui <1685901819@qq.com>
@lizhimins
lizhimins force-pushed the agent/fix-k8s-cert-expiry-status branch from b6a1008 to 8d74159 Compare August 3, 2026 03:38
@lizhimins
lizhimins merged commit 00e094c into apache:rocketmq-studio Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants