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

Test "resolve conflicts" even when the PR is not checked out #5939

Closed
4 tasks done
alexr00 opened this issue Apr 22, 2024 · 3 comments
Closed
4 tasks done

Test "resolve conflicts" even when the PR is not checked out #5939

alexr00 opened this issue Apr 22, 2024 · 3 comments

Comments

@alexr00
Copy link
Member

alexr00 commented Apr 22, 2024

Refs: #5802

Complexity: 5

Create Issue


To test, you'll need a PR with some merge conflicts. If you have some real-world merge conflicts (ex. an old PR that you have left setting around for a while, or some lucky, more current, merger conflicts) please do use those for testing! If you use real-world merge conflicts, you might want to make a back up of your PR branch just in case something goes wrong. If you don't have any merge conflicts, you can quickly create some:

  • Checkout the branch that you want to make a PR into (this is your base branch)
  • Note what lines the most recent couple commits touch
  • Go a couple commits back by doing git checkout <a few commits old sha>
  • Create your PR branch by doing git checkout -b <your new branch name>
  • Make a commit on your PR branch that modifies some of the lines that you noted above.
  • Make a PR from your PR branch to the original branch.

Steps to get to the "resolve conflicts" flow:

  • Install the pre-release version of GitHub Pull Requests
  • Set "githubPullRequests.experimentalUpdateBranchWithGitHub": true
  • Desktop testers: Do not have the PR branch with conflicts checked out. Checkout any other branch.
  • Find and expand your PR in the "Pull Requests" view. If you can't easily find it there, you can add a new query to the view using the "..." menu in the view.
  • Open the PR description and scroll down to the checks. You should see a "Resolve conflicts" button.

Things to verify:

Note: please see the known issues!

  • Renames are not allowed to be resolved using this feature.
  • Only files that were modified in both the base branch and the PR branch show in the "Conflict resolution" view.
  • You can figure out how to resolve conflicts using the "Conflict resolution" view.
  • You can figure out how to exit conflict resolution and delete all your changes.
  • You can tell when you've resolved all the conflicts.
  • You can understand what you're looking at when you click on a file that you've already resolved the conflicts for.
  • You can figure out how to "submit" all your resolutions and make your merge commit to the PR branch.
  • After you've completed and committed your conflict resolutions, go back through all the changes in the PR and make sure they are correct.

Known issues:

  • Files without merge conflicts but that were modified in both the base and PR branches will show in the "Conflict resolution" view.
  • Only works for PR branches where 300 or fewer files have changed between the PR branch and the base branch current head.
@deepak1556
Copy link

Doesn't seem to work on web as expected #5940, @alexr00 is looking into it for unblocking testing.

@alexr00 alexr00 removed the blocked label Apr 23, 2024
@alexr00
Copy link
Member Author

alexr00 commented Apr 23, 2024

Testing is only blocked for PRs where more than 300 files have changed between the PR branch and the base branch head. I don't see a good way around this to unblock for testing this case, so please limit testing to PR branches that have 300 or fewer files that have changed between the PR branch head and the base branch head.

@Tyriar
Copy link
Member

Tyriar commented Apr 23, 2024

Throughout my testing on real world PRs I was not able to actually resolve any conflicts due to #5945 and no able to commit resolutions due to #5953

Maybe that's because all my PRs have > 300 files changed, not sure. Better error messages for the above would be helpful

@Tyriar Tyriar closed this as completed Apr 23, 2024
@Tyriar Tyriar removed their assignment Apr 23, 2024
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

6 participants