dxz0069 opened a new pull request, #7320: URL: https://github.com/apache/rocketmq-dashboard/pull/7320
Replaces #6683, which the stale bot closed after 7 days of waiting for review; the branch is rebased onto the current head. Original description follows. ### Which Issue(s) This PR Fixes - Fixes #6538 ### Brief Description `normalizeOptionalIdentity` only rejected blank values, so an over-long `k8sId`, `cluster` or `issuer` reached the INSERT and MySQL answered `Data too long for column` as a 500. Each field is now capped at the width of its `rmq_k8s_certificate` column (`k8s_id`/`cluster` VARCHAR(128), `issuer` VARCHAR(256)) with the same 400 the blank-value checks already return, counted in code points via `TextBounds` — the unit MySQL counts a `varchar` in, following `InstanceService.requireTextWithin` (#4713). ### How Did You Test This Change ``` cd server mvn -B -ntp test -Dtest=K8sCertServiceTest -Dsurefire.failIfNoSpecifiedTests=false Tests run: 21, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS ``` Added `createCertShouldBoundTheTextFieldsToTheirColumnsTest` / `updateCertShouldBoundTheTextFieldsToTheirColumnsTest` and `createCertShouldAcceptIdentityFieldsAtTheColumnWidthTest`. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits - [x] Tests added or updated, test methods named `...Test` - [x] New UI text has both zh and en entries (no new UI text) - [ ] Architecture constraints stay green - [x] ASF license header (existing files only) - [x] Documentation touched where behaviour changed (none needed) -- 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]
