Add handling for no ref being provided#128
Conversation
We do not need to checkout a specific ref if none is provided. Added a test to check the behaviour.
| _checkout(ref) | ||
| # ref == None means we want to use HEAD so no need to checkout a | ||
| # specific revision | ||
| if ref is not None: |
| if self.ref is not None: | ||
| cmd = ['jupyter-repo2docker', '--ref', self.ref, self.url, '--'] | ||
| else: | ||
| cmd = ['jupyter-repo2docker', self.url, '--'] |
There was a problem hiding this comment.
Needed to support the new test case that has no ref.
There was a problem hiding this comment.
This is also why tests passed, since --ref was before self.url!
|
Currently it seems to fail even when you do give it a ref. Fails on master for me. |
|
|
|
Yup. Looks like it's related to argparse issue somewhere, most likely in the 'cmd' arg. The following works: The following does not: This is on this branch, not master. |
|
If anything, it looks like we'd just been building master for a while instead of whatever ref was passed in. Your PR removed the superfluous 'if not ref' line, causing the problem to actually show :) |
👌 nice ;-) |
|
Agree, if you pass |
|
I made a patch to binderhub: jupyterhub/binderhub#234 |
|
Ok, this can be deployed again, but jupyterhub/binderhub#234 should probably also be deployed alongside this to make sure we're actually building the versions we wanna. |
|
I think we should declare passing an from |
Add handling for no ref being provided
Fixes the bug noticed (and reverted) here: jupyterhub/mybinder.org-deploy#112
We do not need to checkout a specific ref if none is provided. Added a test to check the behaviour.
The big question is: when does binderhub call
repo2dockerwithout a ref as commandline argument?