Skip to content

Fix conditional input paths handling for Argo DAG generation - #3052

Open
devendrakushwah80 wants to merge 7 commits into
Netflix:masterfrom
devendrakushwah80:fix-argo-conditional-input-paths
Open

Fix conditional input paths handling for Argo DAG generation#3052
devendrakushwah80 wants to merge 7 commits into
Netflix:masterfrom
devendrakushwah80:fix-argo-conditional-input-paths

Conversation

@devendrakushwah80

Copy link
Copy Markdown

This PR fixes an issue where unresolved {{tasks.*}} expressions
were passed into Argo DAG input paths, causing ReplaceStrict failures.

Changes:

  • Filter unresolved template expressions in conditional_input_paths.py
  • Handle conditional paths earlier during DAG generation

Result:

  • Prevents workflow requeue loops
  • Ensures only resolved input paths are used

@greptile-apps

greptile-apps Bot commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes Argo DAG input-path generation so conditional parent task IDs are resolved through Argo expressions before unresolved or empty paths are removed.

  • Builds expression-aware input paths for conditional DAG parents.
  • Filters unresolved templates and paths whose task-ID segment is empty.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
metaflow/plugins/argo/argo_workflows.py Generates status-aware task-ID expressions for conditional parents while retaining the existing compressed representation for ordinary parents.
metaflow/plugins/argo/conditional_input_paths.py Filters unresolved template expressions and empty task-ID path segments before selecting conditional inputs.

Reviews (5): Last reviewed commit: "git push origin fix-argo-conditional-inp..." | Re-trigger Greptile

Comment thread metaflow/plugins/argo/argo_workflows.py Outdated
Comment thread metaflow/plugins/argo/argo_workflows.py Outdated
Comment thread metaflow/plugins/argo/conditional_input_paths.py
Comment thread metaflow/plugins/argo/argo_workflows.py

@Shriprasad-P Shriprasad-P left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

PR: Fix conditional input paths handling for Argo DAG generation

Touched: metaflow/plugins/argo/argo_workflows.py, metaflow/plugins/argo/conditional_input_paths.py

  • Addresses a concrete correctness/reliability issue based on the title and diff.
  • CI/tooling change — confirm the pipeline still passes on this branch.
  • Size looks manageable (+37/-12).

Commenting as a drive-by reviewer after reading the diff. Happy to look again if maintainers want a deeper pass on a specific file.

… branch 'upstream/master' into fix-argo-conditional-input-paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants