Repository navigation
fix(hub): clear stale Runtime Broker version on empty or dev heartbeat - #5787
Conversation
Normalize whitespace-only and unusable "dev" broker version tokens to "" in brokerVersionToken, and have broker self-heartbeats update stored b.Version even when the normalized version is empty so a stale tag is cleared instead of kept. With #7430, clearing a stale stored version to empty turns a false broker_version_mismatch warning into a truthful broker_version_unknown warning. User-authenticated heartbeats continue to leave the stored version unchanged. For #6382.
…date docs Include Server.version in duration backstop stop heartbeats so broker-self heartbeats from reportDurationBackstopStop do not clear the broker's stored version under the new empty/omitted clearing rule, and update docs-site API reference and workstation dashboard docs to reflect that omitted, empty, or dev heartbeat versions clear stale stored versions. Addresses review-1 R1 and R2 for #6382.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the Hub's version-tracking logic for Runtime Brokers. Specifically, when a Runtime Broker's heartbeat omits the version, sends an empty value, or sends an unusable placeholder like "dev", the Hub now clears the stored version (marking it as "unknown") instead of keeping a stale tag. This change is reflected in the API and dashboard documentation, the core broker version normalization logic, and the heartbeat handler. Additionally, the duration backstop sweep now includes the broker's version in its heartbeat. Comprehensive unit tests have been added or updated to verify these behaviors. As there are no review comments provided, I have no further feedback to provide.
The hub kept a stale stored Runtime Broker version when a broker reported an empty or dev version, which produced false version-mismatch states. Empty, whitespace and dev versions now normalize to unknown (reads cover legacy rows too). A broker's own heartbeat that omits the version, or reports it empty, clears the stored value, so the hub reports broker_version_unknown as ptone#7430 decided. User heartbeats never set or clear it. The duration-backstop heartbeat now carries the broker version, and the docs are updated.
Fixes ptone#6382