microsoft / microsoft/azure-devops-go-api

Unable to create Pipeline: Value cannot be null. Parameter name: Path

Open
#143 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I am currently trying to create a pipeline with a PAT token with full access:

var (
	AzDoEnvironmentPipelineName   = "test"
	AzDoEnvironmentPipelineFolder = "Applications"
	AzDoEnvironmentOrgName = "xxx"

	AzDoEnvironmentProjectName = "xxx"
)	

// inside a function	
CreatePipelineConfigurationParameters := pipelines.CreatePipelineConfigurationParameters{
	Type: &pipelines.ConfigurationTypeValues.Yaml,
}
CreatePipelineParameters := pipelines.CreatePipelineParameters{
	Name:          &AzDoEnvironmentPipelineName,
	Folder:        &AzDoEnvironmentPipelineFolder,
	Configuration: &CreatePipelineConfigurationParameters,
}

pipeline, err := pipelineClient.CreatePipeline(ctx, pipelines.CreatePipelineArgs{
	Project:         &AzDoEnvironmentProjectName,
	InputParameters: &CreatePipelineParameters,
})
if err != nil {
	fmt.Println("Error creating pipeline:", err)
	os.Exit(1)
}

However, this error is printed:

Error creating pipeline: Value cannot be null.Parameter name: Path

Checking on the library docs i am not able to find "Path" anywhere

Is this a bug?

Expected behavior: I expect it to work or at least have a clearer error message

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at pipelineClient.CreatePipeline and trace how CreatePipelineParameters is serialized into the Azure DevOps request. Compare the request fields with the pipeline creation API requirements, especially the missing Path value, and reproduce the reported error with the example. Done means the request succeeds or returns a clearer validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.