Skip to content

user-guide: add a doc about resolving merge-conflicts#1684

Merged
jorgeorpinel merged 5 commits into
masterfrom
merge-driver
Aug 19, 2020
Merged

user-guide: add a doc about resolving merge-conflicts#1684
jorgeorpinel merged 5 commits into
masterfrom
merge-driver

Conversation

@efiop
Copy link
Copy Markdown
Contributor

@efiop efiop commented Aug 10, 2020

treeverse/dvc#4298

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.

🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.

Please choose to allow us to edit your branch when creating the PR.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@efiop efiop changed the title user-guide: add a doc about resolving merge-conflicts [WIP] user-guide: add a doc about resolving merge-conflicts Aug 10, 2020
@shcheklein shcheklein temporarily deployed to dvc-landing-merge-drive-c1rzah August 10, 2020 12:40 Inactive
@shcheklein shcheklein temporarily deployed to dvc-landing-merge-drive-c1rzah August 10, 2020 13:42 Inactive
Comment thread content/docs/sidebar.json Outdated
Comment thread content/docs/user-guide/merge-conflicts.md Outdated
Comment on lines +34 to +41
You can safely delete this file and then just run `dvc repro` after the merge is
done.

```
prepare:
cmd: python src/prepare.py data/data.xml
deps:
<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repro or commit?

Maybe no YAML sample is needed here since the rec is to delete it and regenerate it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to repro. Commit might have unexpected results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I missed this one. OK but maybe we should mention both options?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think if there's more than one option they should at least be briefly mentioned.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could mention commit but only as something that people shouldn't really use here because it might bring unexpected results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I would handle that separately later. This doc is about the proper way to do things.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll remove the mention. I don't understand what unexpected results you're referring to though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgeorpinel It will commit whatever trash you might have in your output, which might not be what you want.

Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel Aug 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. I guess the data in the machine that os merging would correspond to the HEAD version so commit only works if you decide to keep that version. So you're right, not worth mentioning that case, probably. Except that commit will be much faster and efficient than repro in that case (unless this run config is in the local machine's run-cache)...

Comment on lines +110 to +140
### dvc import-url

Simply remove the hashes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as dvc import so maybe just combine the H3 headers and merge these sections?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yamls are different, so better to keep them separate.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact YAML samples belong to those cmd refs I think. In terms of the merging, which is what this doc is about, seems to be the same so I think we could summarize the doc substantially by merging them 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those yamls are not the same and illustrate conflicts in different places, let's leave them be.

Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like I'm taking over this one so will combine them. Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgeorpinel Your call, but I wouldn't combine them.

Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed your comments here Ruslan, sorry. Hmmm WDYT @shcheklein ? I think if the process is the same for import and import-url then a single section is enough and prevents us from having to maintain 2 YAML examples. On the other hand there's no huge need to optimize the last part of the doc, so no strong opinion actually.

Comment thread content/docs/user-guide/merge-conflicts.md Outdated
Comment thread content/docs/user-guide/merge-conflicts.md Outdated
@jorgeorpinel jorgeorpinel temporarily deployed to dvc-landing-merge-drive-c1rzah August 10, 2020 16:23 Inactive
Comment thread content/docs/user-guide/merge-conflicts.md Outdated
@jorgeorpinel
Copy link
Copy Markdown
Contributor

Super cool doc, thanks @efiop ! Please let us know when you'd like us to review it. I just did a quick read so far.

@efiop efiop changed the title [WIP] user-guide: add a doc about resolving merge-conflicts user-guide: add a doc about resolving merge-conflicts Aug 11, 2020
@shcheklein shcheklein temporarily deployed to dvc-landing-merge-drive-c1rzah August 11, 2020 12:07 Inactive
Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one pending recommendation from me: #1684 (review)

No super strong opinion though, so feel free to merge this if you disagree.

Comment thread content/docs/user-guide/merge-conflicts.md Outdated
Comment thread content/docs/user-guide/merge-conflicts.md
@shcheklein
Copy link
Copy Markdown
Contributor

@jorgeorpinel what is the status of this? Can we merge this? Looks like only some minor things left?

@efiop @jorgeorpinel should we put some links to dvc add, dvc run, any other places, to this doc?

@efiop great start, good and simple summary of different possibilities.

Comment thread content/docs/user-guide/merge-conflicts.md Outdated
@jorgeorpinel
Copy link
Copy Markdown
Contributor

Can we merge this? Looks like only some minor things left?

I approved this some time ago 🙂 although
a) I think it could be shortened as explained in #1684 (review).
b) I just noticed another possibly relevant question, see #1684 (review) above.

put some links to dvc add, dvc run, any other places, to this doc?

OK hold on... ⌛

address all pending feedback so far
e.g. #1684 (review)
et al.
- path: data.xml
```

And then run `dvc repro`.
Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't import stages need to be unfrozen first? @efiop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Indeed, better to just use dvc update for imports.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, updated!

Copy link
Copy Markdown
Contributor

@jorgeorpinel jorgeorpinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took this over.

@jorgeorpinel jorgeorpinel merged commit 287eaec into master Aug 19, 2020
@efiop efiop deleted the merge-driver branch August 19, 2020 14:54
Comment on lines +82 to +83
git config merge.dvc.name "DVC merge driver"
git config merge.dvc.driver "dvc git-hook merge-driver --ancestor %O --our %A --their %B"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all these be ' single quotes @efiop ? Or is it all the same.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter in this case for *nix, but might indeed be problematic for windows. Good catch! Adjusted in 7a65f11 . Thank you! 🙏

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants