mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 15:59:57 +00:00
* Add logic to handle WorkflowContext on Ingestion * Revert base.py changes * Removed comment * Fix basedpyright complaints * Make ContextManager automatically add its context to the PipelineStatus * Small changes (cherry picked from commit 5b20b845462cfcb568b92dbf22e160226433fae5)
30 lines
745 B
Python
30 lines
745 B
Python
"""
|
|
Workflow context definition.
|
|
|
|
This module defines the WorkflowContext, which holds workflow-level metadata such as the service name.
|
|
It is registered with the ContextManager for attribute-based access throughout the workflow system.
|
|
"""
|
|
from typing import Union
|
|
|
|
from pydantic import Field
|
|
|
|
from .base import BaseContext, BaseContextFieldsEnum
|
|
|
|
|
|
class WorkflowContextFieldsEnum(BaseContextFieldsEnum):
|
|
"""
|
|
Enum defining all available workflow context fields.
|
|
"""
|
|
|
|
SERVICE_NAME = "serviceName"
|
|
|
|
|
|
class WorkflowContext(BaseContext):
|
|
"""
|
|
Context for workflow-level metadata.
|
|
"""
|
|
|
|
serviceName: Union[str, None] = Field(
|
|
default=None, description="Name of the service on which the workflow operates"
|
|
)
|