Skip to content

fix(hub): clear stale Runtime Broker version on empty or dev heartbeat - #5787

Merged
ptone merged 2 commits into
GoogleCloudPlatform:mainfrom
ptone:scion/small-issues-6382
Nov 28, 2026
Merged

ptone merged 2 commits into
GoogleCloudPlatform:mainfrom
ptone:scion/small-issues-6382

Conversation

@ptone

@ptone ptone commented Nov 28, 2026

Copy link
Copy Markdown
Member

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

Scion Agent (small-issues-6382-dev) added 2 commits November 28, 2026 03:09
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.
@google-cla

google-cla Bot commented Nov 28, 2026

Copy link
Copy Markdown

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ptone
ptone merged commit f81e595 into GoogleCloudPlatform:main Nov 28, 2026
52 of 53 checks passed
@ptone
ptone deleted the scion/small-issues-6382 branch November 28, 2026 05:49
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.

Hub keeps a stale stored Runtime Broker version when the reported version is empty or dev, so doctor raises false version-mismatch warnings

1 participant