custom indicators fixed

This commit is contained in:
2026-04-09 17:00:43 -04:00
parent a70dcd954f
commit fd431516cc
17 changed files with 778 additions and 440 deletions

40
bin/bump-sandbox Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
# Builds and pushes a sandbox image for production, then pins the version in the prod config.
# Usage: bin/bump-sandbox [sidecar] (pass "sidecar" to also bump lifecycle-sidecar)
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
REMOTE=${REMOTE:-git.dxod.org/dexorder/dexorder}
PROD_CONFIG="$ROOT_DIR/deploy/k8s/prod/configs/gateway-config.yaml"
bump() {
local project="$1"
echo "==> Building $project..."
"$SCRIPT_DIR/build" "$project"
TAG="$(cd "$ROOT_DIR/$project" && git log --oneline | head -1 | cut -d ' ' -f 1)"
local image="$REMOTE/ai-$project:$TAG"
echo "==> Pushing $image..."
docker push "$image"
docker push "$REMOTE/ai-$project:latest"
echo "==> Updating prod config: $project → $TAG"
case "$project" in
sandbox)
sed -i "s|sandbox_image: .*|sandbox_image: $image|" "$PROD_CONFIG"
;;
lifecycle-sidecar)
sed -i "s|sidecar_image: .*|sidecar_image: $image|" "$PROD_CONFIG"
;;
esac
}
bump sandbox
if [ "${1:-}" == "sidecar" ]; then
bump lifecycle-sidecar
fi
echo ""
echo "Done. Review and commit the config change:"
echo " git diff $PROD_CONFIG"
echo " git add $PROD_CONFIG && git commit -m 'bump sandbox'"
echo " bin/dev restart gateway # run with --context=prod or equivalent"

22
bin/dev
View File

@@ -153,7 +153,9 @@ rebuild_images() {
# Build lifecycle-sidecar (Go binary)
if [ "$service" == "all" ] || [ "$service" == "lifecycle-sidecar" ] || [ "$service" == "sidecar" ]; then
echo -e "${GREEN}→${NC} Building lifecycle-sidecar..."
SIDECAR_TAG=$(build_and_get_tag lifecycle-sidecar) || exit 1
_SIDECAR_BUILD_TAG=$(build_and_get_tag lifecycle-sidecar) || exit 1
docker tag dexorder/ai-lifecycle-sidecar:$_SIDECAR_BUILD_TAG dexorder/ai-lifecycle-sidecar:dev
SIDECAR_TAG=$_SIDECAR_BUILD_TAG
fi
# Build web (Vue.js application)
@@ -165,7 +167,9 @@ rebuild_images() {
# Build sandbox (Python client library)
if [ "$service" == "all" ] || [ "$service" == "sandbox" ]; then
echo -e "${GREEN}→${NC} Building sandbox..."
SANDBOX_TAG=$(build_and_get_tag sandbox) || exit 1
_SANDBOX_BUILD_TAG=$(build_and_get_tag sandbox) || exit 1
docker tag dexorder/ai-sandbox:$_SANDBOX_BUILD_TAG dexorder/ai-sandbox:dev
SANDBOX_TAG=$_SANDBOX_BUILD_TAG
fi
# Save the tags for deployment (all services, preserving any we didn't rebuild)
@@ -749,20 +753,6 @@ case "$COMMAND" in
# Handle sandbox separately
if [ "$sandbox_requested" == "1" ]; then
if [ -f "$ROOT_DIR/.dev-image-tag" ]; then
source "$ROOT_DIR/.dev-image-tag"
fi
echo -e "${GREEN}→${NC} Updating gateway config with new sandbox image tag ($SANDBOX_TAG)..."
cd "$ROOT_DIR/deploy/k8s/dev"
_sb_bak=$(mktemp)
cp "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml" "$_sb_bak"
sed -i "s|sandbox_image: dexorder/ai-sandbox:.*|sandbox_image: dexorder/ai-sandbox:$SANDBOX_TAG|g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
sed -i "s|sidecar_image: dexorder/ai-lifecycle-sidecar:.*|sidecar_image: dexorder/ai-lifecycle-sidecar:$SIDECAR_TAG|g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
"$SCRIPT_DIR/config-update" dev
cp "$_sb_bak" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
rm "$_sb_bak"
echo -e "${GREEN}→${NC} Restarting gateway to pick up new sandbox image tag..."
kubectl rollout restart deployment/gateway
echo -e "${GREEN}→${NC} Deleting user container deployments in sandbox namespace..."
kubectl delete deployments --all -n sandbox 2>/dev/null || true
echo -e "${GREEN}✓ User containers will be recreated by gateway on next login${NC}"