fix(rayjob): use grace period env var for submitter finished timeout#8
Open
jld-adriano wants to merge 1 commit intomasterfrom
Open
fix(rayjob): use grace period env var for submitter finished timeout#8jld-adriano wants to merge 1 commit intomasterfrom
jld-adriano wants to merge 1 commit intomasterfrom
Conversation
…ONDS env var for submitter finished timeout The checkSubmitterFinishedTimeoutAndUpdateStatusIfNeeded function used a hardcoded 30s timeout (DefaultSubmitterFinishedTimeout) for the grace period between when the submitter pod finishes and when the Ray job reaches terminal state. This was too short for workloads on non-AWS nodes (e.g. Mithril) where model downloads from S3 take longer. This change makes the function read the existing RAYJOB_DEPLOYMENT_STATUS_TRANSITION_GRACE_PERIOD_SECONDS env var (same one used by checkTransitionGracePeriodAndUpdateStatusIfNeeded), falling back to the 30s default if not set. This allows operators to configure a single knob for both grace periods. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Why are these changes needed?
checkSubmitterFinishedTimeoutAndUpdateStatusIfNeededuses a hardcoded 30-second timeout (DefaultSubmitterFinishedTimeout) to decide how long to wait after the submitter pod finishes before failing the RayJob if it hasn't reached a terminal state. On non-AWS nodes (e.g. Mithril), model downloads from S3 cause Ray head startup to take longer than 30s, so the job is prematurely marked as failed withJobDeploymentStatusTransitionGracePeriodExceeded.There is already a companion function,
checkTransitionGracePeriodAndUpdateStatusIfNeeded, that reads theRAYJOB_DEPLOYMENT_STATUS_TRANSITION_GRACE_PERIOD_SECONDSenv var for its own grace period. This PR makes the submitter-finished timeout also read that same env var, falling back to the 30s default when it's unset.Key review points:
os.Getenvis called on each reconciliation rather than cached at startup — this matches the existing pattern incheckTransitionGracePeriodAndUpdateStatusIfNeeded.Related issue number
N/A — discovered during Flyte integration testing on Mithril GPU nodes where the 30s hardcoded timeout was too short.
Checks
Manually validated by running a Flyte integration test that exercises KubeRay RayJob submission on a Mithril GPU node where head pod startup exceeds 30s.
Link to Devin session: https://app.devin.ai/sessions/e25862cfa13341aea414ccbec3fb65af
Requested by: @jld-adriano