Skip to content

MWI: Add service health to bot heartbeats#60093

Merged
boxofrad merged 6 commits intomasterfrom
boxofrad/tbot-heartbeat-include-service-health
Oct 21, 2025
Merged

MWI: Add service health to bot heartbeats#60093
boxofrad merged 6 commits intomasterfrom
boxofrad/tbot-heartbeat-include-service-health

Conversation

@boxofrad
Copy link
Copy Markdown
Contributor

@boxofrad boxofrad commented Oct 9, 2025

See: RFD 222: Bot Instances at Scale for more information.

changelog: MWI: Health of tbot's services is now reported to the auth server in heartbeats

@github-actions github-actions bot requested review from rana and timothyb89 October 9, 2025 13:56
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from ed5530d to d011f22 Compare October 9, 2025 15:34
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from 0f4dda5 to 6141ee9 Compare October 9, 2025 15:34
Comment thread lib/auth/machineid/machineidv1/bot_instance_service.go Outdated
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from 6141ee9 to 77ae1ff Compare October 13, 2025 10:42
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from d011f22 to a9b7123 Compare October 13, 2025 10:42
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from 77ae1ff to 3418e6f Compare October 13, 2025 11:24
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from a9b7123 to 022c3ae Compare October 13, 2025 11:24
@boxofrad boxofrad requested a review from strideynet October 13, 2025 11:36
Comment on lines +260 to +263
if storeHeartbeatExtras() {
// Overwrite the service health.
instance.Status.ServiceHealth = req.ServiceHealth
}
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.

Feels like we should give this some test coverage. It's the sort of thing nobody uses or thinks about until the day when it's really needed and wont work because of some subtle regression which snuck in over time.

@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from 022c3ae to 5878e1e Compare October 20, 2025 11:41
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from cc7b40f to 4193b03 Compare October 20, 2025 11:41
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from 5878e1e to 16e56e8 Compare October 20, 2025 14:39
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from 4193b03 to c33b482 Compare October 20, 2025 14:39
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-wait-for-services branch from 16e56e8 to d9aef19 Compare October 20, 2025 15:41
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from c33b482 to 4f3f7da Compare October 20, 2025 15:41
Base automatically changed from boxofrad/tbot-heartbeat-wait-for-services to master October 21, 2025 10:22
@boxofrad boxofrad force-pushed the boxofrad/tbot-heartbeat-include-service-health branch from 4f3f7da to 5c04887 Compare October 21, 2025 13:30
@boxofrad boxofrad added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
@boxofrad boxofrad added this pull request to the merge queue Oct 21, 2025
Merged via the queue into master with commit c421081 Oct 21, 2025
44 checks passed
@boxofrad boxofrad deleted the boxofrad/tbot-heartbeat-include-service-health branch October 21, 2025 15:07
boxofrad added a commit that referenced this pull request Oct 22, 2025
boxofrad added a commit that referenced this pull request Oct 22, 2025
boxofrad added a commit that referenced this pull request Oct 29, 2025
boxofrad added a commit that referenced this pull request Oct 29, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 29, 2025
* [v17] MWI: Automatically report service statuses in oneshot mode

Backport #60148 to branch/v17

* [v17] MWI: Add `AllServicesReported` method to `readyz.Register`

Backport #60059 to branch/v17

* [v17] MWI: Wait for service health before sending first heartbeat

Backport #60087 to branch/v17

* [v17] MWI: Add service health to bot heartbeats

Backport #60093 to branch/v17

* [v17] MWI: Simpler auto-generated `tbot` service names

Backport #60052 to branch/v17

* Fix `testing/synctest` on CI

* Fix linting of synctest files on CI

* [v17] MWI: Fix flaky test in SPIFFE Workload APIs

Backport #60668 to branch/v17
github-merge-queue bot pushed a commit that referenced this pull request Oct 29, 2025
* [v18] MWI: Automatically report service statuses in oneshot mode

Backport #60148 to branch/v18

* [v18] MWI: Add `AllServicesReported` method to `readyz.Register`

Backport #60059 to branch/v18

* [v18] MWI: Wait for service health before sending first heartbeat

Backport #60087 to branch/v18

* [v18] MWI: Add service health to bot heartbeats

Backport #60093 to branch/v18

* [v18] MWI: Simpler auto-generated `tbot` service names

Backport #60052 to branch/v18

* Fix linting of synctest files on CI

* [v18] MWI: Fix flaky test in SPIFFE Workload APIs

Backport #60668 to branch/v18
mmcallister pushed a commit that referenced this pull request Nov 6, 2025
* Add protobuf definitions for service health

* Track `UpdatedAt` timestamp on service statuses

* Track service type against status

* Send service health with bot status

* Store service health against bot instance

* Add `TELEPORT_DISABLE_TBOT_HEARTBEAT_EXTRAS` control
mmcallister pushed a commit that referenced this pull request Nov 19, 2025
* Add protobuf definitions for service health

* Track `UpdatedAt` timestamp on service statuses

* Track service type against status

* Send service health with bot status

* Store service health against bot instance

* Add `TELEPORT_DISABLE_TBOT_HEARTBEAT_EXTRAS` control
mmcallister pushed a commit that referenced this pull request Nov 20, 2025
* Add protobuf definitions for service health

* Track `UpdatedAt` timestamp on service statuses

* Track service type against status

* Send service health with bot status

* Store service health against bot instance

* Add `TELEPORT_DISABLE_TBOT_HEARTBEAT_EXTRAS` control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants