Loyal-Young opened a new pull request, #6430:
URL: https://github.com/apache/rocketmq-dashboard/pull/6430

   ### Which Issue(s) This PR Fixes
   
   Fixes #6415
   
   ### Brief Description
   
   Preserve every label condition when creating a maintenance window. The form 
used a plain object, which silently dropped `__proto__`, and overwrote 
duplicate keys after trimming. The backend similarly overwrote distinct JSON 
keys that became equal after normalization.
   
   Use a Map while parsing the form, reject empty/duplicate normalized keys, 
and reject backend normalization collisions before persistence or auditing. 
Existing localized validation text is reused. Valid values containing `=` and 
prototype-named keys survive serialization.
   
   ### How Did You Test This Change?
   
   - `cd web`: `node node_modules/vitest/vitest.mjs run 
src/pages/ops/__tests__/SystemAlertsPage.test.tsx --pool=threads 
--maxWorkers=1` — **24 passed**; the three added regressions failed before the 
fix.
   - `cd server`: `mvn -B -ntp -Dtest=AlertSilenceServiceTest,ArchitectureTest 
test` on Java 21 — **14 passed**, Checkstyle passed. No `ArchitectureTest` 
exists in this snapshot; the executed suite was `AlertSilenceServiceTest`. The 
new collision test failed before the fix.
   - Prettier on changed frontend files, ESLint (0 errors; 1 existing 
effect-dependency warning), and `node node_modules/typescript/bin/tsc -p 
tsconfig.app.json --noEmit --pretty false --composite false --incremental 
false`: passed.
   - `git diff --check`: passed.
   
   No live database or browser end-to-end verification was run.
   
   ### Checklist
   
   - [x] One coherent change; Conventional Commit subject
   - [x] Regression tests added, new test names end in `Test`
   - [x] Existing localized validation message reused; no new source files
   - [x] No module dependency changes
   - [x] API continues to accept valid label maps; ambiguous conditions now 
fail validation
   
   ### AI Assistance
   
   AI assistance was used to trace form serialization and backend 
normalization, draft the fix and regression tests, and run the local checks 
listed above.
   


-- 
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]

Reply via email to