The path 'xxx' specified in the add operation already exists. Please specify a new path

{tocify} $title={Table of Contents}


Error/Issue:

Today I had to do some changes in already existing Azure Data Factory pipeline, so followed the steps

i. Renamed the existing pipeline by appending _bkp (Report_Count -->Report_Count_bkp)

creating clone of pipeline


ii. Then clicked on the ellipsis and selected clone

iii. And named the newly created pipeline as Report_Count

iv. Then clicked on save and to surprise, it wasn't saved and error was thrown


The path 'xxx' specified in the add operation already exists. Please specify a new path

                           


Why it happened


{"$id":"1","innerException":null,"message":"The path '//pipeline/Report_Count.json' specified in the add operation already exists. Please specify a new path.\r\nParameter name: newPush","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}


As highlighted above, I was trying to save (behind the scene - push to Azure Devops as it is integrated with ADF) a new file (although cloned and no changes done). But there was already a pipeline saved in the repository with the same name  as highlighted in the error.

Note: ADF pipeline are saved as JSON file

Makes sense, as before cloning, the name of original Pipeline was Report_Count, so it already had a placeholder in repository and when I tried to save new pipeline(cloned one) with same name there was a conflict and thus the error.

You might get question in mind,  why not it was simply overwritten? 

The reason is - although I renamed the original pipeline  before creating a clone from it, I hadn't saved it. Thus the repository path remained unchanged even though on editor file name appeared to be changed.


What to do



To avoid such scenario, keep focus while working 😏.

We can take either of the approach 

i.  Whenever you rename a file - save it and validate it i.e. before creating clone of it
ii. Better to keep the original pipeline untouched and create a clone having new name (I did this)


If you have some another approach or findings around this error, share it in comment!!

If you have questions or suggestions, feel free to do in comments section below !!!


Do share if you find this helpful .......
 
                          Knowledge Sharing is Caring !!!!!!


Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post