Share via

Azure Devops - Pull Request - Compare unmodified file state with 'develop'

Dave Carson 21 Reputation points
2020-10-16T09:25:44.647+00:00

We make use of Entity Framework 'Code First', generating migrations which updates our ModelSnapshot.

Consider this scenario:

  • Developers A & B both start a feature from the same 'develop' branch state. Both need to generate a Migration for their respective feature.
  • Both Developers submit their pull requests, each containing their Migration and updated ModelSnapshot
  • Developer A's Pull Request is approved and successfully merged into 'develop'
  • Developer B's Pull Request is approved and successfully merged into 'develop'

The problem is that the ModelSnapshot in 'develop' will no longer contain Developer A's changes.

(Note that Developer B's Pull Request may not be present when approving Developer A's - it may just have been created without integrating with 'develop' to pick up the updated ModelSnapshot - the result is the same)

Currently we have to manually check this prior to approving a Pull Request that contains Migrations but sometimes this is missed (we are all human after all).

Is there a mechanism in DevOps to check the state of a files 'unmodified/before' state with the state of the file in another branch, e.g. 'develop'?

How do others manage this situation - we can't be the only ones having this issue.

Community Center | Not monitored
0 comments No comments

Answer accepted by question author

Vaibhav Chaudhari 39,011 Reputation points Volunteer Moderator
2020-10-16T09:30:23.593+00:00

Azure DevOps related questions are not supported currently on this forum. Would suggest to post question in dedicated forum in below

https://developercommunity.visualstudio.com/spaces/21/index.html


Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Dave Carson 21 Reputation points
    2020-10-16T12:35:56.813+00:00

    Thanks for the link (I did wonder when I didn't get any relevant Tags appearing) - although it was AzureSupport on Twitter that gave me this link :-(

    32896-image.png

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.