Skip to content

[chore][PLAT-1440] Raise termination grace periods so in-flight SLFs can finish - #365

Merged
nataliechen-pixel merged 3 commits into
mainfrom
PLAT-1440-bump-infra-timeouts-for-all-services-that-serve-slfs-to
Aug 20, 2026
Merged

[chore][PLAT-1440] Raise termination grace periods so in-flight SLFs can finish#365
nataliechen-pixel merged 3 commits into
mainfrom
PLAT-1440-bump-infra-timeouts-for-all-services-that-serve-slfs-to

Conversation

@nataliechen-pixel

@nataliechen-pixel nataliechen-pixel commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Related:

Standardize and increase terminationGracePeriodSeconds across backend, dbconnector, codeExecutor, and jsExecutor deployments to better accommodate in-flight requests during pod shutdown.

What changed?

  • backend terminationGracePeriodSeconds increased from 136s (2m 15s + 1s) to 391s (6m 30s + 1s)
  • dbconnector terminationGracePeriodSeconds changed from a commented-out 960s default to an active value of 391s
  • codeExecutor now has an explicit terminationGracePeriodSeconds of 391s (6m in-flight + 30s preStop buffer + 1s), previously unset
  • jsExecutor now has an explicit terminationGracePeriodSeconds of 391s (6m in-flight SLF + 30s drain buffer + 1s), previously unset

How to test?

Deploy the chart and verify that pods for the backend, dbconnector, codeExecutor, and jsExecutor reflect the updated terminationGracePeriodSeconds values in their pod specs. During a rolling update, confirm that in-flight requests are allowed to complete before pods are forcibly terminated.

Why make this change?

The previous default grace period for the backend (136s) was based on a 2-minute query timeout, which no longer reflects the actual in-flight request duration. Aligning all services to a 6-minute baseline (plus appropriate drain buffers) ensures pods have sufficient time to finish processing requests before Kubernetes forcibly kills them, reducing disruption during updates and rescheduling events.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
charts/retool/templates/deployment_backend.yaml Raises the rendered backend termination grace-period fallback from 136 to 391 seconds.
charts/retool/templates/deployment_code_executor.yaml Adds a configurable termination grace period with a 391-second fallback.
charts/retool/templates/deployment_js_executor.yaml Adds a configurable termination grace period with a 376-second fallback.
charts/retool/values.yaml Publishes the updated lifecycle defaults for backend, DB connector, code executor, and JS executor.
values.yaml Keeps the repository-level values copy synchronized with the packaged chart defaults.
charts/retool/Chart.yaml Increments the chart version from 6.11.20 to 6.11.21.

Reviews (2): Last reviewed commit: "[chore][PLAT-1440] Bump chart version to..." | Re-trigger Greptile

@nataliechen-pixel
nataliechen-pixel marked this pull request as ready for review August 20, 2026 21:49
{{ toYaml .Values.ui.labels | indent 8 }}
{{- end }}
spec:
terminationGracePeriodSeconds: {{ .Values.backend.terminationGracePeriodSeconds | default 136 }}

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.

is it possible to add comments in the YAML to explain how all of these magic numbers were arrived at?

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.

ah I see... they're documented in the default values. Do we need the | still, considering we have default values checked in?

Match the shared 391s grace used by the other SLF-serving services instead of
carrying a separate 376s value for the JS executor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nataliechen-pixel
nataliechen-pixel merged commit 5ff4244 into main Aug 20, 2026
13 checks passed
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.

2 participants