Fix celery autoscaler hmi_config usage and DEPLOY_SERVICE_CONFIG_PATH#772
Merged
Fix celery autoscaler hmi_config usage and DEPLOY_SERVICE_CONFIG_PATH#772
Conversation
lilyz-ai
approved these changes
Feb 27, 2026
sandeshghanta
approved these changes
Feb 27, 2026
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.
Fixes two bugs introduced by PRs #770 and #771
Both bugs caused the Celery Autoscaler to fail in prod with errors on every loop iteration. Fix was validated in prod before this PR.
Bug 1:
hmi_configis not callable (celery_autoscaler.py)PR #770 added
hmi_config().endpoint_namespacebuthmi_configis an instance, not a function:Fix:
hmi_config().endpoint_namespace→hmi_config.endpoint_namespaceBug 2:
DEPLOY_SERVICE_CONFIG_PATHwrong forconfig.filemode (celery_autoscaler_stateful_set.yaml)PR #771 hardcoded the path to the ConfigMap-mounted config, but prod uses
config.file(config baked into the private image at a known path — no ConfigMap created):Fix: set
DEPLOY_SERVICE_CONFIG_PATHtoconfig.file.launchwhenconfig.fileis set (prod), falling back to the ConfigMap path whenconfig.valuesis set.Test plan
endpoint_namespace: scale-deployfrom configInflight: ... : N)🤖 Generated with Claude Code
Greptile Summary
Fixes two production-breaking bugs introduced by PRs #770 and #771 in the Celery Autoscaler. Both fixes are minimal and correct.
celery_autoscaler.py: Removes erroneous()call onhmi_config, which is an already-instantiatedHostedModelInferenceServiceConfigobject — not a factory function. This was causing aTypeErroron every autoscaler loop iteration.celery_autoscaler_stateful_set.yaml: Adds conditionalDEPLOY_SERVICE_CONFIG_PATHlogic matching the existing pattern in_helpers.tpl— usesconfig.file.launchfor prod (config baked into image) and falls back to the ConfigMap-mounted path forconfig.valuesmode.Confidence Score: 5/5
Important Files Changed
hmi_config()→hmi_config— removes erroneous call on an already-instantiated config object. Consistent with all other usages across the codebase.DEPLOY_SERVICE_CONFIG_PATHlogic: usesconfig.file.launchwhenconfig.fileis set, falls back to ConfigMap path forconfig.values. Pattern matches_helpers.tplexactly.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Celery Autoscaler Starts] --> B[Import hmi_config] B --> C[Access hmi_config.endpoint_namespace] C --> D[list_namespaced_deployment] D --> E[Process Deployments] F[Helm Template Rendering] --> G{config.file set?} G -->|Yes| H[DEPLOY_SERVICE_CONFIG_PATH = config.file.launch] G -->|No| I{config.values set?} I -->|Yes| J[DEPLOY_SERVICE_CONFIG_PATH = ConfigMap path] I -->|No| K[No DEPLOY_SERVICE_CONFIG_PATH set]Last reviewed commit: 5c22484