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

Some issues starting up #103

Open
Jellby opened this issue May 18, 2018 · 4 comments
Open

Some issues starting up #103

Jellby opened this issue May 18, 2018 · 4 comments

Comments

@Jellby
Copy link

Jellby commented May 18, 2018

Sorry to put some problems in the same issue, I can split it up if it's preferred.

python 3.5.2 complained about the trailing comma in job.py:

def update_from_target_branch_and_push(
        *,
        repo,
        source_branch,
        target_branch,
        source_repo_url=None,
        reviewers=None,
        tested_by=None,
        part_of=None,
        use_merge_strategy=False,
):

removing it worked.

Then there was a problem with (still in job.py) when using use-merge-strategy: true:

        fuse = repo.merge if use_merge_strategy else repo.rebase
        rewritten_sha = updated_sha = fuse(
            branch=source_branch,
            new_base=target_branch,
            source_repo_url=source_repo_url
        )

since repo.merge uses source_branch and target_branch instead of branch and new_base as argument names.

And finally (for now, because I haven't solved it):

2018-05-18 16:00:15,767 INFO Running git clone --origin=origin git@gitlab.com:Jellby/test.git /tmp/tmpmj08l3pw/tmptm1hlsd2
2018-05-18 16:00:18,678 INFO Running git -C /tmp/tmpmj08l3pw/tmptm1hlsd2 config user.email molcas@kemi.uu.se
2018-05-18 16:00:18,686 INFO Running git -C /tmp/tmpmj08l3pw/tmptm1hlsd2 config user.name Molcas
2018-05-18 16:00:18,693 INFO Processing !3 - 'dev/* branches and longer job'
2018-05-18 16:00:25,178 INFO Running git -C /tmp/tmpmj08l3pw/tmptm1hlsd2 fetch --prune origin
2018-05-18 16:00:26,163 WARNING git returned 128
2018-05-18 16:00:26,163 WARNING stdout: b''
2018-05-18 16:00:26,165 WARNING stderr: b'Warning: Identity file ssh-key not accessible: No such file or directory.\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n'
2018-05-18 16:00:26,165 INFO Running git -C /tmp/tmpmj08l3pw/tmptm1hlsd2 checkout master --
2018-05-18 16:00:26,175 INFO Running git -C /tmp/tmpmj08l3pw/tmptm1hlsd2 branch -D branch
2018-05-18 16:00:26,182 WARNING git returned 1
2018-05-18 16:00:26,183 WARNING stdout: b''
2018-05-18 16:00:26,183 WARNING stderr: b"error: branch 'branch' not found.\n"
2018-05-18 16:00:26,183 ERROR Unexpected Git error
Traceback (most recent call last):
  File "/home/ubuntu/marge-bot/marge/git.py", line 163, in git
    return _run(*command, env=env, check=True, timeout=timeout_seconds)
  File "/home/ubuntu/marge-bot/marge/git.py", line 189, in _run
    retcode, process.args, output=stdout, stderr=stderr,
subprocess.CalledProcessError: Command '[b'git', b'-C', b'/tmp/tmpmj08l3pw/tmptm1hlsd2', b'fetch', b'--prune', b'origin']' returned non-zero exit status 128

I don't know why it complains about the identity file, since it ran the git clone apparently successfully. Then git fails when it tries to remove the local branch branch, which I guess doesn't exist because it hasn't been set to track the remote one yet...

@Jellby
Copy link
Author

Jellby commented May 19, 2018

I don't know why it complains about the identity file, since it ran the git clone apparently successfully.

It was probably because I gave ssh-key-file as a relative path (file in current directory), changing it to absolute path allowed marge-bot to proceed further. A sanity check or converting the path to absolute at the beginning would be helpful.

@Jellby
Copy link
Author

Jellby commented May 21, 2018

The problem with fuse should be fixed by #102

@aschmolck
Copy link
Contributor

Concerning 3.5 -- I think the README not explicitly mentioning that marge is developed on (and thus likely requires) 3.6 is a bug, I'll fix this later this week.

With a library dependency I'd be more willing to invest some time to test against different python versions, but since it should be easy to run marge of the provided docker image (or with nix) regardless of their base system python version, I'm not sure the additional effort is justified.

Having said this, if someone is sufficiently interested in 3.5 compat that they're happy to take on the required work to make sure new releases stay compatible with it, I'd be happy to accept merge requests, certainly as long as the additional code complexity is negligible (as it would be in the case of removing the odd trailing comma).

@Jellby
Copy link
Author

Jellby commented May 21, 2018

I was unsure whether the trailing comma was due to a too old or too new version, or what... Now I see I'd need 3.6.0 at least (https://stackoverflow.com/a/32821767).

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

No branches or pull requests

2 participants