konlue commented on PR #7776:
URL: https://github.com/apache/shenyu/pull/7776#issuecomment-6237062287
PTAL — both points are addressed in a follow-up commit (pushed above):
1. **Namespace defaulting — done as you suggested.**
`handleBeatInfo` now applies `StringUtils.defaultIfBlank(namespaceId,
SYS_DEFAULT_NAMESPACE_ID)` before the guard, and the hard drop covers `ip` /
`port` / `type` only. A blank `shenyu.namespace` therefore registers a working
instance under the default namespace instead of being dropped.
2. **Signal for rejected reports — done, with a wire-compatible choice.**
`/instance/beat` keeps the `200` status but answers
`ShenyuResultMessage.PARAMETER_ERROR` when the report is rejected —
`RegisterUtils.doHeartBeat` treats any non-"success" body as a failure and
logs/retries, so existing clients get a visible signal without a contract
change. Happy to switch to a proper `4xx` if you'd rather have the status-code
signal.
Tests updated for both (namespace defaulting, rejected-report signal).
Apologies for the re-review round-trip — it felt better than merging the
silent drop you flagged.
--
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]