Skip to content

Conversation

@calavera
Copy link
Contributor

@calavera calavera commented Nov 1, 2025

Context

When an allocation fails because of an out of memory, the failure reason is set at Oom. This reason is not propagated to the RequestCtx, which remains as FunctionError. We need to ensure that the failure reason in a request that ran out of memory is the right one.

What

Update the transformation of Oom failures in allocation to request failure reasons. I've also added a test to check the this is correct.

Testing

There is a new test that checks that the failure reason for a request is OutOfMemory when the allocation failure reason is Oom.

Contribution Checklist

  • If a Python package was changed, please run make fmt in the package directory.
  • If the server was changed, please run make fmt in server/.
  • Make sure all PR Checks are passing.

Note

Propagates OutOfMemory failures from function runs/allocations to request outcomes and HTTP API, adding the enum variant, mappings, and a verification test.

  • Data model:
    • Add OutOfMemory to RequestFailureReason and include in Display.
    • Map FunctionRunFailureReason::OutOfMemory to RequestFailureReason::OutOfMemory in From<...> conversion.
  • HTTP API v1:
    • Expose out_of_memory in RequestFailureReason and update conversion from data_model.
  • Tests:
    • Add integration test test_request_failure_reason_out_of_memory validating propagation to RequestCtx, FunctionRun, and Allocation outcomes.

Written by Cursor Bugbot for commit 5c36078. This will update automatically on new commits. Configure here.


// check that the request outcome is Failure(OutOfMemory)
{
let request_ctx = indexify_state
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets verify the function run and allocation also had OOM as a reason for failure.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on November 30

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

.function_run_outcome(FunctionRunOutcome::Failure(
FunctionRunFailureReason::OutOfMemory,
)),
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: OOM test should not emit graph updates

The test_request_failure_reason_out_of_memory test provides graph updates when finalizing a function run that failed due to OutOfMemory. A function failing with OOM shouldn't produce graph updates, which is inconsistent with other failure test patterns.

Fix in Cursor Fix in Web

@calavera calavera merged commit 019c23f into main Nov 3, 2025
10 checks passed
@calavera calavera deleted the fix_request_oom_failure_reason branch November 3, 2025 16:08
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.

3 participants