Skip to content

Commit bbfb96b

Browse files
committed
BuildExecutor: appendix git_credentials push_secret q types
1 parent 78fb0aa commit bbfb96b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

binderhub/build.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import kubernetes.config
1616
from kubernetes import client, watch
1717
from tornado.log import app_log
18-
from traitlets import Any, Bool, Dict, Integer, Unicode, default
18+
from traitlets import Any, Bool, CUnicode, Dict, Integer, Unicode, default
1919
from traitlets.config import LoggingConfigurable
2020

2121
from .utils import KUBE_REQUEST_TIMEOUT, rendezvous_rank
@@ -58,7 +58,6 @@ class BuildExecutor(LoggingConfigurable):
5858
"""
5959

6060
q = Any(
61-
allow_none=True,
6261
help="Queue that receives progress events after the build has been submitted",
6362
)
6463

@@ -75,7 +74,8 @@ class BuildExecutor(LoggingConfigurable):
7574

7675
image_name = Unicode(help="Full name of the image to build. Includes the tag.")
7776

78-
git_credentials = Any(
77+
git_credentials = CUnicode(
78+
"",
7979
allow_none=True,
8080
help=(
8181
"Git credentials to use when cloning the repository, passed via the GIT_CREDENTIAL_ENV environment variable."
@@ -86,8 +86,9 @@ class BuildExecutor(LoggingConfigurable):
8686
)
8787

8888
push_secret = Unicode(
89+
"",
8990
allow_none=True,
90-
help="Implementation dependent name of a secret for pushing image to a registry.",
91+
help="Implementation dependent secret for pushing image to a registry.",
9192
config=True,
9293
)
9394

@@ -96,7 +97,7 @@ class BuildExecutor(LoggingConfigurable):
9697
)
9798

9899
appendix = Unicode(
99-
allow_none=True,
100+
"",
100101
help="Appendix to be added at the end of the Dockerfile used by repo2docker.",
101102
config=True,
102103
)

binderhub/tests/test_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def test_git_credentials_passed_to_podspec_upon_submit():
212212

213213
env = {env_var.name: env_var.value for env_var in pod.spec.containers[0].env}
214214

215-
assert env["GIT_CREDENTIAL_ENV"] == git_credentials
215+
assert env["GIT_CREDENTIAL_ENV"] == str(git_credentials)
216216

217217

218218
async def test_local_repo2docker_build(io_loop):

0 commit comments

Comments
 (0)