Skip to content

[Automated] Draft docs (kagent): fix(database): retry failed PostgreSQL logins and report them as… - #734

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
pr-tracker-draft-kagent-3550
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
pr-tracker-draft-kagent-3550

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The target's own content scan fails where the base build passed (docs-theme-extras markdown-leaks / built-html-integrity):

  • markdown-leaks.spec.ts > markdown-leaks: rendered HTML scan > no leaked markdown across built HTML pages

kagent-dev/kagent#3550 — fix(database): retry failed PostgreSQL logins and report them as Unavailable

Docs versions: main

No code-path rule covers 7 touched file(s). The planner could route these only by identifier search, so the candidate pages may miss what they changed, including in the other mode:

  • go/api/gen/kagent/config/v1/config.pb.go
  • go/core/internal/grpcserver/interceptors.go
  • go/core/pkg/app/app.go
  • go/core/pkg/config/defaults.go
  • go/core/pkg/postgres/pool.go
  • helm/README.md
  • ...and 1 more

What changes for users: Failed PostgreSQL logins now retry for up to config.database.pool.connectRetryTimeout, which defaults to 90s and can be set to 0s to try once. When the final failed login happens before SQL runs, controller APIs return Unavailable "database unavailable" and log the cause.

What the docs now say: The operational considerations page now lists config.database.pool.connectRetryTimeout beside the other database pool settings, shows it in the external PostgreSQL values example, and explains the retry limits and non-retried cases.

How kagent-3550 was drafted

Plan, and what changed it

  • Planned: Document connectRetryTimeout on the page that owns external PostgreSQL and config.database.pool.
  • Learned: operations/upgrade-from-0x.md and setup/installation.md only point readers to that operational page for database settings, while operations/operational-considerations.md already carries the pool example and field table.
  • Did: Updated docs-site/content/kagent/main/operations/operational-considerations.md only.

Why a documentation change is necessary

The pull request adds config.database.pool.connectRetryTimeout, changes the default database-login behavior to retry for 90s, and lets operators restore the old one-attempt behavior with 0s. The operational considerations page already documents external PostgreSQL and the config.database.pool fields, but it did not list the new field or the default. A reader tuning a production database connection would not know why API calls can now wait through a failed login, how to shorten that retry, or which failures are not retried.

How to verify this change

  1. Save a kagent.yaml values file with config.database.pool.connectRetryTimeout: 90s, then render the controller configuration by using the helm template ... --show-only templates/controller-configmap.yaml command on the operational considerations page.
  2. Run yq '.data."controller.yaml" | from_yaml | .database.pool.connectRetryTimeout' on the rendered ConfigMap. The output shows 90s.
  3. Change the value to 601s, render again, and run kagent config validate --component controller --config controller.yaml. The command rejects the rendered configuration because the value is greater than 600s.

Proposed release note

No separate proposed-release-note.md: markers.notes_placeable is false for this product run.

Failed PostgreSQL logins, such as during a restart or serverless database resume, now retry for up to config.database.pool.connectRetryTimeout. The setting defaults to 90s and can be set to 0s to try once. When the final failed login happens before SQL runs, controller APIs return Unavailable "database unavailable" and log the cause; rejected credentials and failures after login are not retried.

Files in this pull request

  • docs-site/content/kagent/main/operations/operational-considerations.md
How the pages were chosen (triage report)

Feature clusters

These clusters look incomplete. Each names a pull request this run never saw, so documenting the cluster as it stands may describe half a feature — the classic failure is a guide telling a reader to set a field that a later change gave a default. Read the absent pull request before drafting:

Cluster Missing What it is Why it matters
c7 kagent-dev/kagent#799 fix snyk issues (merged) also worked issue #776, which kagent-dev/kagent#3550 closes

Draft a documentation change

kagent-dev/kagent#3550 — fix(database): retry failed PostgreSQL logins and report them as Unavailable

  • Product: kagent (upstream) → kagent-dev/website
  • Docs version: main
  • Summary (read from the body): When the controller can't log in to PostgreSQL, for example during a restart, a failover, or a serverless database resuming from a pause, every API call fails at once with Internal "internal server error". Nothing is logged, and clients can't tell that a retry would work.
  • Not tested: a cluster was used only to dry-run the YAML manifests the draft added; prose, inline field paths and commands are unrun
  • No rule covers 7 touched file(s). The candidate pages below come from the files that DID match a rule, so they may scope this narrower than the change is. Read these before deciding the change is only about the pages listed:
    • go/api/gen/kagent/config/v1/config.pb.go
    • go/core/internal/grpcserver/interceptors.go
    • go/core/pkg/app/app.go
    • go/core/pkg/config/defaults.go
    • go/core/pkg/postgres/pool.go
    • helm/README.md
    • ...and 1 more

Draft branch: pr-tracker-draft-kagent-3550


Important

The test suite has not run on this pull request. It was opened by github-actions[bot], and GitHub does not start workflows for pull requests opened with the repository's own token. This repository's checks are held as action_required until somebody presses Approve and run on the Checks tab. Checks that come from GitHub Apps rather than Actions, such as DCO, run on their own.

Please approve the checks before reviewing the content: an absence of failures here means the tests have not run, not that they passed.

…QL logins and report them as…

Signed-off-by: GitHub Action <action@github.com>
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.

1 participant