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

ci: fix Kubernetes CI Tests #413

Merged
merged 8 commits into from
Jul 28, 2021
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
5 changes: 2 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: Docs

on:
push:
# TODO: Only main
branches: [ "*" ]
branches: [ "main" ]

env:
commit_msg: ${{ github.event.head_commit.message }}

jobs:
main-tests:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Test

on:
push:
# TODO: Only main
branches: [ "*" ]
pull_request:
branches:
- main

env:
commit_msg: ${{ github.event.head_commit.message }}
Expand Down Expand Up @@ -75,7 +77,6 @@ jobs:
--agents 1
--api-port 6444
--no-lb

- name: Install tools
run: |
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
Expand Down
3 changes: 3 additions & 0 deletions continuous_integration/kubernetes/helm-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export DASK_GATEWAY_SERVER_IMAGE="daskgateway/dask-gateway-server:$DASK_GATEWAY_
docker tag $DASK_GATEWAY_SERVER_TAG $DASK_GATEWAY_SERVER_IMAGE

echo "Importing images into k3d"
echo "DASK_GATEWAY_IMAGE: $DASK_GATEWAY_IMAGE"
echo "DASK_GATEWAY_SERVER_IMAGE: $DASK_GATEWAY_SERVER_IMAGE"
k3d image import $DASK_GATEWAY_IMAGE $DASK_GATEWAY_SERVER_IMAGE
k3d image import $DASK_GATEWAY_SERVER_IMAGE

echo "Installing Helm Chart"
helm install \
Expand Down
4 changes: 2 additions & 2 deletions continuous_integration/kubernetes/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ pip install -U \
traitlets

pushd dask-gateway
python setup.py develop
sudo python setup.py develop
popd

pushd dask-gateway-server
python setup.py develop --no-build-proxy
sudo python setup.py develop --no-build-proxy
popd

pip list
4 changes: 2 additions & 2 deletions dask-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ ENTRYPOINT ["tini", "-g", "--"]
# ** An image with all of dask-gateway's dependencies **
FROM miniconda as dependencies

ARG DASK_VERSION=2.30.0
ARG DISTRIBUTED_VERSION=2.30.1
ARG DASK_VERSION=2021.7.1
ARG DISTRIBUTED_VERSION=2021.7.1

# - Installs dask and dependencies
# - Cleans up conda files
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Project settings
project = "Dask Gateway"
copyright = "2019, Jim Crist-Harif"
copyright = "2021, Jim Crist-Harif"
author = "Jim Crist-Harif"
release = version = dask_gateway_server.__version__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ data:
("worker_cores_limit", "worker.cores.limit"),
("worker_memory", "worker.memory.request"),
("worker_memory_limit", "worker.memory.limit"),
("worker_threads", "worker.threads"),
("worker_extra_container_config", "worker.extraContainerConfig"),
("worker_extra_pod_config", "worker.extraPodConfig"),
# Additional fields
Expand Down
3 changes: 3 additions & 0 deletions resources/helm/dask-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ gateway:
request: null
limit: null

# Number of threads available for a worker
threads: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain this? It seems to me reasonable that in real use, multiple threads per worker can be a good thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a default value for testing, otherwise it would come out to be 0:

The value of the 'worker_threads' trait of a KubeClusterConfig instance should not be less than 1, but a value of 0 was specified.

In practice you'll override this with your own values, with whatever your requirement is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that's fine.
Can you change the default to also be 1?

Copy link
Member

@jcrist jcrist Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, this looks like a bug actually. By default the worker should use as many threads as cores (which has a pre-configured default). A user shouldn't be forced to configure the number of threads unless they want it to differ from the number of cores. I think we want worker_threads to set allow_none=True, then fix the logic in the k8s backend to use worker_cores if worker_threads is None.

This was added since the last release, so it hasn't gone out yet. Bug introduced in #353.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the input @jcrist . Let's make that a separate issue, then.


# Settings for nodeSelector, affinity, and tolerations for the gateway pods
nodeSelector: {}
affinity: {}
Expand Down