Link
This class defines a protocol for generating task log links based on specific execution metadata such as run, project, and action names. It provides a standardized interface for retrieving URIs that can include template variables for backend replacement. Implementations must provide the logic for constructing these links using the provided context and identifiers.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | str | The display name of the link used for identification and labeling in the user interface. |
| icon_uri | Optional[str] = "" | The URI pointing to an icon image associated with the link, defaulting to an empty string if no icon is specified. |
Methods
get_link()
@classmethod
def get_link(
run_name: str,
project: str,
domain: str,
context: Dict[str, str],
parent_action_name: str,
action_name: str,
pod_name: str,
**kwargs: Any
) - > str
Returns a task log link given the action. Link can have template variables that are replaced by the backend.
Parameters
| Name | Type | Description |
|---|---|---|
| run_name | str | The unique identifier for the specific execution run |
| project | str | The name of the project associated with the task |
| domain | str | The domain name under which the task is categorized |
| context | Dict[str, str] | A dictionary of additional key-value pairs used to provide context for link generation |
| parent_action_name | str | The name of the parent action in the execution hierarchy |
| action_name | str | The name of the specific action for which the link is being generated |
| pod_name | str | The name of the Kubernetes pod where the task execution occurred |
| **kwargs | Any | Additional keyword arguments for extensibility and custom link parameters |
Returns
| Type | Description |
|---|---|
str | The generated link string, potentially containing template variables for backend replacement |