Repository navigation
feat: add PubsubReport to healthsdk HealthcheckReport - #31620
Merged
Merged
Conversation
spikecurtis
marked this pull request as ready for review
November 5, 2026 13:47
spikecurtis
force-pushed
the
spike/gru-100-pubsub-healthsdk
branch
2 times, most recently
from
November 5, 2026 14:49
14d1723 to
ad04cd8
Compare
spikecurtis
force-pushed
the
spike/gru-100-pubsub-healthsdk
branch
from
November 12, 2026 13:09
ad04cd8 to
0c97d2c
Compare
bpmct
added a commit
that referenced
this pull request
Nov 12, 2026
…the wait (#32097) The doc-check chat keeps running in Coder after the job stops waiting at 40 minutes, and it posts its own comment when it is done. When the local model is busy, reviews run past the wait and the check goes red even though nothing failed. 33 of 46 doc-check runs today ended red this way, including on #32088, #31788, #31621 and #31620. ## Changes - `continue-on-error` on the agents-chat-action step. - New step that ends with a notice when the wait timed out and the chat is still `running` or `pending`, and fails the job for every other error. Generated by Coder Agents on behalf of @bpmct.
cstyan
approved these changes
Nov 12, 2026
cstyan
left a comment
Collaborator
There was a problem hiding this comment.
I think this just needs a merge in of main/a rebase for make gen to pass
Adds a top-level pubsub section to the deployment health report with the common BaseReport fields and the pubsub backend name. The server does not populate it yet; that follows in a stacked PR.
Adds HealthSectionPubsub to HealthSections so the pubsub check can be dismissed, and includes the pubsub report in HealthcheckReport.Summarize.
spikecurtis
force-pushed
the
spike/gru-100-pubsub-healthsdk
branch
from
November 13, 2026 15:43
0c97d2c to
36bc2fb
Compare
spikecurtis
temporarily deployed
to
docs-preview
November 13, 2026 15:46 — with
GitHub Actions
Inactive
spikecurtis
temporarily deployed
to
docs-preview
November 13, 2026 15:57 — with
GitHub Actions
Inactive
spikecurtis
temporarily deployed
to
docs-preview
November 13, 2026 16:20 — with
GitHub Actions
Inactive
spikecurtis
added a commit
that referenced
this pull request
Nov 13, 2026
Fills in the `pubsub` section of the deployment health report on the server. Stacked on #31620. - New `pubsub.ReportingPubsub` interface: `Pubsub` plus `HealthReport(ctx) healthsdk.PubsubReport`. The `Pubsub` interface itself is unchanged. - The PostgreSQL, NATS and in-memory backends implement it. Each reports its backend name (`postgres`, `nats` or `memory`) and its connection state: - **PostgreSQL:** tracks the `pq` listener's connected state from its event callback. When it's not connected, the report has severity `warning` and `EPS01`. - **NATS:** warns with `EPS02` if the embedded server isn't `Running()`, and with `EPS01` for each publish or subscribe connection whose `Status()` isn't `CONNECTED`. - **In-memory:** always `ok`. - `coderd.Options.Pubsub` is now a `ReportingPubsub`. `ReplicaSyncPubsub` stays a plain `Pubsub`. - `coderd/healthcheck` has a new `Pubsub` check, which counts toward `healthy` and the overall severity like the other sections. `formatHealthcheck` applies the dismissed setting for it. - New health codes `EPS01` (not connected) and `EPS02` (embedded NATS server not running), documented in `docs/admin/monitoring/health-check.md`. - Test helpers follow the type change: `coderdtest.Options.Pubsub` and the pubsub returned by `dbtestutil.NewDB` are now `ReportingPubsub`, and a few test wrappers embed `ReportingPubsub` instead of `Pubsub`. <details> <summary>Decision log</summary> - `HealthReport` returns a `healthsdk.PubsubReport` rather than filling one in place. This matches the `healthcheck.Checker` methods. `ctx` is unused for now. - The healthcheck layer sets `Dismissed`, so backends don't need to know about health settings. - Problems are reported as warnings, not errors, so they show on the health page without marking the deployment unhealthy. Both backends reconnect on their own. - Postgres connection state comes from the listener event callback, not from `pq.Listener.Ping`, so the health check doesn't do database I/O. Closing the pubsub also marks it disconnected. - NATS `conn` gains `Status()`, which `*natsgo.Conn` already implements. The pools are immutable after construction, so `HealthReport` reads them without locking. - The docs say the pubsub section appears in the JSON response, because the health UI doesn't show it until a later PR in this stack. - psmock is not regenerated: none of its users pass it to coderd. </details> --- Generated by Coder Agents on behalf of @spikecurtis.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds pubsub to the deployment health report types in
healthsdk:pubsubsection (PubsubReport) inHealthcheckReport. It embedsBaseReportand adds one field,backend(string).HealthSectionPubsubconstant, added toHealthSectionsso the section can be dismissed.HealthcheckReport.Summarizeincludes pubsub errors and warnings, whichcoder support bundleprints.This is the first PR in a stack for GRU-100. It only changes the SDK and the files generated from it (Swagger, API docs,
typesGenerated.ts), plus the two frontend health mocks that need the new required field. The server does not fill in this section yet. That comes in a follow-up PR.Plan
PubsubReport { BaseReport; Backend string }tocodersdk/healthsdk.Pubsub PubsubReport \json:"pubsub"`toHealthcheckReport`.HealthSectionPubsuband include it inHealthSections.PubsubinHealthcheckReport.Summarize, with test coverage.coderd/healthcheck(including severity and dismissal handling) and update the health UI.Generated by Coder Agents on behalf of @spikecurtis.