Skip to content

Fix missing LinkType for task template log links#7223

Merged
pingsutw merged 2 commits intoflyteorg:v2from
pingsutw:fix-linktype-in-loglinks
Apr 16, 2026
Merged

Fix missing LinkType for task template log links#7223
pingsutw merged 2 commits intoflyteorg:v2from
pingsutw:fix-linktype-in-loglinks

Conversation

@pingsutw
Copy link
Copy Markdown
Member

Tracking issue

N/A

Why are the changes needed?

When InitializeLogPlugins creates TemplateLogPlugin entries from task template metadata log links (e.g., Spark UI, Ray Dashboard), it was not setting LinkType or MessageFormat. This caused GetTaskLogs() to default LinkType to EXTERNAL (the zero value) instead of DASHBOARD, resulting in the API response returning link_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:

  1. Set LinkType: core.TaskLog_DASHBOARD.String() and MessageFormat: logLink.GetMessageFormat() when creating TemplateLogPlugin from task template log links
  2. Add missing IconUri: dynamicLogLink.IconUri to dynamic log link plugins

How was this patch tested?

  • Existing unit tests pass (go test ./flyteplugins/go/tasks/logs/... -count=1)
  • Verified the fix matches the v1 branch implementation

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

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>
@pingsutw pingsutw added the fixed For any bug fixes label Apr 16, 2026
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>
@pingsutw pingsutw merged commit 7f4567a into flyteorg:v2 Apr 16, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants