Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix the data factory v2 adf_publish branch being out of sync with the master branch in azure devops

Recently I ran into the issue with not being able to publish in azure data factory integrated with azure devops/git. This happened because we tried using powershell to automatically create pipelines based on a json template. When this is done in the data factory using Set-AzDataFactoryV2Pipeline, you by-pass the azure devops integration and the pipeline gets published right away without any commits or pull requests. Below is the error message

Publishing Error

The publish branch is out of sync with the collaboration branch. This is likely due to publishing outside of Git mode. To recover from this state, please refer to our Git troubleshooting guide

like image 559
Cedersved Avatar asked Oct 31 '25 18:10

Cedersved


1 Answers

The MS GIT troubleshooting guide suggests some hardcore measures to resolve this out-of-sync issues (by deleting and re-creating the repo I believe). In this case, there's an easier and less hardcore way of solving this.

You simply need to:

  • Create a new branch from your master branch in data factory
  • Create the same pipeline you created via Set-AzDataFactoryV2Pipeline
  • Create a pull request and merge it into master

Voila, you'll hopefully be able to publish again as it now will consider the branches to be in sync again

like image 130
Cedersved Avatar answered Nov 02 '25 13:11

Cedersved