Skip to content

Commit 3edf036

Browse files
committed
chore: update climate-ref components to v0.18.1
1 parent 4705d42 commit 3edf036

12 files changed

Lines changed: 56 additions & 60 deletions

File tree

changelog/60.improvement.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Updates the climate-ref components to v0.18.1.
2+
This ingests obs4REF data under its own `obs4ref` source type,
3+
and runs micromamba without file locks inside the workers, so their `/ref/cache` can stay read-only.

docker/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ services:
4242
# One-shot service to initialise the shared /ref volume.
4343
# Creates subdirectories and populates providers.
4444
ref-init:
45-
image: ghcr.io/climate-ref/climate-ref:v0.17.2
45+
image: ghcr.io/climate-ref/climate-ref:v0.18.1
4646
platform: linux/amd64
4747
depends_on:
4848
- postgres
@@ -99,7 +99,7 @@ services:
9999

100100
# Base worker to track the executions of async tasks
101101
climate-ref:
102-
image: ghcr.io/climate-ref/climate-ref:v0.17.2
102+
image: ghcr.io/climate-ref/climate-ref:v0.18.1
103103
platform: linux/amd64
104104
restart: always
105105
depends_on:

docs/runbooks/bootstrap-a-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ To exercise the deployment before any archive is mounted, fetch the sample data:
193193
```bash
194194
ref-orch ref datasets fetch-data --registry sample-data --output-directory /ref/data/sample
195195
ref-orch ref datasets ingest --source-type cmip6 /ref/data/sample/CMIP6
196-
ref-orch ref datasets ingest --source-type obs4mips /ref/data/sample/obs4REF
196+
ref-orch ref datasets ingest --source-type obs4ref /ref/data/sample/obs4REF
197197
```
198198

199199
The sample data does not contain the datasets required by ilamb.

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kubeVersion: ">=1.23.0-0"
1010
version: 0.6.4
1111

1212
# Application version tracks the climate-ref core version
13-
appVersion: "0.17.2"
13+
appVersion: "0.18.1"
1414

1515
dependencies:
1616
- name: dragonfly

helm/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ and is consitent across all pods.
133133
| `/ref/software` | RO | RO | RW ||
134134
| `/ref/scratch` || RW | RW ||
135135
| `/ref/cache` || RO | RW ||
136-
| `/ref/cache/mamba` || RW | RW ||
137136
| `/ref/results` | RO || RW ||
138137
| `/ref/db` | RW | RW | RW | RW |
139138
| `/ref/log` || RW | RW | RW |
@@ -146,9 +145,10 @@ The split follows from how the work is dispatched:
146145
That queue carries `handle_result`, which copies each execution from scratch into results.
147146
- `/ref/scratch` must stay a **shared** volume, not a per-pod `emptyDir`.
148147
The worker writes the outputs and the orchestrator reads them back out from a different pod, so a per-pod scratch loses every result.
149-
- `/ref/cache` holds the fetched reference data, which the workers only read.
150-
The image sets `XDG_CACHE_HOME` to it, and micromamba takes a lock under `mamba/` there on every `run`,
151-
so that one directory must be writable or every execution fails before the diagnostic starts.
148+
- `/ref/cache` holds the fetched reference data and micromamba's `mamba/proc` directory.
149+
`providers setup` on the orchestrator writes both, and the workers only read them.
150+
A worker runs micromamba without file locks (climate-ref 0.18.1 and later),
151+
but it still needs `mamba/proc` to exist, so run `providers setup` before the first solve.
152152
- `/ref/log` is written by every Celery worker, not just the orchestrator.
153153
A worker opens a log file there as it starts, so a read-only `/ref/log` stops the worker before it consumes anything.
154154
- `/ref/db` only matters with the default SQLite database.
@@ -310,7 +310,7 @@ and carries the same `PriorityClass` prerequisite as the API.
310310
| `defaults.replicaCount` | Number of worker replicas | `1` |
311311
| `defaults.concurrency` | Celery child processes per pod | `1` |
312312
| `defaults.image.repository` | Worker image repository | `ghcr.io/climate-ref/climate-ref` |
313-
| `defaults.image.tag` | Worker image tag | `v0.17.2` |
313+
| `defaults.image.tag` | Worker image tag | `v0.18.1` |
314314
| `defaults.image.pullPolicy` | Image pull policy | `IfNotPresent` |
315315
| `defaults.resources` | Resource requests/limits | 4 CPU / 16Gi, limits 6 CPU / 32Gi |
316316
| `defaults.strategy` | Deployment update strategy | `type: Recreate` |

