cuddly-jelly-27016
03/03/2025, 5:28 PMplugins:
logs:
dynamic-log-links-enabled: true
dynamic-log-links:
flyin: http://flyin.vs:{{ .taskConfig.port }}/{{ .podName }}
Notice the way the the configuration passed from the task is accessed, in this case assume that the task is setting port in its task template, so in order to access that in the template we use the prefix .taskConfig in the template.
The dynamic-log-links is a map of string to TemplateLogPlugin, where the key is the name of the dynamic log link, which is used to identify which logs should be applied in the case of a specific task. For example, consider the case of 2 dynamic logs links being enabled in the configuration, i.e.:
plugins:
logs:
dynamic-log-links-enabled: true
dynamic-log-links:
abc: http://foo.bar/{{ .taskConfig.V1 }}
def: http://baz/{{ .taskConfig.V2 }}
and the task only specifies def in its list of dynamic log links:
@task(dynamic_log_link="def")
def t():
...
(I'm abusing the notation a little bit, since dynamic_log_link is not a field of the task decorator at the moment) Assume that by setting dynamic_log_link="def" I'm setting a field in `t`'s task template to indicate that I want def to be generated as a dynamic log link. In the backend, we use that information to ensure that only def is applied to executions of t.
The idea is that at registration time tasks are going to use a comma-separated property called link_type set in the task template metadata and we're going to use that to control which dynamic log links are going to produced for that task.
Describe alternatives you've considered
I implemented a version of this idea in #4610, but that failed short when it came to extensibility.
Propose: Link/Inline OR Additional context
No response
Are you sure this issue hasn't been raised already?
• Yes
Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
03/03/2025, 5:28 PM