Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare & Resolve Conflicts on Deploy #870

Closed
ntotten opened this issue Jan 14, 2019 · 4 comments
Closed

Compare & Resolve Conflicts on Deploy #870

ntotten opened this issue Jan 14, 2019 · 4 comments

Comments

@ntotten
Copy link
Contributor

ntotten commented Jan 14, 2019

There are several scenarios where developers can run into conflicts. When working against a scratch org, source:push/pull will detect conflicts and warn the developer of local or remote files that have changes that cannot be resolved. When working against non-scratch orgs, we will also be adding some basic conflict detection on source:deploy/retrieve (see: #633). In both of these cases, the only thing we currently do is fail the operation and warn the user of the conflicts. The only way to resolve the conflicts is to manually determine what files changed, manually merge/delete/etc. and then repeat the push/pull/deploy/retrieve operation with the --force flag. While it is good that developers are warned as to not overwrite files, the task of resolving conflicts is difficult.

A more desirable option would be to replicate what VS Code does for git workflows and allow the user to review and merge conflicts using the UI. See: https://code.visualstudio.com/docs/editor/versioncontrol#_merge-conflicts

@ntotten ntotten changed the title Resolve Conflicts on Deploy Compare & Resolve Conflicts on Deploy Jan 14, 2019
@FabienTaillon
Copy link

When you say "Deploy", does it includes saving from vscode to a sandbox ?

@ntotten
Copy link
Contributor Author

ntotten commented Jan 15, 2019

@FabienTaillon It will be for any type of org. I just updated the description with the basic info.

@GH4Arlene
Copy link

As requested, here is our use case for Conflict detection on Deploy/Retrieve. We are excited about this planned feature. While we use git religiously, we are not ready yet for CI. Our highly integrated and ever-evolving data model makes creating new sandboxes very time-consuming. We therefore work in shared project sandboxes, ostensibly in different parts of the code. However, utility, service, and model classes are occasionally contention points when two of us accidentally start modifying those files simultaneously. When we recognize that, we can negotiate. The danger is that we won’t recognize it, and will overwrite one another’s changes. We have a work-around in place that forces a git pull/push to a shared repository before every save to the org. If the pull fails due to a file conflict, the deploy to the org does not occur. It works. But it is slow. If the conflicts could be detected on Deploy/Retrieve, we could return to a more standard model of pushing to git several times a day, not every few minutes, saving considerable time, and making our git history more useful.

While conflict resolution tools would be useful, simple conflict detection would be a huge step foward for us. Thank you for everything you are doing with this tool!

@smaddox-sf
Copy link
Contributor

Our first iteration of Conflict Detection is now live. Check out the details in our [documentation] (https://developer.salesforce.com/tools/vscode/en/user-guide/detect-conflicts). We’d like your input on the next iteration - please review the spec & add comments there with any feedback. Closing this issue to consolidate the conversation to one place.

@ntotten ntotten closed this as completed Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants