Skip to content

Commit c4af713

Browse files
authored
Merge pull request #1518 from manics/build-traitlets
Use Traitlets for passing parameters to `Build` classes
2 parents 4ce6dc1 + b49edf6 commit c4af713

File tree

7 files changed

+440
-363
lines changed

7 files changed

+440
-363
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
# jobs or have "template" jobs, so we use `if` conditions on steps
4444
tests:
4545
runs-on: ubuntu-20.04
46+
timeout-minutes: 10
4647
strategy:
4748
# keep running so we can see if tests with other k3s/k8s/helm versions pass
4849
fail-fast: false
@@ -278,6 +279,7 @@ jobs:
278279

279280
test-local:
280281
runs-on: ubuntu-20.04
282+
timeout-minutes: 5
281283
steps:
282284
- uses: actions/checkout@v3
283285

binderhub/app.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from traitlets.config import Application
4242

4343
from .base import AboutHandler, Custom404, VersionHandler
44-
from .build import Build
44+
from .build import Build, BuildExecutor
4545
from .builder import BuildHandler
4646
from .config import ConfigHandler
4747
from .events import EventLog
@@ -270,10 +270,11 @@ def _valid_badge_base_url(self, proposal):
270270

271271
build_class = Type(
272272
Build,
273+
klass=BuildExecutor,
273274
help="""
274275
The class used to build repo2docker images.
275276
276-
Must inherit from binderhub.build.Build
277+
Must inherit from binderhub.build.BuildExecutor
277278
""",
278279
config=True,
279280
)
@@ -818,6 +819,7 @@ def initialize(self, *args, **kwargs):
818819
"build_class": self.build_class,
819820
"registry": registry,
820821
"traitlets_config": self.config,
822+
"traitlets_parent": self,
821823
"google_analytics_code": self.google_analytics_code,
822824
"google_analytics_domain": self.google_analytics_domain,
823825
"about_message": self.about_message,

0 commit comments

Comments
 (0)