You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run Health Watcher Staging Deployment Guide on AWS EKS V2
This guide documents the staging deployment path used for the run-health watcher
Helm chart validation on the existing workspace-mode Mage Pro staging cluster.
Use this v2 flow for validating the Helm chart PR against:
The run-health watcher is a dedicated Kubernetes Deployment, not a sidecar and
not an in-process background thread inside the Mage web/scheduler pod.
Why V2 Uses default/my-mageai
The earlier staging attempt targeted a separate release in the mage namespace.
That path tried to provision new workspace EFS PVCs and hit staging storage
provisioning issues. The cluster owner recommended using the existing workspace
mode release instead:
Do not replace this values file with a minimal values file. Helm arrays replace
rather than merge, so a partial extraEnvs override can accidentally remove
existing staging configuration.
5. Create The Run-Health Watcher Overlay
Create a run-health-only overlay. Do not override workspace storage settings in
this file.
Deployment/run-health-watcher is rendered
run-health-watcher uses the PR image tag
MAGE_RUN_HEALTH_WATCHER_* env vars are rendered
WORKSPACE_PVC_NAME=pvc-mageai-staging is preserved
claimName: pvc-mageai-staging is preserved
Treat /tmp/run-health-default-dry-run.yaml as sensitive because it can include
user-supplied values and inherited secrets/tokens from the existing Helm release.
If the pod schedules but stays ContainerCreating, compare the QA workspace
against an existing Running workspace without modifying the existing workspace:
kubectl -n default get sts mageai-staging-workspace-test2 \
-o jsonpath='test2 annotations={.spec.template.metadata.annotations}{"\n"}volumes={.spec.template.spec.volumes}{"\n"}mounts={.spec.template.spec.containers[0].volumeMounts}{"\n"}'
kubectl -n default get sts mageai-staging-workspace-run-health-ws-2 \
-o jsonpath='run-health-ws-2 annotations={.spec.template.metadata.annotations}{"\n"}volumes={.spec.template.spec.volumes}{"\n"}mounts={.spec.template.spec.containers[0].volumeMounts}{"\n"}'
In this validation, the stuck workspace had an extra PVC mount:
volume: workspace-source-code -> pvc-mageai-staging
mount: /app from workspace-source-code readOnly
The known-good test2 workspace did not have that mount. Removing it allowed
the container to start:
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
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.
This PR is based on stories Alert on stuck runs affecting subsequent scheduled triggers and Detect, diagnose, and terminate pipeline runs stuck in Running.
The associated feature PR : https://github.com/mage-ai/mage-pro/pull/3803
Summary
Adds optional Helm support for deploying the run health watcher as a dedicated Kubernetes workload.
This includes:
runHealthWatchervalues, disabled by default;run-health-watcherDeployment that runspython -m mage_ai.orchestration.run_health.watcher;Tests
Ran Helm unit tests: