Repository navigation
Retry maintenance jobs with fewer resources when they run out of memory - #379
Open
bruno-espino wants to merge 1 commit into
Open
bruno-espino wants to merge 1 commit into
bruno-espino wants to merge 1 commit into
Conversation
| {{- $env := get (get .Values .serviceName | default dict) "env" | default list -}} | ||
| {{- $names := list -}} | ||
| {{- if kindIs "map" $env -}} | ||
| {{- $names = keys $env -}} |
There was a problem hiding this comment.
🟠 High templates/_helpers-fusionfire.tpl:284
A map-form env entry set to null suppresses the chart default, but logfire.serviceEnv drops that entry, so the pod receives neither the override nor the default variable. Filter null-valued entries when collecting names so they do not count as overrides.
Suggested change
| {{- $names = keys $env -}} | |
| {{- range $name, $value := $env -}} | |
| {{- if not (kindIs "invalid" $value) -}} | |
| {{- $names = append $names $name -}} | |
| {{- end -}} | |
| {{- end -}} |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @charts/logfire/templates/_helpers-fusionfire.tpl around line 284:
A map-form `env` entry set to `null` suppresses the chart default, but `logfire.serviceEnv` drops that entry, so the pod receives neither the override nor the default variable. Filter null-valued entries when collecting names so they do not count as overrides.
This branch has not been 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Compaction and maintenance jobs that run out of memory now retry with fewer resources, instead of failing again and again on the same files.
FF_MAINTENANCE_RESOURCE_LADDER=true. When a job fails on the record-batch memory limit, the worker retries it in the same process with fewer parallel lanes and smaller batches. Jobs that fit run as before.FF_MAINTENANCE_JOB_MAX_ATTEMPTS=5, so a job has room for the retries. The scheduler deletes a job at its maximum attempts, so all three services use the same value.envstill overrides both values. The chart leaves out a default when the serviceenvsets the same name, so the pod spec has no duplicate entry.In a test where a compaction worker failed the same merge 20 times without the ladder, the ladder retried the two failing jobs once each, and the partition compacted fully. The memory request did not change.
Upgrade notes
None. To keep the previous behavior, set
FF_MAINTENANCE_RESOURCE_LADDER: "false"in theenvoflogfire-ff-maintenance-workerandlogfire-ff-compaction-worker.