Skip to content

Commit

Permalink
Merge pull request #1884 from manics/update-z2jh
Browse files Browse the repository at this point in the history
Update Z2JH to 4.0.0
  • Loading branch information
consideRatio authored Nov 10, 2024
2 parents 58bb7db + 6f2e26f commit a93a01c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
k3s-channel:
# Available channels: https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
# Don't use "latest", instead bump it using a PR so we know when a new version breaks BinderHub
- v1.29
- v1.30
test:
- main
- auth
Expand All @@ -69,7 +69,7 @@ jobs:
# which isn't documented anywhere, but is currently at 3.5.0. We also
# test with the latest k8s and helm versions.
#
- k3s-channel: v1.23
- k3s-channel: v1.28
helm-version: v3.5.0
test: helm
test-variation: dind
Expand Down
13 changes: 8 additions & 5 deletions binderhub/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
from traitlets.config import Configurable


def _skip_message(record, **kwargs):
def _skip_fields(record, **kwargs):
"""
Remove 'message' from log record.
Remove unwanted fields from log record.
It is always emitted with 'null', and we do not want it,
since we are always emitting events only
message: always emitted with 'null', and we do not want it,
since we are always emitting events only
taskName:
"""
del record["message"]
if "taskName" in record:
del record["taskName"]
return json.dumps(record, **kwargs)


Expand Down Expand Up @@ -49,7 +52,7 @@ def __init__(self, *args, **kwargs):

if self.handlers_maker:
self.handlers = self.handlers_maker(self)
formatter = jsonlogger.JsonFormatter(json_serializer=_skip_message)
formatter = jsonlogger.JsonFormatter(json_serializer=_skip_fields)
for handler in self.handlers:
handler.setFormatter(formatter)
self.log.addHandler(handler)
Expand Down
10 changes: 5 additions & 5 deletions binderhub/tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# We have optimized this slow test, for more information, see the README of
# https://github.com/binderhub-ci-repos/minimal-dockerfile.
@pytest.mark.asyncio(timeout=900)
@pytest.mark.timeout(900)
@pytest.mark.parametrize(
"slug",
[
Expand Down Expand Up @@ -102,7 +102,7 @@ async def test_build(app, needs_build, needs_launch, always_build, slug, pytestc
stop.raise_for_status()


@pytest.mark.asyncio(timeout=900)
@pytest.mark.timeout(900)
@pytest.mark.parametrize(
"app,build_only_query_param",
[
Expand Down Expand Up @@ -152,7 +152,7 @@ async def test_build_only(app, build_only_query_param, needs_build):
assert final["phase"] == "ready"


@pytest.mark.asyncio(timeout=120)
@pytest.mark.timeout(120)
@pytest.mark.remote
async def test_build_fail(app, needs_build, needs_launch, always_build):
"""
Expand All @@ -176,7 +176,7 @@ async def test_build_fail(app, needs_build, needs_launch, always_build):
assert failed_events > 0, "Should have seen phase 'failed'"


@pytest.mark.asyncio(timeout=120)
@pytest.mark.timeout(120)
@pytest.mark.parametrize(
"app,build_only_query_param,expected_error_msg",
[
Expand Down Expand Up @@ -485,7 +485,7 @@ async def test_local_repo2docker_build():
assert docker_client.images.get(name)


@pytest.mark.asyncio(timeout=20)
@pytest.mark.timeout(20)
async def test_local_repo2docker_build_stop(io_loop):
q = Queue()
# We need a slow build here so that we can interrupt it, so pick a large repo that
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/binderhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
# and run "./dependencies freeze --upgrade".
#
- name: jupyterhub
version: "3.3.7"
version: "4.0.0"
repository: "https://jupyterhub.github.io/helm-chart"
description: |-
BinderHub is like a JupyterHub that automatically builds environments for the
Expand All @@ -22,7 +22,7 @@ keywords: [jupyter, jupyterhub, binderhub]
home: https://binderhub.readthedocs.io/en/latest/
sources: [https://github.com/jupyterhub/binderhub]
icon: https://jupyterhub.github.io/helm-chart/images/hublogo.svg
kubeVersion: ">=1.23.0-0"
kubeVersion: ">=1.28.0-0"
maintainers:
# Since it is a requirement of Artifact Hub to have specific maintainers
# listed, we have added some below, but in practice the entire JupyterHub team
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/binderhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jupyterhub:
hub:
config:
JupyterHub:
authenticator_class: nullauthenticator.NullAuthenticator
authenticator_class: "null"
BinderSpawner:
auth_enabled: false
loadRoles:
Expand Down
2 changes: 1 addition & 1 deletion tools/templates/lint-and-validate-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jupyterhub:
hub:
config:
JupyterHub:
authenticator_class: nullauthenticator.NullAuthenticator
authenticator_class: "null"
extraConfig:
hub-test-config: |
dummy jupyterhub python code...
Expand Down

0 comments on commit a93a01c

Please sign in to comment.