Fix number env vars not coercing string -> number for LANGFUSE_INIT_PROJECT_RETENTION, more #8103
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.
What does this PR do?
This PR fixes config of the LANGFUSE_INIT_PROJECT_RETENTION and LANGFUSE_MAX_HISTORIC_EVAL_CREATION_LIMIT via env.
coerce
was missing on both env vars. It seems all othernumber()
envs use this, so it was probably an oversight that it was not added.When setting up retention in our chart, Langfuse fails to validate the env var LANGFUSE_INIT_PROJECT_RETENTION when configured in
additionalEnv
as follows:Langfuse logs these errors when attempting to start:
Note that setting the value unquoted results in a parsing error in helm:
While in here, I found that
LANGFUSE_MAX_HISTORIC_EVAL_CREATION_LIMIT
will suffer from the same issue, so I've also fixed that.Type of change
Mandatory Tasks
Important
Fixes environment variable coercion for
LANGFUSE_INIT_PROJECT_RETENTION
andLANGFUSE_MAX_HISTORIC_EVAL_CREATION_LIMIT
inweb/src/env.mjs
.z.coerce
toLANGFUSE_INIT_PROJECT_RETENTION
andLANGFUSE_MAX_HISTORIC_EVAL_CREATION_LIMIT
inweb/src/env.mjs
to coerce strings to numbers.LANGFUSE_INIT_PROJECT_RETENTION
when set via Helm with quotes.LANGFUSE_INIT_PROJECT_RETENTION
without quotes.This description was created by
for b9e86a3. You can customize this summary. It will automatically update as commits are pushed.