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_pr, fallback on http if git protocol fail, and SSL errors... #1758

Merged
merged 1 commit into from May 30, 2012

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented May 23, 2012

git protocol is blocked in my lab,
So I'm trying to modify somes scripts in tools to work with http://

it is partially working now, but requests still fails on github api:

Traceback (most recent call last):
  File "tools/test_pr.py", line 248, in <module>
    test_pr(args.number, post_results=args.publish)
  File "tools/test_pr.py", line 207, in test_pr
    pr = gh_api.get_pull_request(gh_project, num)
  File "/Users/matthiasbussonnier/ipython/tools/gh_api.py", line 78, in get_pull_request
    response = requests.get(url)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.12.1-py2.7.egg/requests/api.py", line 52, in get
    return request('get', url, **kwargs)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.12.1-py2.7.egg/requests/api.py", line 40, in request
    return s.request(method=method, url=url, **kwargs)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.12.1-py2.7.egg/requests/sessions.py", line 229, in request
    r.send(prefetch=prefetch)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.12.1-py2.7.egg/requests/models.py", line 609, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Google don't want to be my friend, and no answer on requests issues lists on github...

Any clues ?

@takluyver
Copy link
Member

Test results for commit a7c377a merged into master
Platform: linux2

  • python2.7: OK (libraries not available: matplotlib pymongo wx wx.aui)
  • python3.2: Failed, log at https://gist.github.com/2774872 (libraries not available: pymongo wx wx.aui)

Not available for testing: python2.6, python3.1

@takluyver
Copy link
Member

That was running test_pr from this branch, so ignore the failure again.

I don't know about the failure with requests, I'm afraid. Can you manually access the Github API? Is there some problem with HTTPS?

We can merge this as is, or leave it open if you want to work on the API thing in this branch.

@Carreau
Copy link
Member Author

Carreau commented May 23, 2012

With requests, no I can't get it to work, but with curl it works...

leave it open, I don't see any reason of merging if I'm the only one with theses issues, I can just fallback on v2 api through http...

@fperez
Copy link
Member

fperez commented May 29, 2012

I'm not terribly happy leaving PRs open indefintely: if there's no chance of merging this, then let's close it down. I'm OK merging it, if that's what makes most sense, I just don't want it open but in limbo.

@takluyver
Copy link
Member

I think it's mergeable as is, to fallback from git protocol to git-over-https. If we come up with a solution for Matthias' other problem, it can always go in a separate PR. @Carreau , thoughts?

@fperez
Copy link
Member

fperez commented May 29, 2012

OK, don't wait for me then. If you and @Carreau are happy, go for it.

@Carreau
Copy link
Member Author

Carreau commented May 30, 2012

I still have issues with requests, but this is already an improvement.
I'll merge then and make other PR later if I have some other changes.

Thanks

Carreau added a commit that referenced this pull request May 30, 2012
test_pr, fallback on git-over-https if git protocol fail,
@Carreau Carreau merged commit b864a11 into ipython:master May 30, 2012
@fperez
Copy link
Member

fperez commented May 30, 2012

Great, thanks!

fperez added a commit that referenced this pull request Jun 13, 2012
Add git-mpr, to merge PR(s) from github just by number(s).

Inspired by git-mrb and test_pr, I thougth it would be usefull to be able to merge PR only by giving their number. Hence `git merge-pull-request`or `git-mpr`.

usage: 
```bash
$ git mpr -h                                                                          ~/ipython/tools
usage: git-mpr [-h] [-l | -a | -m [pr-number [pr-number ...]]]

Merge (one|many) github pull request by their number. If pull request can't be
merge as is, cancel merge, and continue to the next if any.

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PR, their number and their mergeability
  -a, --merge-all       try to merge as many PR as possible, one by one
  -m [pr-number [pr-number ...]], --merge [pr-number [pr-number ...]]
                        The pull request numbers
```

examples :
```bash
$ git mpr --list  
* #1758 [√]:  test_pr, fallback on http if git protocol fail, and SSL errors...
* #1755 [√]:  test for pygments before running qt tests
* #1715 [√]:  Fix for #1688, traceback-unicode issue
[...]
* #1493 [√]:  Selenium web tests proof-of-concept
* #1471 [ ]:  simplify IPython.parallel connections and enable Controller Resume
* #1343 [ ]:  Add prototype shutdown button to Notebook dashboard
* #1285 [√]:  Implementation of grepping the input history using several patterns
* #1215 [√]:  updated %quickref to show short-hand for %sc and %sx
```
PR number, mergeability and title
Quite slow, as it does 1 api call by PR, since api does not give mergeability anymore if you ask for the list of all PRs at once.

merge one or more PR (skip the ones with conflict and present a nice list to copy and past to do it by hand) 

```bash
$ git mpr --merge [pr-number [pr-number ...]]]
[...]
*************************************************************************************
the following branch have not been merged automatically, considere doing it by hand :
PR 1630: git pull https://github.com/minrk/ipython.git mergekernel
PR 1343: git pull https://github.com/takluyver/ipython.git notebook-shutdown
PR 1715: git pull https://github.com/jstenar/ipython.git ultratb-pycolorize-unicode
PR 1732: git pull https://github.com/fperez/ipython.git cellmagics
PR 1471: git pull https://github.com/minrk/ipython.git connection
PR 1674: git pull https://github.com/mdboom/ipython.git notebook-carriage-return
*************************************************************************************
```

And last, 
```
git mpr --merge-all
```

That is pretty self explainatory
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
test_pr, fallback on git-over-https if git protocol fail,
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Add git-mpr, to merge PR(s) from github just by number(s).

Inspired by git-mrb and test_pr, I thougth it would be usefull to be able to merge PR only by giving their number. Hence `git merge-pull-request`or `git-mpr`.

usage: 
```bash
$ git mpr -h                                                                          ~/ipython/tools
usage: git-mpr [-h] [-l | -a | -m [pr-number [pr-number ...]]]

Merge (one|many) github pull request by their number. If pull request can't be
merge as is, cancel merge, and continue to the next if any.

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PR, their number and their mergeability
  -a, --merge-all       try to merge as many PR as possible, one by one
  -m [pr-number [pr-number ...]], --merge [pr-number [pr-number ...]]
                        The pull request numbers
```

examples :
```bash
$ git mpr --list  
* ipython#1758 [√]:  test_pr, fallback on http if git protocol fail, and SSL errors...
* ipython#1755 [√]:  test for pygments before running qt tests
* ipython#1715 [√]:  Fix for ipython#1688, traceback-unicode issue
[...]
* ipython#1493 [√]:  Selenium web tests proof-of-concept
* ipython#1471 [ ]:  simplify IPython.parallel connections and enable Controller Resume
* ipython#1343 [ ]:  Add prototype shutdown button to Notebook dashboard
* ipython#1285 [√]:  Implementation of grepping the input history using several patterns
* ipython#1215 [√]:  updated %quickref to show short-hand for %sc and %sx
```
PR number, mergeability and title
Quite slow, as it does 1 api call by PR, since api does not give mergeability anymore if you ask for the list of all PRs at once.

merge one or more PR (skip the ones with conflict and present a nice list to copy and past to do it by hand) 

```bash
$ git mpr --merge [pr-number [pr-number ...]]]
[...]
*************************************************************************************
the following branch have not been merged automatically, considere doing it by hand :
PR 1630: git pull https://github.com/minrk/ipython.git mergekernel
PR 1343: git pull https://github.com/takluyver/ipython.git notebook-shutdown
PR 1715: git pull https://github.com/jstenar/ipython.git ultratb-pycolorize-unicode
PR 1732: git pull https://github.com/fperez/ipython.git cellmagics
PR 1471: git pull https://github.com/minrk/ipython.git connection
PR 1674: git pull https://github.com/mdboom/ipython.git notebook-carriage-return
*************************************************************************************
```

And last, 
```
git mpr --merge-all
```

That is pretty self explainatory
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

Successfully merging this pull request may close these issues.

None yet

3 participants