Skip to content

feat: introduce project-id argument

Igor Drozdov requested to merge id-introduce-project-id-arg into main

Overview

Currently, the clients create workflows via API requests before starting the executor (for example, LSP). When other clients start using Duo Workflow Executor they'll have to perform API requests as well.

Proposal

Introduce project-id argument and pass it to Duo Workflow Service. When project-id argument is passed instead of workflow-id argument then Duo Workflow Service can create a workflow via API request.

Duo Workflow Service MR: feat: introduce project-id argument (!27)

Testing

Run:

./bin/duo-workflow-executor --project-id="2" --base-url="http://gdk.test:3000" --token=$GITLAB_TOKEN --user-id=1 --goal='Can you fix the pipeline for the Merge request: 15 in the project 2.
  You will have to clone the repository if you need to fix files. You can use the `run_command` tool to do so."
  Please also checkout the right branch before making the changes.
  You can fetch the repository name from the `get_project` tool.

  Once you have fixed the pipeline please push the code to the same branch.'

The behavior stays the same. When action here is logged, then an additional http request appears:

runHTTPRequest:{method:"POST" path:"/api/v4/ai/duo_workflows/workflows" body:"{\"project_id\": \"2\"}"}
runHTTPRequest:{method:"GET" path:"/api/v4/ai/duo_workflows/workflows/6/checkpoints"}
Edited by Igor Drozdov

Merge request reports

Loading