-
Notifications
You must be signed in to change notification settings - Fork 930
Add Argo workflow title & description support #2628
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
Changes from 3 commits
d972a30
b62c76b
f46a116
9293cc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -227,6 +227,18 @@ def argo_workflows(obj, name=None): | |
| show_default=True, | ||
| help="Capture stack trace of first failed task in exit hook.", | ||
| ) | ||
| @click.option( | ||
| "--workflow-title", | ||
| default=None, | ||
| type=str, | ||
| help="Custom title for the workflow displayed in Argo Workflows UI. Defaults to `project_flow_name`. Supports markdown formatting.", | ||
| ) | ||
| @click.option( | ||
| "--workflow-description", | ||
| default=None, | ||
| type=str, | ||
| help="Custom description for the workflow displayed in Argo Workflows UI. Defaults to the flow's docstring if available. Supports markdown formatting and multi-line text.", | ||
| ) | ||
|
Comment on lines
+230
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an existing use-case for the CLI options for setting custom title/description that warrants adding these as well? Not opposed to adding this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The markdown support does not seem to be working, unless there's something off with my argo setup?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The CLI flags let users provide concise, meaningful titles and descriptions (e.g. ETL [Prod], ML Pipeline v2.3.1) without changing code or flow names. It’s fully optional and backward-compatible, just giving flexibility for UI readability and dynamic deployments.
Verified working with Argo Workflows v3.6+ - headers, bold/italic, and multi-line formatting render correctly. Older UI versions may flatten multi-line text. |
||
| @click.pass_obj | ||
| def create( | ||
| obj, | ||
|
|
@@ -248,6 +260,8 @@ def create( | |
| incident_io_alert_source_config_id=None, | ||
| incident_io_metadata=None, | ||
| enable_heartbeat_daemon=True, | ||
| workflow_title=None, | ||
| workflow_description=None, | ||
| deployer_attribute_file=None, | ||
| enable_error_msg_capture=False, | ||
| ): | ||
|
|
@@ -312,6 +326,8 @@ def create( | |
| incident_io_metadata, | ||
| enable_heartbeat_daemon, | ||
| enable_error_msg_capture, | ||
| workflow_title, | ||
| workflow_description, | ||
| ) | ||
|
|
||
| if only_json: | ||
|
|
@@ -658,6 +674,8 @@ def make_flow( | |
| incident_io_metadata, | ||
| enable_heartbeat_daemon, | ||
| enable_error_msg_capture, | ||
| workflow_title, | ||
| workflow_description, | ||
| ): | ||
| # TODO: Make this check less specific to Amazon S3 as we introduce | ||
| # support for more cloud object stores. | ||
|
|
@@ -750,6 +768,8 @@ def make_flow( | |
| incident_io_metadata=incident_io_metadata, | ||
| enable_heartbeat_daemon=enable_heartbeat_daemon, | ||
| enable_error_msg_capture=enable_error_msg_capture, | ||
| workflow_title=workflow_title, | ||
| workflow_description=workflow_description, | ||
| ) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider keeping the title as the current.project_flow_name or current.flow_name and description as the doc strring of the flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed changes