locked
ADF Project code repository with Azure repos git - Conflict management RRS feed

  • Question

  • ADF Team,

    For below scenario, Can you guys tell us how to maintain ADF code repo with Azure devops git?

    3 developers developing 3 pipelines, say dev1  - p1, dev2 - p2 and dev3 - p3

    Each created their own branches on ADF UX and started working (when they created branch they get all 3 pipelines)

    after code complete when they do 'pull request' to master (collobaration) branch they are getting conflicts as their copy of pipelines not matching master branch. (for dev1, there are conflicts with P2 as it was already checked in by Dev2 with his changes ). Please let me know how to resolve these type of code conflicts OR atleast how to prevent conflicts in this scenario?

    Monday, September 2, 2019 5:26 PM

All replies

  • Hello mcPrakash and thank you for your inquiry.  I experienced something similar.  What I did, in that case, was pull from the branch I intend to merge with before merging.  My experience went as follows:

    1. A master branch exists with resources A, B, C
    2. Developer #1 branches off into branch Dev1
    3. Dev1 commits change to resource A
    4. Developer #2 branches off into branch Dev2
    5. Dev2 commits change to resource B
    6. Dev2 merges back to master branch, changing resource B
    7. If Dev1 attempts to merge to master, the conflict arises as whether old or new version of B should be used.  Do not merge.
    8. Dev1 does a pull request from master branch to Dev1.  This updates resource B in Dev1, but leaves resource A intact.
    9. Dev1 now can merge back to master branch, keeping Dev2's changes to resource B, while updating resource A

    This is how to handle conflicts when a resource is edited by only one developer at a time.  If Developer #1 and Developer #2 both were making changes to the same resource, a manual conflict resolution would be required.

    Please let me know if this helps.

    Monday, September 2, 2019 9:13 PM
  • Thanks Martin,

    your 8th point : Dev1 does a pull request from master branch to Dev1.  This updates resource B in Dev1, but leaves resource A intact.

    What if Dev1 had already done some changes in resource A? wont it raise a conflict as its master copy not matching with his local copy? OR will it not over write his changes?


    • Edited by mcprakash Tuesday, September 3, 2019 8:16 AM
    Tuesday, September 3, 2019 4:34 AM
  • The version of resource A in Dev1 is ahead of the version in master.  This sense of 'ahead' is not exactly in reference to datetime, but in reference to the order that commits were made.  In the example I made, Dev1 does make a change to resource A.  Dev1's changes are preserved because they are 'ahead' of the last change made to resource A in master branch.

    If Dev2 had made changes to both resource A and resource B, then there would be a conflict.

    Thursday, September 5, 2019 1:03 AM