zmuxuny opened a new issue, #6740:
URL: https://github.com/apache/rocketmq-dashboard/issues/6740

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   rocketmq-studio at a92c2314, built from source.
   
   ### Runtime Environment
   
   Linux amd64; controlled CLI test with temporary local configuration and an 
httptest endpoint. No live broker or production mutation.
   
   ### Connected RocketMQ Cluster
   
   Not required: the defect occurs in CLI destination selection before a broker 
is involved.
   
   ### Build Toolchain
   
   Go 1.27.1
   
   ### Describe the Bug
   
   runTool captures a studio.Target through resolveTarget(), then confirmRisk 
independently reloads the configuration through runtime.targetServer(). If the 
active context or endpoint changes between these reads, the prompt names the 
newer server but preview and mutation requests use the originally captured 
server. A failed second config read similarly replaces a known destination with 
a generic label.
   
   ### Steps to Reproduce
   
   1. Resolve an interactive group reset-offset command using configuration 
pointing at endpoint A.
   2. Replace the configuration with endpoint B before confirmation. A 
deterministic regression replaces it from the credential-resolution test hook 
after the first config snapshot is loaded.
   3. Accept the confirmation and compare the prompted endpoint with the 
endpoint that receives the request.
   
   ### What Did You Expect to See?
   
   The confirmation must name the exact resolved endpoint used by the preview 
and mutation, independent of subsequent local context edits.
   
   ### What Did You See Instead?
   
   The prompt reads endpoint B while the actual request retains endpoint A. 
This can mislead an operator about which Studio deployment will receive an 
offset reset or other mutation.
   
   ### Additional Context
   
   Confirmed on unmodified production code with 
TestMutationConfirmationUsesResolvedTargetTest: prompt names 
"https://different-studio.example";, actual request went to the local httptest 
endpoint. The command returned success and sent exactly one request.
   
   Searched open and closed issues and PRs. #6205 adds runtime resolution tests 
but does not fix or test the double-read interval. #6513 concerns lost 
concurrent config writes, which is different: this race also occurs with 
individually atomic successful writes. AI assistance used for analysis and the 
controlled regression.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


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