You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/09/30 13:40:51 UTC
[PR] fix(k8s): express certificate validity in UTC and render it as such [rocketmq-dashboard]
123123213weqw opened a new pull request, #5239:
URL: https://github.com/apache/rocketmq-dashboard/pull/5239
### Which Issue(s) This PR Fixes
Fixes #5227
### Brief Description
X.509 validity is an absolute instant, but `K8sCertService` converted it through `ZoneId.systemDefault()` and the console parsed the offset-less value in the browser zone, so the displayed expiry carried the server-minus-viewer offset. The parsed instants are now expressed in UTC (the #4949 convention for offset-less timestamps), the service's default clock runs on UTC so the expiry-status comparisons speak the same wall clock as the stored values, and the console column renders through `formatUtcDateTime`.
### How Did You Test This Change
- `mvn -B -ntp test -Dtest='K8sCertServiceTest,K8sCertControllerTest,K8sCertificateSecretRedactionTest'` — 35/35 green.
- The new `createCertShouldStoreSuppliedValidityAsUtc` pins the conversion against a fixed self-signed certificate; verified red under `TZ=Asia/Shanghai` with the unfixed conversion, green after.
- `npx vitest run src/pages/cluster/__tests__/K8sCertsPage.test.tsx` — 10/10 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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(k8s): express certificate validity in UTC and render it as such [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5239: fix(k8s): express certificate validity in UTC and render it as such
URL: https://github.com/apache/rocketmq-dashboard/pull/5239
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(k8s): express certificate validity in UTC and render it as such [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5239:
URL: https://github.com/apache/rocketmq-dashboard/pull/5239#issuecomment-6049498788
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(k8s): express certificate validity in UTC and render it as such [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #5239:
URL: https://github.com/apache/rocketmq-dashboard/pull/5239#issuecomment-6074069255
This pull request was closed by the stale bot on 2026-10-08 (seven days without activity), not by a maintainer decision - the review below is what we had queued for it.
The coupling you found is real: `K8sCertService.java:93-94` formats the validity window without a zone while `certs.tsx:188` renders it as UTC, and the direction of the fix is right. Three things block it:
1. The backend case cannot fail on a UTC host, which is what CI runs on. Pin the zone inside the test (`TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"))` with a `try/finally` restore) so the assertion actually guards the change.
2. The frontend half has no coverage. Add a case for the two lines in `certs.tsx` and use a fixture without an offset (e.g. `2027-01-01T00:00:00`) - that is the only shape that tells `formatDateTime` and `formatUtcDateTime` apart.
3. Say in the description what happens to already-stored `not_before` / `not_after` values, and whether they need a one-off correction.
Note also that `certs.tsx` on this branch is byte-identical to #5511 (by @zjncs), whose Java change is the same shape and whose tests are stronger, so only one of the two can land. If you would rather not duplicate that work, item 3 is the part that is uniquely yours and the most useful.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org