Skip to content

Drop the DataChain install flags from the Studio chart - #879

Open
0x2b3bfa0 wants to merge 1 commit into
mainfrom
drop-datachain-install-flags
Open

Drop the DataChain install flags from the Studio chart#879
0x2b3bfa0 wants to merge 1 commit into
mainfrom
drop-datachain-install-flags

Conversation

@0x2b3bfa0

Copy link
Copy Markdown
Contributor

Companion to https://github.com/datachain-ai/studio/pull/13122, itself a follow-up to https://github.com/datachain-ai/studio/pull/13096#issuecomment-5138512887. Being released in parallel.

The ConfigMap keys

DATACHAIN_ENABLED has had no reader since datachain-ai/studio#13096 merged. datachain-ai/studio#13122 removes the last reader of DATACHAIN_UDF_ENABLED. Both go, along with the $datachain / $datachainClickhouse locals that became unused once they did — secret-studio.yaml keeps its own copies for clickHouse.dsn.

Why no replacement flag

global.datachain.udfEnabled gated nothing's existence. It was purely a replica-count override in two spots:

# deployment-studio-datachain-worker.yaml   (only inside the non-autoscaling branch)
{{- if ((.Values.global.datachain).udfEnabled) }}
replicas: {{ .Values.studioDatachainWorker.replicaCount }}   # honour the value
{{- else }}
replicas: 0                                                  # override it
{{- end }}

The Deployment itself, configmap-studio-datachain-worker, the ServiceAccount, Role/RoleBinding, ClusterRole/ClusterRoleBinding, the PVC, the ResourceQuota and the suspended CronJob Job template all rendered regardless. udfEnabled: false never meant "no worker component" — it meant "scale the worker to zero".

So there's no replacement knob, because the knob already exists: studioDatachainWorker.replicaCount and studioDatachainWorker.autoscaling.minReplicas / maxReplicas say exactly what udfEnabled: false said. udfEnabled was a second, chart-global spelling that silently won over the documented per-component values.

A studioDatachainWorker.enabled flag would have been wrong twice over — this chart's enabled idiom means render or don't render (studioPypiCache.enabled gates its Deployment/Service/PVC at line 1; studioBackend.datachainApi.enabled gates the Service and Ingress backend), which is a strictly bigger hammer than what's being removed, and it would duplicate replicaCount.

global.datachain itself stays — clickHouse.dsn still lives under it.

⚠️ Behaviour change

udfEnabled defaulted to false, so a stock install declared replicaCount: 1 but rendered replicas: 0. It now renders 1. This deletes an override that contradicted the value it sat on top of.

Anyone who wants no DataChain workers sets studioDatachainWorker.replicaCount: 0 (or autoscaling.minReplicas/maxReplicas: 0). Chart minor-bumped to 0.21.0 accordingly.

dev and prod both set udfEnabled: true today, so neither environment changes — see the companion platform PR.

Testing

helm lint passes. helm template diffed against main:

With the real prod values (platform/k8s/prod/studio/studio-values{,-env}.yaml) — the only non-cosmetic change is the two ConfigMap keys disappearing. No replica or HPA change. Remaining diff is the helm.sh/chart label and the ConfigMap/Secret checksum annotations, both expected.

Stock defaults — the two ConfigMap keys, plus the intended replicas: 0replicas: 1.

HPA branch, exercised explicitly since prod doesn't autoscale this worker:

old new
autoscaling.enabled=true, udfEnabled unset 0 / 0 1 / 5
autoscaling.enabled=true, udfEnabled=true 1 / 5 1 / 5

i.e. identical wherever udfEnabled was set, and honouring the declared values where it wasn't.

https://claude.ai/code/session_01Eb5QaLhxciBiarrZDdJ1ks

`DATACHAIN_ENABLED` has been dead since datachain-ai/studio#13096, and
datachain-ai/studio#13122 drops `DATACHAIN_UDF_ENABLED`, so neither
ConfigMap key has a reader any more.

`global.datachain.udfEnabled` gated nothing's existence — it was purely a
replica-count override on the DataChain worker Deployment and HPA. The
Deployment, its ConfigMap, ServiceAccount, Role/RoleBinding,
ClusterRole/ClusterRoleBinding, PVC, ResourceQuota and the suspended
CronJob Job template all rendered either way.

So there is no replacement knob: `studioDatachainWorker.replicaCount` and
`studioDatachainWorker.autoscaling.minReplicas/maxReplicas` already say
what `udfEnabled: false` said, and `udfEnabled` was a second, chart-global
spelling that silently overrode them.

`global.datachain` itself stays — `clickHouse.dsn` still lives under it and
is read by secret-studio.yaml.

Behaviour change: the flag defaulted to false, so a stock install declared
`replicaCount: 1` but rendered `replicas: 0`. It now renders 1.

Claude-Session: https://claude.ai/code/session_01Eb5QaLhxciBiarrZDdJ1ks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant