zmuxuny opened a new pull request, #5251:
URL: https://github.com/apache/rocketmq-dashboard/pull/5251
### Which Issue(s) This PR Fixes
- Fixes #5039.
### Problem
The K8s certificate inventory extracts both `notBefore` and `notAfter` from
an uploaded PEM, but its status calculation only checked expiry. A certificate
whose validity starts tomorrow was shown as green `valid` today, even though it
cannot yet be used.
### Changes
- Return `not_yet_valid` when `notBefore` is in the future and the
certificate has not expired.
- Render the status explicitly in the inventory, with Chinese and English
labels.
- Document the additional API status and update the frontend mock type.
- Preserve `expired` precedence and the existing expiring/valid boundary. A
certificate with `notBefore == now`, or no `notBefore`, keeps the existing
behavior.
### Previous Submission
This replaces #5042, which the inactivity bot closed after seven days
without activity. The original PR contains the earlier context and
regression-test history. The issue is still open and the fix is still needed on
the development branch.
The original source branch has been refreshed onto
`rocketmq-studio@a460673f`, preserving upstream changes. This PR uses tested
head `f8ece7091e76166ccbd214cb97616c2d92cece55`.
### How Did You Test This Change?
Validation rerun on the refreshed branch on 2026-10-01:
- `cd server && mvn -B -ntp -Dtest=K8sCertServiceTest,K8sCertControllerTest
test`: **33 passed**, no failures or errors; Checkstyle passed. Local execution
used the Mockito Java agent required by the installed JDK.
- `cd web && npx vitest run
src/pages/cluster/__tests__/K8sCertsPage.test.tsx
src/i18n/__tests__/translations.test.ts`: **13 passed** across two files.
- Fixed-clock service regressions cover future validity, the exact start
boundary, missing `notBefore`, a future start near expiry, expired-status
precedence, and leaving the persisted source object unchanged.
- The page regression checks the new status label; translation tests check
complete bilingual entries.
- Touched-file ESLint passed. Prettier passed for the page, mock and page
test; `translations.ts` retains the unrelated existing `ai.list.archiveFailed`
formatting warning.
- `git diff --check`: passed.
Known verification limits:
- `npx tsc -b --pretty false` is blocked by the unchanged upstream
`MetricsExplorer.test.tsx:516` TS2353 error (`query` is not a property of the
inferred `{ cluster, node_id }` type). This was also reproduced on clean
upstream. The full frontend build is not claimed as passing.
- The separate binary-license gate tracked in #5019 was not revalidated past
that TypeScript blocker.
- Full CI is pending on this new PR. The refreshed base includes #5020 and
#5029; the original PR's workflow startup result is not a result for this
refreshed head.
### Checklist
- [x] One coherent certificate-status fix
- [x] Conventional Commit subjects
- [x] Regression tests added
- [x] Chinese and English UI translations
- [x] API documentation updated
- [ ] Full CI, including architecture and aggregate build checks, is green
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]