Skip to content

Commit 4ed5cfc

Browse files
bitnami-archive fix
1 parent 2b4b1e4 commit 4ed5cfc

5 files changed

Lines changed: 48 additions & 15 deletions

File tree

.github/workflows/core-tests.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
pull_request:
1818
branches:
1919
- master
20+
workflow_dispatch:
2021

2122
permissions: read-all
2223

@@ -315,14 +316,36 @@ jobs:
315316
sleep 10
316317
done
317318
318-
- name: Pre-pull Helm repos
319+
- name: Pre-pull Helm repos and charts (with retry)
319320
run: |
320321
retry() { local cmd="$*" attempt=1; until $cmd; do attempt=$((attempt+1)); [ $attempt -gt 3 ] && return 1; sleep $((attempt*5)); done; }
321322
retry helm repo add bitnami https://charts.bitnami.com/bitnami 2>/dev/null || true
323+
# bitnami retired charts.bitnami.com/bitnami — old versions like 12.5.6
324+
# are only available via the archive index on GitHub.
325+
retry helm repo add bitnami-archive \
326+
https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami \
327+
2>/dev/null || true
322328
retry helm repo add argo https://argoproj.github.io/argo-helm 2>/dev/null || true
323329
retry helm repo add metaflow-tools https://outerbounds.github.io/metaflow-tools 2>/dev/null || true
324330
retry helm repo update || true
325331
332+
HELM_CACHE="$HOME/.local/share/tilt-dev/.helm"
333+
334+
# Argo Workflows 0.45.2 (k8s + argo backends)
335+
mkdir -p "$HELM_CACHE/argo/0.45.2"
336+
[ -d "$HELM_CACHE/argo/0.45.2/argo-workflows" ] || \
337+
retry helm pull argo/argo-workflows --version 0.45.2 --untar \
338+
--destination "$HELM_CACHE/argo/0.45.2" || true
339+
340+
# PostgreSQL 12.5.6 — bitnami retired the chart CDN so pull from their
341+
# GitHub archive index which still hosts the full back-catalogue.
342+
mkdir -p "$HELM_CACHE/postgresql/12.5.6"
343+
[ -d "$HELM_CACHE/postgresql/12.5.6/postgresql" ] || \
344+
retry helm pull bitnami-archive/postgresql --version 12.5.6 --untar \
345+
--destination "$HELM_CACHE/postgresql/12.5.6" || \
346+
retry helm pull bitnami/postgresql --version 12.5.6 --untar \
347+
--destination "$HELM_CACHE/postgresql/12.5.6" || true
348+
326349
- name: Start devstack
327350
working-directory: devtools
328351
run: ci/start-devstack.sh

.github/workflows/full-stack-test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
done
6565
}
6666
retry helm repo add argo https://argoproj.github.io/argo-helm 2>/dev/null || true
67+
# bitnami retired charts.bitnami.com/bitnami — old versions like 12.5.6
68+
# are only available via the archive index on GitHub.
69+
retry helm repo add bitnami-archive \
70+
https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami \
71+
2>/dev/null || true
6772
retry helm repo add bitnami https://charts.bitnami.com/bitnami 2>/dev/null || true
6873
retry helm repo add minio-s3 https://charts.min.io/ 2>/dev/null || true
6974
retry helm repo add metaflow-tools https://outerbounds.github.io/metaflow-tools 2>/dev/null || true
@@ -78,9 +83,12 @@ jobs:
7883
retry helm pull argo/argo-workflows --version 0.45.2 --untar \
7984
--destination "$HELM_CACHE/argo/0.45.2" || true
8085
81-
# PostgreSQL 12.5.6 (matches postgresql.tiltfile)
86+
# PostgreSQL 12.5.6 — bitnami retired the chart CDN so pull from their
87+
# GitHub archive index which still hosts the full back-catalogue.
8288
mkdir -p "$HELM_CACHE/postgresql/12.5.6"
8389
[ -d "$HELM_CACHE/postgresql/12.5.6/postgresql" ] || \
90+
retry helm pull bitnami-archive/postgresql --version 12.5.6 --untar \
91+
--destination "$HELM_CACHE/postgresql/12.5.6" || \
8492
retry helm pull bitnami/postgresql --version 12.5.6 --untar \
8593
--destination "$HELM_CACHE/postgresql/12.5.6" || true
8694

.github/workflows/ux-tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ jobs:
217217
done
218218
}
219219
retry helm repo add bitnami https://charts.bitnami.com/bitnami 2>/dev/null || true
220+
# bitnami retired charts.bitnami.com/bitnami — old versions like 12.5.6
221+
# are only available via the archive index on GitHub.
222+
retry helm repo add bitnami-archive \
223+
https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami \
224+
2>/dev/null || true
220225
retry helm repo add argo https://argoproj.github.io/argo-helm 2>/dev/null || true
221226
retry helm repo add minio-s3 https://charts.min.io/ 2>/dev/null || true
222227
retry helm repo add apache-airflow https://airflow.apache.org 2>/dev/null || true
@@ -233,9 +238,12 @@ jobs:
233238
retry helm pull argo/argo-workflows --version 0.45.2 --untar \
234239
--destination "$HELM_CACHE/argo/0.45.2" || true
235240
236-
# PostgreSQL 12.5.6 (all backends that use metadata-service)
241+
# PostgreSQL 12.5.6 — bitnami retired the chart CDN so pull from their
242+
# GitHub archive index which still hosts the full back-catalogue.
237243
mkdir -p "$HELM_CACHE/postgresql/12.5.6"
238244
[ -d "$HELM_CACHE/postgresql/12.5.6/postgresql" ] || \
245+
retry helm pull bitnami-archive/postgresql --version 12.5.6 --untar \
246+
--destination "$HELM_CACHE/postgresql/12.5.6" || \
239247
retry helm pull bitnami/postgresql --version 12.5.6 --untar \
240248
--destination "$HELM_CACHE/postgresql/12.5.6" || true
241249

metaflow/cmd/develop/stubs.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ def install(ctx: Any, force: bool):
155155
mf_version, _ = get_mf_version(True)
156156
with tempfile.TemporaryDirectory() as tmp_dir:
157157
with open(os.path.join(tmp_dir, "setup.py"), "w") as f:
158-
f.write(
159-
f"""
158+
f.write(f"""
160159
from setuptools import setup, find_namespace_packages
161160
setup(
162161
include_package_data=True,
@@ -171,16 +170,13 @@ def install(ctx: Any, force: bool):
171170
install_requires=["metaflow=={mf_version}"],
172171
python_requires=">=3.6.1",
173172
)
174-
"""
175-
)
173+
""")
176174
with open(os.path.join(tmp_dir, "MANIFEST.in"), "w") as f:
177-
f.write(
178-
"""
175+
f.write("""
179176
include metaflow-stubs/generated_for.txt
180177
include metaflow-stubs/py.typed
181178
global-include *.pyi
182-
"""
183-
)
179+
""")
184180

185181
StubGenerator(os.path.join(tmp_dir, "metaflow-stubs")).write_out()
186182

metaflow/runner/click_api.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
elif _py_ver >= (3, 7):
99
from metaflow._vendor.v3_7.typeguard import TypeCheckError, check_type
1010
else:
11-
raise RuntimeError(
12-
"""
11+
raise RuntimeError("""
1312
The Metaflow Programmatic API is not supported for versions of Python less than 3.7
14-
"""
15-
)
13+
""")
1614

1715
import functools
1816
import importlib

0 commit comments

Comments
 (0)