fix: populate LogContext from live JobSet pods for clustered tasks#7464
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves log retrieval for clustered (JobSet) tasks by populating TaskInfo.LogContext from live JobSet child pods (rather than only emitting templated/predicted pod log URLs). This enables the console/dataproxy to fetch logs natively even when pod name templates are missing or when real pod names include random suffixes.
Changes:
- Populate
pluginsCore.TaskInfo.LogContextinGetTaskPhaseusing a newgetLogContexthelper. - Implement
getLogContextto list JobSet child pods via thejobset.sigs.k8s.io/jobset-namelabel and build per-pod contexts. - Refactor clustered plugin tests to pass an explicit
K8sReaderand add a new test validatingLogContextbehavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| flyteplugins/go/tasks/plugins/k8s/clustered/phase.go | Wires LogContext into TaskInfo returned by GetTaskPhase. |
| flyteplugins/go/tasks/plugins/k8s/clustered/logs.go | Adds getLogContext to build structured log metadata from live JobSet pods. |
| flyteplugins/go/tasks/plugins/k8s/clustered/clustered_test.go | Refactors plugin context helpers for K8sReader and adds/updates tests for LogContext. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
pingsutw
reviewed
Jun 2, 2026
Signed-off-by: M. Adil Fayyaz <62440954+AdilFayyaz@users.noreply.github.com>
pingsutw
approved these changes
Jun 8, 2026
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 the changes needed?
The clustered (JobSet) plugin only emitted templated log URLs synthesized from predicted pod names, which requires a pod-log template to be configured and breaks when real pod names carry the Job-assigned random suffix. The console needs a structured LogContext to fetch logs natively regardless of log-template config.
What changes were proposed in this pull request?
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Stack
If you do use
git townto manage PR Stacks, the stack relevant to this PRwill show below. Otherwise, you can ignore this section.
Docs link