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

   ### 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@779b8c0e7aed2396d3cc72743dcd544ea48e9ae6
   
   ### Runtime Environment
   
   Linux; offline Python unittest fixture running the real Bash 
package_source/upload_source functions and real tar creation/extraction. Only 
SSH/SCP/Docker boundaries are substituted. No live deployment was changed.
   
   ### Connected RocketMQ Cluster
   
   Not required: this defect occurs while assembling the deployment source 
tree, before Studio connects to a cluster.
   
   ### Build Toolchain
   
   Bash, tar and Python 3. The failure is stale source retention, reproduced 
without compiling or starting Docker.
   
   ### Describe the Bug
   
   Two defects in upload_source break the source replacement contract:
   1. deploy/deploy.sh packages rmqctl but removes only server, web and deploy 
before extraction. Removed or renamed Go files survive and enter the next 
Docker build.
   2. The function saves the extraction return code before restoring 
deploy/.env. If that final mv fails, it still exits the earlier zero status and 
starts the build without the preserved deployment environment.
   
   Both concern the same source-replacement transaction and will be fixed 
together.
   
   ### Steps to Reproduce
   
   Two independent offline reproductions use the actual unchanged 
package_source/upload_source functions and real tar creation/extraction, 
substituting SSH/SCP/Docker only:
   1. Seed obsolete files in server/web/deploy/rmqctl, including 
rmqctl/cmd/removed.go, then upload current sources. The two rmqctl absence 
assertions fail; obsolete files in the other three directories disappear.
   2. Preserve an existing deploy/.env, then inject return code 73 only for its 
final mv restoration. upload_source returns 0 and the build boundary is reached 
while deploy/.env is absent and the backup remains.
   
   ### What Did You Expect to See?
   
   Replace all four packaged source directories, including rmqctl. Preserve 
deployment environment and unrelated persistent files. Abort with a nonzero 
status if restoring the saved environment fails, leaving the backup available 
for recovery and preventing the subsequent build.
   
   ### What Did You See Instead?
   
   Removed CLI files remain beside current source. Separately, an injected 
restore mv failure produces exit_code=0 and BUILD_WOULD_START while 
remote_deploy_env_exists=False. No live remote host or Docker daemon was used.
   
   ### Additional Context
   
   Duplicate check: #2692 covers environment/port/cache/concurrency; #5759 
covers LICENSE/NOTICE inclusion; #5885 covers extraction exit status, but not 
the later restore result. The current comment promises nonzero status for 
restoration failures. An additional regression confirms extraction failure 
before deploy/ is recreated also prevents restoring the saved environment; the 
fix should recreate that destination while preserving the original extraction 
error. Eight offline cases: three affected cases fail on unchanged production, 
five compatibility/error controls pass. These source-replacement defects stay 
in one scoped contribution. AI assistance was used.
   
   ### 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