helm/ci/gh-actions-values.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ defaults:
6060
mountPath: /ref/scratch
6161
subPath: scratch
6262
readOnly: false
63-
- name: gha-cached
64-
mountPath: /ref/cache/mamba
65-
subPath: cache/mamba
66-
readOnly: false
6763
- name: gha-cached
6864
mountPath: /ref/log
6965
subPath: log

helm/examples/small-values.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,14 @@ defaults:
4646
cpu: 2
4747
memory: 8Gi
4848
volumes: *refVolumes
49-
# Workers read the config and conda environments, and write scratch, the log and the SQLite db.
50-
# micromamba locks under $XDG_CACHE_HOME/mamba on every run, so that one directory is writable too.
49+
# Workers read the config, the conda environments and the cache, and write scratch, the log and the SQLite db.
5150
volumeMounts:
5251
- name: ref
5352
mountPath: /ref
5453
readOnly: true
5554
- name: ref
5655
mountPath: /ref/scratch
5756
subPath: scratch
58-
- name: ref
59-
mountPath: /ref/cache/mamba
60-
subPath: cache/mamba
6157
- name: ref
6258
mountPath: /ref/log
6359
subPath: log

helm/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ defaults:
314314
image:
315315
repository: ghcr.io/climate-ref/climate-ref
316316
pullPolicy: IfNotPresent
317-
tag: v0.17.2
317+
tag: v0.18.1
318318

319319
annotations: {}
320320

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ classifiers = [
2020
# We use exact versions here to ensure that the AFT tests run against the same combination of components that will be deployed in production.
2121
# Also update versions.toml when updating these versions to keep the changelog in sync
2222
dependencies = [
23-
"climate-ref==0.17.2",
24-
"climate-ref-core==0.17.2",
25-
"climate-ref-celery==0.17.2",
23+
"climate-ref==0.18.1",
24+
"climate-ref-core==0.18.1",
25+
"climate-ref-celery==0.18.1",
2626
# Diagnostic providers
27-
"climate-ref-esmvaltool==0.17.2",
28-
"climate-ref-pmp==0.17.2",
29-
"climate-ref-ilamb==0.17.2",
27+
"climate-ref-esmvaltool==0.18.1",
28+
"climate-ref-pmp==0.18.1",
29+
"climate-ref-ilamb==0.18.1",
3030
]
3131

3232
[project.optional-dependencies]

tests/test_helm_render.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,8 @@ def test_orchestrator_and_migrate_job_inherit_the_default_ref_mount(values):
787787
assert "/ref" in _mount_paths(find(docs, "Job", "-migrate"))
788788

789789

790-
def test_small_example_gives_workers_only_the_mamba_lock_directory():
791-
# micromamba locks under $XDG_CACHE_HOME/mamba on every run, and the rest of the cache stays read-only.
790+
def test_small_example_gives_workers_a_read_only_cache():
791+
# The orchestrator writes the cache during providers setup, and the workers only read it.
792792
docs = render(values="helm/examples/small-values.yaml")
793793
for component in ("esmvaltool", "pmp", "ilamb"):
794794
mounts = {
@@ -798,8 +798,7 @@ def test_small_example_gives_workers_only_the_mamba_lock_directory():
798798
]
799799
}
800800
assert mounts["/ref"].get("readOnly") is True
801-
assert "/ref/cache" not in mounts
802-
assert mounts["/ref/cache/mamba"].get("readOnly") is not True
801+
assert not any(path.startswith("/ref/cache") for path in mounts)
803802

804803

805804
def _scaled_components(docs: list[dict]) -> set[str]:

0 commit comments

Comments
 (0)