Fix celery autoscaler missing service config mount#771
Merged
Conversation
PR #770 added hmi_config().endpoint_namespace inside list_deployments to scope the namespace scan, but the celery autoscaler StatefulSet never had the service config ConfigMap mounted — unlike gateway, builder, and cacher which all use the modelEngine.volumeMounts helper. Without the mount, hmi_config() falls back to service_config_circleci.yaml which doesn't exist in the pod, causing every list_deployments loop to fail with FileNotFoundError. Fix: mount the service config ConfigMap (launch_service_config key only) at /workspace/model-engine/service_configs/ and set DEPLOY_SERVICE_CONFIG_PATH to point to it — matching exactly what the other components do. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
sandeshghanta
approved these changes
Feb 27, 2026
lilyz-ai
approved these changes
Feb 27, 2026
dmchoiboi
added a commit
that referenced
this pull request
Feb 27, 2026
Two bugs introduced in PRs #770 and #771: 1. celery_autoscaler.py: hmi_config is an instance, not a callable. Change hmi_config().endpoint_namespace -> hmi_config.endpoint_namespace 2. celery_autoscaler_stateful_set.yaml: DEPLOY_SERVICE_CONFIG_PATH was hardcoded to the ConfigMap path, but prod uses config.file (config baked into the private image). Now correctly uses config.file.launch when set, falling back to the ConfigMap path when config.values is set. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #770 scoped
list_deploymentsto usehmi_config().endpoint_namespace, but the celery autoscaler StatefulSet was never given the service config ConfigMap mount that gateway/builder/cacher have. Without it,hmi_config()falls back toservice_config_circleci.yamlwhich doesn't exist in the pod:This causes every
list_deploymentsloop iteration to fail, breaking async endpoint autoscaling.Fix
Two minimal additions to
celery_autoscaler_stateful_set.yaml:DEPLOY_SERVICE_CONFIG_PATHenv var pointing to/workspace/model-engine/service_configs/service_config.yamllaunch_service_configkey from the existing service config ConfigMap at/workspace/model-engine/service_configs/This exactly mirrors what gateway/builder/cacher do — no extra volumes, no extra env vars.
Test plan
list_deploymentsno longer errorslist_namespaced_deployment in scale-deployappears in autoscaler logs (namespace scoping from Scope Celery Autoscaler namespace scan to endpoint_namespace #770 working)🤖 Generated with Claude Code
Greptile Summary
This PR fixes the celery autoscaler StatefulSet that was missing the service config ConfigMap mount, causing
hmi_config()to fall back to a non-existentservice_config_circleci.yamlfile. This broke async endpoint autoscaling after PR #770 introducedhmi_config().endpoint_namespaceusage inlist_deployments.DEPLOY_SERVICE_CONFIG_PATHenv var pointing to the mounted config pathlaunch_service_configConfigMap volume and mount, matching the pattern used by gateway/builder/cachervolumeMounts:andvolumes:keywords to be unconditional (previously they were only rendered inside the{{- if .Values.aws }}block, which would break on non-AWS deployments needing only the service config mount)Confidence Score: 4/5
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Celery Autoscaler Pod Starts] --> B{DEPLOY_SERVICE_CONFIG_PATH set?} B -->|Before PR| C[Not set - uses DEFAULT_SERVICE_CONFIG_PATH] C --> D[service_config_circleci.yaml] D --> E[FileNotFoundError - file missing in pod] E --> F[list_deployments fails every loop] B -->|After PR| G[Set via env var in StatefulSet] G --> H[service_config.yaml path configured] H --> I{ConfigMap mounted?} I -->|Before PR| J[No mount - file missing] I -->|After PR| K[launch_service_config mounted from ConfigMap] K --> L[hmi_config loads successfully] L --> M[endpoint_namespace resolved] M --> N[list_deployments scoped correctly]Last reviewed commit: 3847687