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

Marge fails to fetch projects, 0.7.0 regression #122

Closed
alatiera opened this issue Aug 13, 2018 · 2 comments
Closed

Marge fails to fetch projects, 0.7.0 regression #122

alatiera opened this issue Aug 13, 2018 · 2 comments
Labels

Comments

@alatiera
Copy link

Gitlab instance: Gitlab CE 11.1 gitlab.gnome.org

Using the docker image:

When running the 0.7.0 tag and try to merge an MR from a fork, we get the following error.
The MR in question is here, it happened with other MRs too. This specific MR has comments from months ago when we were hitting this gitlab bug that prevented from using marge, You can ignore those and only focus on the ones from this day.

2018-08-13 04:19:11,202 INFO Processing !4 - 'Add a non-working test, from a branch'
2018-08-13 04:19:13,219 INFO Ensuring MR !4 is mergeable
2018-08-13 04:19:15,781 ERROR Unexpected Exception
Traceback (most recent call last):
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/single_merge_job.py", line 24, in execute
    self.update_merge_request_and_accept(approvals)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/single_merge_job.py", line 50, in update_merge_request_and_accept
    source_project, source_repo_url, _ = self.fetch_source_project(merge_request)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/job.py", line 200, in fetch_source_project
    remote_url=remote_url,
TypeError: fetch() got an unexpected keyword argument 'remote'
2018-08-13 04:19:17,796 INFO Unassigning from MR !4
Traceback (most recent call last):
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/bin/.marge.app-wrapped", line 4, in <module>
    marge.app.main()
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/app.py", line 261, in main
    marge_bot.start()
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/bot.py", line 41, in start
    self._run(repo_manager)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/bot.py", line 59, in _run
    projects,
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/bot.py", line 97, in _process_projects
    self._process_merge_requests(repo_manager, project, merge_requests)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/bot.py", line 164, in _process_merge_requests
    merge_job.execute()
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/single_merge_job.py", line 24, in execute
    self.update_merge_request_and_accept(approvals)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/single_merge_job.py", line 50, in update_merge_request_and_accept
    source_project, source_repo_url, _ = self.fetch_source_project(merge_request)
  File "/nix/store/77wrcwqx8p2wbw3n0v5v4lsvh7bwn01w-python3.6-marge-0.7.0/lib/python3.6/site-packages/marge/job.py", line 200, in fetch_source_project
    remote_url=remote_url,
TypeError: fetch() got an unexpected keyword argument 'remote'

Then I setup an instance from the 0.6.1 tag and it succeded.

2018-08-13 04:29:31,163 INFO Fetching merge requests assigned to me in alatiera/Bors-test...
2018-08-13 04:29:33,107 INFO Got 1 requests to merge; will try to merge the oldest
2018-08-13 04:29:33,107 INFO Running git clone --origin=origin git@gitlab.gnome.org:alatiera/Bors-test.git /tmpubhyfb3i/tmpggc__srt
2018-08-13 04:29:36,851 INFO Running git -C /tmpubhyfb3i/tmpggc__srt config user.email saltcan@protonmail.com
2018-08-13 04:29:36,856 INFO Running git -C /tmpubhyfb3i/tmpggc__srt config user.name 'Merge Bot, Bors Wannabe'
2018-08-13 04:29:36,861 INFO Processing !4 - 'Add a non-working test, from a branch'
2018-08-13 04:29:40,206 INFO Running git -C /tmpubhyfb3i/tmpggc__srt fetch --prune origin
2018-08-13 04:29:43,478 INFO Running git -C /tmpubhyfb3i/tmpggc__srt remote rm source
2018-08-13 04:29:43,483 WARNING git returned 128
2018-08-13 04:29:43,483 WARNING stdout: b''
2018-08-13 04:29:43,483 WARNING stderr: b'fatal: No such remote: source\n'
2018-08-13 04:29:43,483 INFO Running git -C /tmpubhyfb3i/tmpggc__srt remote add source git@gitlab.gnome.org:federico/Bors-test.git
2018-08-13 04:29:43,492 INFO Running git -C /tmpubhyfb3i/tmpggc__srt fetch --prune source
2018-08-13 04:29:47,240 INFO Running git -C /tmpubhyfb3i/tmpggc__srt checkout -B test-non-working source/test-non-working --
2018-08-13 04:29:47,247 INFO Running git -C /tmpubhyfb3i/tmpggc__srt rebase origin/master
2018-08-13 04:29:47,336 INFO Running git -C /tmpubhyfb3i/tmpggc__srt rev-parse HEAD
2018-08-13 04:29:47,341 INFO Running git -C /tmpubhyfb3i/tmpggc__srt rev-parse origin/master
2018-08-13 04:29:47,345 INFO Running git -C /tmpubhyfb3i/tmpggc__srt checkout test-non-working --
2018-08-13 04:29:47,355 INFO Running git -C /tmpubhyfb3i/tmpggc__srt diff-index --quiet HEAD
2018-08-13 04:29:47,360 INFO Running git -C /tmpubhyfb3i/tmpggc__srt ls-files --others
2018-08-13 04:29:47,365 INFO Running git -C /tmpubhyfb3i/tmpggc__srt config --get remote.source.url
2018-08-13 04:29:47,370 INFO Running git -C /tmpubhyfb3i/tmpggc__srt push --force source test-non-working
2018-08-13 04:29:50,533 INFO Running git -C /tmpubhyfb3i/tmpggc__srt checkout master --
2018-08-13 04:29:50,539 INFO Running git -C /tmpubhyfb3i/tmpggc__srt branch -D test-non-working
2018-08-13 04:29:50,545 INFO Commit id to merge '18a991a77917afc735b088c9ad434e3db355cde9' (into: '79375273a12686d15e230fa39bec69107966c83c')
2018-08-13 04:30:05,322 INFO Successfully merged !4.
@alatiera
Copy link
Author

alatiera commented Aug 13, 2018

Merging from a branch on the same project works, this seems to only affects Merge Requests from forks.

@aschmolck
Copy link
Contributor

Thanks for your bug report! This looks like it should be easy to fix, but it's disappointing no test caught this regression.

JaimeLennox added a commit that referenced this issue Sep 1, 2018
This is now caught by the tests.

Fixes: #122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants