File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
testing/local-binder-local-hub Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1111from threading import Thread
1212
1313from tornado .log import app_log
14+ from traitlets import default
1415
1516from .build import BuildExecutor , ProgressEvent
1617
@@ -111,6 +112,16 @@ class LocalRepo2dockerBuild(BuildExecutor):
111112 WARNING: This is still under development. Breaking changes may be made at any time.
112113 """
113114
115+ @default ("identifier" )
116+ def _default_identifier (self ):
117+ try :
118+ import repo2docker
119+
120+ return repo2docker .__version__
121+ except ImportError :
122+ self .log .error ("repo2docker not installed" )
123+ return ""
124+
114125 def submit (self ):
115126 """
116127 Run a build to create the image for the repository.
Original file line number Diff line number Diff line change @@ -108,7 +108,16 @@ async def test_versions_handler(app):
108108 assert r .status_code == 200
109109
110110 data = r .json ()
111- assert data ["builder" ] == app .build_image
111+ # Version is different for KubernetesExecutor and LocalRepo2dockerBuild
112+ try :
113+ import repo2docker
114+
115+ allowed_versions = [repo2docker .__version__ ]
116+ except ImportError :
117+ allowed_versions = []
118+ allowed_versions .append (app .build_image )
119+
120+ assert data ["builder" ] in allowed_versions
112121 assert data ["binderhub" ].split ("+" )[0 ] == binder_version .split ("+" )[0 ]
113122
114123
Original file line number Diff line number Diff line change 2424c .BinderHub .builder_required = False
2525
2626c .BinderHub .build_class = LocalRepo2dockerBuild
27- c .BinderHub .push_secret = None
27+ c .BinderHub .push_secret = ""
2828c .BinderHub .launch_quota_class = LaunchQuota
2929
3030c .BinderHub .about_message = "This is a local dev deployment without Kubernetes"
You can’t perform that action at this time.
0 commit comments