Skip to content

Commands: Fix xray api bi balancer1 balancer2 - #7299

Merged
RPRX merged 2 commits into
XTLS:mainfrom
Eljees:n/fix-balancer-info-followup
Oct 31, 2026
Merged

RPRX merged 2 commits into
XTLS:mainfrom
Eljees:n/fix-balancer-info-followup

Conversation

@Eljees

@Eljees Eljees commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #7279 and the request to include it in #7276. #7276 has since merged with the adrules fix; this is the remaining BI change on current main.

The help documents xray api bi balancer1 balancer2, but only the first tag is queried, including with --json. Query every supplied tag in order through the existing GetBalancerInfo RPC and output formatters. A failed later tag now reports an error instead of silently succeeding after querying only the first tag. JSON output is a sequence of complete response objects.

The final merged diff contains the production fix. Two local regression cases called the actual command against a loopback gRPC recorder in text and JSON modes and verified both requested tags in order; both failed with the original source and passed with the fix. The fixture was removed during maintainer review. The merged production file is byte-identical to #7279.

Local validation against main 0afec660 included the regression fixture:

  • Windows Go 1.27.3 and Linux Go 1.27.1 (-race): all tests in ./main/commands/... ./app/router/... pass (59 leaf tests on each platform; no test failures or skips).
  • Five actual CLI cases against a synthetic loopback RoutingService pass: each single tag, multiple tags in text/JSON, and an invalid later tag. On the baseline, the last three cases fail their assertions.
  • Main build, repository format check and git diff --check pass.
  • go vet ./main/commands/... ./app/router/... reports the existing lost-cancel diagnostic at app/router/command/command.go:101. It is identical with the original BI source and with the fix on Windows; Linux reports the same diagnostic. No analyzers were disabled.

AI-assisted implementation and tests; separately reviewed and checked against the reproduced command behavior.

@RPRX
RPRX merged commit 6ca6d8a into XTLS:main Oct 31, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants