Fix: Log links with showWhilePending: true are not shown while pendin…#7554
Fix: Log links with showWhilePending: true are not shown while pendin…#7554fg91 wants to merge 1 commit into
Conversation
…g for Ray plugin Signed-off-by: Fabio Grätz <fabio@cusp.ai>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7554 +/- ##
==========================================
- Coverage 57.16% 57.02% -0.14%
==========================================
Files 925 931 +6
Lines 57823 58385 +562
==========================================
+ Hits 33052 33295 +243
- Misses 21753 22030 +277
- Partials 3018 3060 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| switch rayJob.Status.JobDeploymentStatus { | ||
| case rayv1.JobDeploymentStatusNew: | ||
| phaseInfo, err = pluginsCore.PhaseInfoQueuedWithTaskInfo(pluginsCore.DefaultPhaseVersion, "Scheduling", info), nil | ||
| case rayv1.JobDeploymentStatusInitializing: |
There was a problem hiding this comment.
Task info including log links is only sent to flyteadmin when either the task phase changes (e.g. queued -> initializing) or when the so-called phase-version within the same phase changes (due a different "reason").
An initial event with phase Queued and pluginsCore.DefaultPhaseVersion is sent to flyteadmin before GetTaskPhase is called/the log links are constructed.
Subsequent calls to GetTaskPhase never reach phaseVersionUpdateErr := k8s.MaybeUpdatePhaseVersionFromPluginContext(&phaseInfo, &pluginContext) where the phase version would be bumped when necessary due to the early exit that this PR removes.
Because of this, log links with showWhilePending: true are constructed by GetTaskPhase but are never sent to flyteadmin.
By removing the early exit and ensuring that MaybeUpdatePhaseVersionFromPluginContext is reached, this problem is avoided.
|
|
||
| // KubeRay creates a Ray cluster first, and then submits a Ray job to the cluster | ||
| switch rayJob.Status.JobDeploymentStatus { | ||
| case rayv1.JobDeploymentStatusNew: |
There was a problem hiding this comment.
const rayv1.JobDeploymentStatusNew rayv1.JobDeploymentStatus = "" so this is equivalent to the prior len(rayJob.Status.JobDeploymentStatus) == 0.
Why are the changes needed?
Log links can be shown before a task reaches the
Runningphase by settingshowWhilePending: true. For the ray plugin, this doesn't actually work. This PR fixes this and adds a unit test that would have caught this bug.How was this patch tested?
Check all the applicable boxes