Skip to content

Commit

Permalink
ci: fetch stable/dev releases using helm show to avoid cache issues
Browse files Browse the repository at this point in the history
Previously we fetched the latest stable and dev release from metadata we
have maintained, but doing that and then using `helm install` of that
version made us use two sources of data, where one could be relatively
outdated due to hitting a cache while the other may not.

Using `helm show`, we rely on the helm chart repository website
returning a index.yaml listing versions etc both when checking whats the
latest versions, and when installing - like that we avoid a cache issue
I think.
  • Loading branch information
consideRatio committed Oct 22, 2023
1 parent 84ebc25 commit 1d08d6f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,16 @@ jobs:
- name: "(Upgrade) Install ${{ matrix.upgrade-from }} chart"
if: matrix.test == 'upgrade'
run: |
. ./ci/common
if [ ${{ matrix.upgrade-from }} = stable -o ${{ matrix.upgrade-from }} = dev ]; then
UPGRADE_FROM_VERSION=$(curl -sSL https://hub.jupyter.org/helm-chart/info.json | jq -er '.jupyterhub.${{ matrix.upgrade-from }}')
# NOTE: We change the directory so jupyterhub the chart name won't be
# misunderstood as the local folder name.
#
# https://github.com/helm/helm/issues/9244
cd ci
if [ ${{ matrix.upgrade-from }} = stable ]; then
UPGRADE_FROM_VERSION=$(helm show chart --repo=https://hub.jupyter.org/helm-chart/ jupyterhub | yq e '.version' -)
elif [ ${{ matrix.upgrade-from }} = dev ]; then
UPGRADE_FROM_VERSION=$(helm show chart --devel --repo=https://hub.jupyter.org/helm-chart/ jupyterhub | yq e '.version' -)
else
UPGRADE_FROM_VERSION=${{ matrix.upgrade-from }}
fi
Expand All @@ -289,11 +296,6 @@ jobs:
echo ""
echo "Installing already released jupyterhub version $UPGRADE_FROM_VERSION"
# FIXME: We change the directory so jupyterhub the chart name won't be
# misunderstood as the local folder name.
#
# https://github.com/helm/helm/issues/9244
cd ci
helm install jupyterhub --repo https://hub.jupyter.org/helm-chart/ jupyterhub --values ../dev-config.yaml --version=$UPGRADE_FROM_VERSION ${{ matrix.upgrade-from-extra-args }}
- name: "(Upgrade) Install helm diff"
Expand Down

0 comments on commit 1d08d6f

Please sign in to comment.