Skip to content
This repository was archived by the owner on Jul 14, 2020. It is now read-only.
This repository was archived by the owner on Jul 14, 2020. It is now read-only.

Unexpected merge conflicts after first sync #33

@pholleran

Description

@pholleran

Overview

After successfully syncing the first commit, all future commits create merge conflicts.

Environment

  • gjtorikian/repository-sync running on a local (mac) machine or a CentOS 6.5 server in amazon (tried both)
  • a repository testDotCom hosted on GitHub.com
  • a repository testEnterprise hosted on GitHub Enterprise
  • ngrok running when testing on local machine

Steps to reproduce

  • create a new repo on GitHub.com testDotCom and initialize with a readme
    • repo consists of a single README.md with a single line of text
  • clone the created repo locally
  • create a new repo on GitHub Enterprise testEnterprise
  • add GitHub Enterprise as a remote to the local repo and push
    • git remote add enterprise <path>
    • git push -u enterprise master
  • set up webhooks (with secret token):
    • GitHub.com: http://<ngrokOrAWSPath>/sync?sync_method=squash&dest_repo=org/testEnterprise&destination_hostname=HOST
    • Enterprise: http:///sync?sync_method=squash&dest_repo=<owner/Repo>
  • verify webhooks are functioning using initial test payload
  • Add a new line of text to README.md in the Enterprise repo (commit to master for simplicity's sake)
    • app runs as expected
  • Add another new line of text to README.md in the Enterprise repo (commit to master)
    • Merge conflict
22:17:57 web.1    | 34.203.78.129 - - [06/May/2017:22:17:57 -0500] "POST /sync?dest_repo=pholleran%2FtestDotCom&sync_method=squash HTTP/1.1" 200 - 0.0027
22:18:02 worker.1 | I, [2017-05-06T22:18:02.308863 #27884]  INFO -- : New Cloner instance initialized
22:18:02 worker.1 | I, [2017-05-06T22:18:02.309639 #27884]  INFO -- : Cloning pholleran/testDotCom from github.com...
22:18:02 worker.1 | I, [2017-05-06T22:18:02.788834 #27884]  INFO -- : Adding remote for pH-Inc/testEnterprise on octodemo.com...
22:18:02 worker.1 | I, [2017-05-06T22:18:02.801196 #27884]  INFO -- : Fetching pH-Inc/testEnterprise...
22:18:03 worker.1 | I, [2017-05-06T22:18:03.353612 #27884]  INFO -- : Checking out update-1494127083
22:18:03 worker.1 | I, [2017-05-06T22:18:03.353775 #27884]  INFO -- : Running command git checkout -b update-1494127083
22:18:03 worker.1 | I, [2017-05-06T22:18:03.359626 #27884]  INFO -- : Result: Switched to a new branch 'update-1494127083'
22:18:03 worker.1 | 
22:18:03 worker.1 | I, [2017-05-06T22:18:03.359763 #27884]  INFO -- : Squashing pH-Inc/testEnterprise/master into update-1494127083...
22:18:03 worker.1 | I, [2017-05-06T22:18:03.359832 #27884]  INFO -- : Running command git merge --squash otherrepo-1494127082/master
22:18:03 worker.1 | I, [2017-05-06T22:18:03.366705 #27884]  INFO -- : Result: Auto-merging README.md
22:18:03 worker.1 | CONFLICT (content): Merge conflict in README.md
22:18:03 worker.1 | Squash commit -- not updating HEAD
22:18:03 worker.1 | Automatic merge failed; fix conflicts and then commit the result.
22:18:03 worker.1 | 
22:18:03 worker.1 | W, [2017-05-06T22:18:03.676443 #27884]  WARN -- : POST https://api.github.com/repos/pH-Inc/testEnterprise/issues: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound)
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/octokit-3.7.0/lib/octokit/response/raise_error.rb:16:in `on_complete'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:9:in `block in call'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:57:in `on_complete'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:8:in `call'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:177:in `post'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sawyer-0.6.0/lib/sawyer/agent.rb:94:in `call'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/octokit-3.7.0/lib/octokit/client.rb:339:in `request'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/octokit-3.7.0/lib/octokit/client.rb:144:in `post'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/octokit-3.7.0/lib/octokit/client/issues.rb:98:in `create_issue'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:182:in `report_error'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:163:in `run_command'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:227:in `squash'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:209:in `apply_sync_method'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:49:in `block (2 levels) in clone'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:43:in `chdir'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:43:in `block in clone'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb:237:in `block in with_clean_env'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb:447:in `with_env'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb:237:in `with_clean_env'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/cloner.rb:42:in `clone'
22:18:03 worker.1 | /Users/pholleran/github/repository-sync/lib/clone_job.rb:20:in `perform'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/job.rb:227:in `perform'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/worker.rb:250:in `perform'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/worker.rb:189:in `block in work'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/worker.rb:166:in `loop'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/worker.rb:166:in `work'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/resque-1.25.2/lib/resque/tasks.rb:41:in `block (2 levels) in <top (required)>'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:199:in `each'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/bin/rake:23:in `load'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/bin/rake:23:in `<top (required)>'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/bin/bundle:23:in `load'
22:18:03 worker.1 | /Users/pholleran/.rbenv/versions/2.2.4/bin/bundle:23:in `<main>'
22:18:03 worker.1 | I, [2017-05-06T22:18:03.688065 #27884]  INFO -- : Cleaning up /var/folders/_t/shxbkdkj1f733g31x_ptnjfw0000gn/T/repository-sync20170506-27884-exe5gy

This also throws an API error in the mix ☝️ 22:18:03 worker.1 | W, [2017-05-06T22:18:03.676443 #27884] WARN -- : POST https://api.github.com/repos/pH-Inc/testEnterprise/issues: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound) which I will reference in another issue

I would expect this to work without a problem, since adding another line shouldn't cause a merge conflict. I'm going to do what I can to figure this out, but would appreciate any 👀 from people more familiar with this app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions