unbridled-41 opened a new issue, #5464:
URL: https://github.com/apache/rocketmq-dashboard/issues/5464

   ### Studio Version
   branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is 
based on it)
   deployed as: built from source (Go unit test)
   
   ### Runtime Environment
   
   Windows build path (`rmqctl/scripts/build-windows.ps1`); the check itself is 
a Go test and runs anywhere.
   
   ### Connected RocketMQ Cluster
   
   Not cluster-specific.
   
   ### Describe the Bug
   
   `rmqctl/scripts/build-windows.ps1` injects its own version default, and it 
has drifted from the rest of the build: the script says `1.0.0` while 
`rmqctl/Makefile` declares `VERSION ?= 3.0.0` and `rmqctl/cmd/app.go` sets 
`CLIVersion = "3.0.0"`. The script's own header states it builds the 
"counterpart to the cross-compilation done by `make build-all`" and its ldflags 
block is commented "Version metadata, mirroring the Makefile LDFLAGS", so a 
binary built with the documented Windows command reports a version no other 
build produces.
   
   ### Steps to Reproduce
   
   1. On Windows, run `.\scripts\build-windows.ps1` from `rmqctl/`.
   2. Run the produced binary's `version` command and compare with `make 
build`'s output.
   
   ### What Did You Expect to See?
   
   The Windows build path produces the same version metadata as the Makefile 
build.
   
   ### What Did You See Instead?
   
   It defaults to `1.0.0` while every other build reports `3.0.0`.
   
   ### Evidence
   
   - `rmqctl/scripts/build-windows.ps1` (`$Version` default and the ldflags 
block), `rmqctl/Makefile` (`VERSION ?= 3.0.0`), `rmqctl/cmd/app.go` 
(`CLIVersion`).
   - `cd rmqctl && go test ./cmd/ -run 
TestVersionMetadataAgreesAcrossBuildEntryPoints` — the added test fails before 
the change (`build-windows.ps1 default = "1.0.0" but cmd.CLIVersion = "3.0.0"`) 
and passes after; `go vet ./cmd/` clean and the full `go test ./...` suite 
passes.
   
   ### Impact
   
   A Windows build reports a version that no release uses, which is what bug 
reports and any telemetry would quote.
   
   ### Acceptance Criteria
   
   - The three entry points declare the same version, pinned by a test.
   
   **Corresponding PR:** #5432
   


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