yyqdbngt opened a new pull request, #2863:
URL: https://github.com/apache/rocketmq-dashboard/pull/2863

   ## Summary
   - In `SettingsService.saveGeneralSettings`, inherit the stored value for 
fields that a
     partial writer does not manage: `dingtalkWebhook`, `smsWebhook`, 
`emailRecipients`,
     `llmEngine`, `maxTokens`, `temperature`.
   - An absent (`null`) value now inherits the stored one; an explicit empty 
string still
     clears a text field, so the existing clear-by-empty-string behaviour is 
unchanged.
   - Added regression tests for both partial-writer directions and the 
explicit-clear case.
   
   ## Why
   The persisted settings blob has two writers that each manage only part of 
the fields:
   - the general-settings save (`/api/settings/general/save`, 
`GeneralSettingsUpdateDTO`)
     has no `maxTokens`/`temperature` properties, so every general save nulled 
the LLM
     tuning and the next LLM config load silently fell back to the defaults;
   - the LLM config save (`LlmConfigService.saveConfig`) builds the VO without
     `dingtalkWebhook`/`smsWebhook`/`emailRecipients`/`llmEngine`, so saving 
the LLM
     config wiped the notification channels and engine override.
   
   Both were data-loss-on-save bugs in the opposite direction of each other.
   
   ## Testing
   - `cd server && mvn -Dtest=SettingsServiceTest test` — Tests run: 46, 
Failures: 0, Errors: 0
   - `cd server && mvn -Dtest=LlmConfigServiceTest test` — Tests run: 28, 
Failures: 0, Errors: 0
   


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