-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(sdk): Use display_name for Kubernetes pod names #12435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(sdk): Use display_name for Kubernetes pod names #12435
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @wassimbensalem. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
d79b4e5 to
9cf53c2
Compare
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: kubeflow#12434
Signed-off-by: wassimbensalem <bswassim@gmail.com>
9cf53c2 to
4c11aee
Compare
|
/ok-to-test |
- Remove unused import (constants) - Apply YAPF formatting - Fix docstring formatting - Ensure all formatting checks pass Signed-off-by: wassimbensalem <bswassim@gmail.com>
|
can we test? |
Summary
Enables
set_display_name()to affect Kubernetes pod names for container tasks, improving cluster-side debugging and resource monitoring.Benefits
Changes
set_display_name()to handleLoopArgumentVariableobjects from ParallelFor loopsdisplay_nameas DAG task key for container tasksFeatures
task.set_display_name(f"task-{loop_var.field}")Fixes
Testing
Related
Closes #12434