-
Notifications
You must be signed in to change notification settings - Fork 190
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
Sync - fix 404 errors #711
Comments
Should compare these 404 error pipelines with the v1.9 release sync to see if there is any overlap |
Issue for the v1.9 release sync is here: #548 Four out of the five repos that gave 404 errors this time also did for v1.9:
So this is not random as I had initially thought. Need to look into these pipelines to see what makes them different from the rest. |
Ok, if you try to make this PR manually for deepvariant you see that there is no shared history between the branches, so that might explain that one. The others look fine though, so that doesn't explain everything. |
Trying to list PRs between these two branches on these repos also gives a 404, eg: https://api.github.com/repos/nf-core/mhcquan/pulls?head=nf-core:TEMPLATE&base=dev |
Wait, what?? The URL is missing a The logs show that the code has the correct repo name, as it's pushing the template branch properly: $ nf-core --log-file sync_log.txt sync nf-core/mhcquant --from-branch dev --pull-request --username nf-core-bot --repository nf-core/mhcquant
,--./,-.
___ __ __ __ ___ /,-._.--~\
|\ | |__ __ / ` / \ |__) |__ } {
| \| | \__, \__/ | \ |___ \`-._,-`-,
`._,._,'
nf-core/tools version 1.11.dev0
INFO Pipeline directory: /Users/philewels/GitHub/nf-core/TEST_SYNC/nf-core/mhcquant sync.py:79
INFO Using branch `dev` to fetch workflow variables sync.py:81
INFO Will attempt to automatically create a pull request sync.py:83
INFO Original pipeline repository branch is 'master' sync.py:124
INFO Checking out workflow branch 'dev' sync.py:139
INFO Deleting all files in TEMPLATE branch sync.py:200
INFO Making a new template pipeline using pipeline variables sync.py:218
INFO Committed changes to TEMPLATE branch sync.py:245
INFO Pushing TEMPLATE branch to remote: 'mhcquant' sync.py:255
INFO Submitting a pull request via the GitHub API sync.py:285
WARNING Could not list open PRs ('404') sync.py:363
https://api.github.com/repos/nf-core/mhcquan/pulls?head=nf-core:TEMPLATE&base=dev
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3/pulls/#list-pull-requests"
}
INFO Checking out original branch: 'master' sync.py:406
ERROR GitHub API returned code 404: __main__.py:577
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3/pulls/#create-a-pull-request"
} Code that builds this URL: # Look for existing pull-requests
list_prs_url = "https://api.github.com/repos/{}/{}/pulls?head=nf-core:TEMPLATE&base={}".format(
self.gh_username, self.gh_repo, self.from_branch
) This should be impossible. What the hell is going on?? |
Ok wait, I think I might have found it: Buried in the verbose log:
The code overwrites the git repo name from the checked out repo (bad) here - need to skip this if it's suppled (or just delete this chunk of code and make it required). There must be something about the regex |
Ok, I don't know what was wrong with the regex but it doesn't matter - I have stripped that from the code as we didn't need it anyway and now everything seems to work 🎉 |
Fixed in #716 |
See #709 (comment)
Some pipelines get a 404 error when we try to make the automatic PR:
I don't know why this is happening, but we can try looping a few times with a sleep if we get specifically this error. Hopefully they will work on another go...?
The text was updated successfully, but these errors were encountered: