Fix missing LinkType for task template log links#7223
Merged
pingsutw merged 2 commits intoflyteorg:v2from Apr 16, 2026
Merged
Conversation
When InitializeLogPlugins creates TemplateLogPlugin entries from task template log links, it was not setting LinkType or MessageFormat. This caused all task template log links (e.g., Spark UI, Ray Dashboard) to default to EXTERNAL instead of DASHBOARD in the API response. Also adds missing IconUri to dynamic log link plugins. Signed-off-by: Kevin Su <pingsutw@apache.org>
Verify that log links from task template metadata get LinkType=DASHBOARD, MessageFormat is propagated, and they work correctly when combined with other log plugins. Signed-off-by: Kevin Su <pingsutw@apache.org>
ursucarina
approved these changes
Apr 16, 2026
davidmirror-ops
approved these changes
Apr 16, 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.
Tracking issue
N/A
Why are the changes needed?
When
InitializeLogPluginscreatesTemplateLogPluginentries from task template metadata log links (e.g., Spark UI, Ray Dashboard), it was not settingLinkTypeorMessageFormat. This causedGetTaskLogs()to defaultLinkTypetoEXTERNAL(the zero value) instead ofDASHBOARD, resulting in the API response returninglink_type: "EXTERNAL"for all task template log links.Note: The
flyte(v1) branch already has this fix — it was just never ported to v2.What changes were proposed in this pull request?
In
flyteplugins/go/tasks/logs/logging_utils.go:LinkType: core.TaskLog_DASHBOARD.String()andMessageFormat: logLink.GetMessageFormat()when creatingTemplateLogPluginfrom task template log linksIconUri: dynamicLogLink.IconUrito dynamic log link pluginsHow was this patch tested?
go test ./flyteplugins/go/tasks/logs/... -count=1)Check all the applicable boxes