You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sdk): Use display_name for Kubernetes pod names
Enables set_display_name() to affect Kubernetes pod names for container
tasks, improving cluster-side debugging and resource monitoring.
Benefits:
- Easier debugging: Pod names match display names, simplifying task
identification in kubectl, logs, and monitoring tools
- Resource monitoring: In ParallelFor loops, each iteration's pod has a
clear name, enabling per-component resource usage tracking
- Better observability: Metrics and logs can be easily correlated with
pipeline tasks
Changes:
- pipeline_task.py: Enhanced set_display_name() to handle
LoopArgumentVariable objects from ParallelFor loops
- pipeline_spec_builder.py:
- Use sanitized display_name as DAG task key for container tasks
- Fix producer task references in groups (ParallelFor, Condition,
ExitHandler) to use correct DAG keys
- Ensure uniqueness and enforce Kubernetes naming constraints
Features:
- Display names are sanitized and used for pod names
- Supports loop variables: task.set_display_name(f"task-{loop_var.field}")
- Handles duplicate names with automatic suffix
- Truncates to fit Kubernetes 63-char limit
- Fully backward compatible
Fixes:
- Resolves "unknown producer task" error when using display_name in groups
Testing:
- Added unit tests for display_name functionality
- Tested with ParallelFor loops
- Verified backward compatibility
Related to: #12434
Signed-off-by: wassimbensalem <bswassim@gmail.com>
0 commit comments