Skip to content

Commit 27b8d54

Browse files
committed
helm: fix dbStatementTimeout/dbPoolRecycle/dbPoolMaxOverflow silently dropped when set to 0
The webserver command template used `{{- with value }}` to include --db-statement-timeout and related flags. Go's text/template treats the integer 0 as falsy, so `with 0` is skipped entirely — preventing users from disabling PostgreSQL's statement_timeout (which requires value 0). Also, large integers such as 2147483647 were rendered in scientific notation (2.147483647e+09) because Helm parses YAML integers as float64 and the default formatter switches to scientific notation past a threshold. Replace `with` with `if not (kindIs "invalid" ...)` to distinguish between an unset (null) value and an explicitly provided zero. Pipe the value through `int64` to guarantee decimal formatting for all integer sizes. Same fix applied to dbPoolRecycle and dbPoolMaxOverflow which have the same pattern. Fixes #33821
1 parent 6388276 commit 27b8d54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

helm/dagster/templates/helpers/_helpers.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ If release name contains chart name it will be used as a full name.
5454
{{- $userDeployments := index .Values "dagster-user-deployments" }}
5555
{{- printf "dagster-webserver -h 0.0.0.0 -p"}} {{ $_.Values.dagsterWebserver.service.port }}
5656
{{- if $userDeployments.enabled }} -w /dagster-workspace/workspace.yaml {{- end -}}
57-
{{- with $_.Values.dagsterWebserver.dbStatementTimeout }} --db-statement-timeout {{ . }} {{- end -}}
58-
{{- with $_.Values.dagsterWebserver.dbPoolRecycle }} --db-pool-recycle {{ . }} {{- end -}}
59-
{{- with $_.Values.dagsterWebserver.dbPoolMaxOverflow }} --db-pool-max-overflow {{ . }} {{- end -}}
57+
{{- if not (kindIs "invalid" $_.Values.dagsterWebserver.dbStatementTimeout) }} --db-statement-timeout {{ $_.Values.dagsterWebserver.dbStatementTimeout | int64 }} {{- end -}}
58+
{{- if not (kindIs "invalid" $_.Values.dagsterWebserver.dbPoolRecycle) }} --db-pool-recycle {{ $_.Values.dagsterWebserver.dbPoolRecycle | int64 }} {{- end -}}
59+
{{- if not (kindIs "invalid" $_.Values.dagsterWebserver.dbPoolMaxOverflow) }} --db-pool-max-overflow {{ $_.Values.dagsterWebserver.dbPoolMaxOverflow | int64 }} {{- end -}}
6060
{{- if $_.Values.dagsterWebserver.pathPrefix }} --path-prefix {{ $_.Values.dagsterWebserver.pathPrefix }} {{- end -}}
6161
{{- with $_.Values.dagsterWebserver.logLevel }} --log-level {{ . }} {{- end -}}
6262
{{- if .webserverReadOnly }} --read-only {{- end -}}

0 commit comments

Comments
 (0)