Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

This PR improves the clarifai pipeline init command by updating the Argo workflow template generation to include input arguments and remove unnecessary metadata fields.

Problem

The pipeline init command was generating Argo workflow specifications that:

  1. Lacked input arguments for pipeline steps, making it harder to pass parameters between steps
  2. Included metadata.generateName which is not needed in the base template

Solution

Updated the get_pipeline_config_template() function in clarifai/cli/templates/pipeline_templates.py to:

Add Arguments.Parameters to Steps

Each pipeline step now includes structured input arguments:

templateRef:
  name: users/test-user/apps/test-app/pipeline_steps/stepA
  template: users/test-user/apps/test-app/pipeline_steps/stepA
arguments:
  parameters:
    - name: input_text
      value: "Input Text Here"

Remove metadata.generateName

The Argo workflow spec no longer includes the generateName field:

Before:

metadata:
  generateName: pipeline-name-
spec:
  entrypoint: sequence

After:

spec:
  entrypoint: sequence

Benefits

  • Better Parameter Handling: Pipeline steps now have a clear structure for receiving input parameters
  • Cleaner Templates: Removed unnecessary metadata field that cluttered the base template
  • Improved Developer Experience: Users can immediately see how to pass arguments to their pipeline steps

Testing

  • Validated template generation with 1, 2, and 3 step scenarios
  • Confirmed both requirements are met in generated YAML output
  • Security analysis completed with 0 alerts
  • No impact on existing functionality - changes are isolated to template generation
Original prompt

This section details on the original issue you should resolve

<issue_title>PIPE-1091: Improve Pipeline Init Command - add Arguments.Parameters to steps and remove metadata.generateName in Argo WF spec</issue_title>
<issue_description>Improve clarifai pipeline init command:

  1. Add input arguments for the steps in argo workflow spec in config.yaml for pipeline
    e.g.
          templateRef:
            name: ...
            template: ...
          arguments:
                parameters:
                  - name: input_text
                    value: "Input Text Here"
  1. Remove metadata.generateName in YAML string in pipeline.orchestration_spec.argo_orchestration_spec</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #818


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…emove metadata.generateName

Co-authored-by: nitinbhojwani <9331380+nitinbhojwani@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve pipeline init command by adding arguments.parameters PIPE-1091: Improve Pipeline Init Command - Add Arguments.Parameters and Remove metadata.generateName Oct 22, 2025
Copilot AI requested a review from nitinbhojwani October 22, 2025 15:06
@nitinbhojwani nitinbhojwani marked this pull request as ready for review October 23, 2025 05:36
@github-actions
Copy link

Code Coverage

Package Line Rate Health
clarifai 48%
clarifai.cli 44%
clarifai.cli.templates 33%
clarifai.client 67%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 72%
clarifai.runners 53%
clarifai.runners.models 58%
clarifai.runners.pipeline_steps 41%
clarifai.runners.pipelines 70%
clarifai.runners.utils 63%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 60%
clarifai.utils 60%
clarifai.utils.evaluation 67%
clarifai.workflows 95%
Summary 62% (8164 / 13273)

Minimum allowed line rate is 50%

@nitinbhojwani nitinbhojwani merged commit 8b77684 into master Oct 23, 2025
11 checks passed
@nitinbhojwani nitinbhojwani deleted the copilot/improve-pipeline-init-command branch October 23, 2025 15:07
srikanthbachala20 pushed a commit that referenced this pull request Oct 24, 2025
…nd Remove metadata.generateName (#819)

* Initial plan

* Implement PIPE-1091: Add arguments.parameters to pipeline steps and remove metadata.generateName

Co-authored-by: nitinbhojwani <9331380+nitinbhojwani@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nitinbhojwani <9331380+nitinbhojwani@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

PIPE-1091: Improve Pipeline Init Command - add Arguments.Parameters to steps and remove metadata.generateName in Argo WF spec

3 participants