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

Use Traitlets for passing parameters to Build classes #1518

Merged
merged 18 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
# jobs or have "template" jobs, so we use `if` conditions on steps
tests:
runs-on: ubuntu-20.04
timeout-minutes: 10
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
strategy:
# keep running so we can see if tests with other k3s/k8s/helm versions pass
fail-fast: false
Expand Down Expand Up @@ -278,6 +279,7 @@ jobs:

test-local:
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 4 additions & 2 deletions binderhub/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from traitlets.config import Application

from .base import AboutHandler, Custom404, VersionHandler
from .build import Build
from .build import Build, BuildExecutor
from .builder import BuildHandler
from .config import ConfigHandler
from .events import EventLog
Expand Down Expand Up @@ -270,10 +270,11 @@ def _valid_badge_base_url(self, proposal):

build_class = Type(
Build,
klass=BuildExecutor,
help="""
The class used to build repo2docker images.

Must inherit from binderhub.build.Build
Must inherit from binderhub.build.BuildExecutor
""",
config=True,
)
Expand Down Expand Up @@ -818,6 +819,7 @@ def initialize(self, *args, **kwargs):
"build_class": self.build_class,
"registry": registry,
"traitlets_config": self.config,
"traitlets_parent": self,
"google_analytics_code": self.google_analytics_code,
"google_analytics_domain": self.google_analytics_domain,
"about_message": self.about_message,
Expand Down
Loading