e0e362d700
SDK Tests / changes (push) Successful in 2m29s
Real E2E Tests / changes (push) Successful in 2m29s
SDK Tests / Python SDK Tests (sandbox) (push) Waiting to run
SDK Tests / CLI Quality (push) Waiting to run
SDK Tests / CLI Tests (push) Waiting to run
SDK Tests / Python SDK Quality (code-interpreter) (push) Waiting to run
SDK Tests / Python SDK Quality (sandbox) (push) Waiting to run
SDK Tests / Python SDK Tests (code-interpreter) (push) Waiting to run
SDK Tests / JavaScript SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / JavaScript SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Kotlin SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Kotlin SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / C# SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / C# SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Go SDK Quality And Tests (push) Waiting to run
Deploy Docs Pages / build (push) Has been cancelled
Deploy Docs Pages / deploy (push) Has been cancelled
Real E2E Tests / JavaScript E2E (docker bridge) (push) Has been cancelled
Real E2E Tests / Python E2E (docker bridge) (push) Has been cancelled
Real E2E Tests / Java E2E (docker bridge) (push) Has been cancelled
Real E2E Tests / C# E2E (docker bridge) (push) Has been cancelled
Real E2E Tests / Go E2E (docker bridge) (push) Has been cancelled
Real E2E Tests / Real E2E CI (push) Has been cancelled
SDK Tests / SDK CI (push) Has been cancelled
76 lines
2.7 KiB
Bash
Executable File
76 lines
2.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright 2025 Alibaba Group Holding Ltd.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
set -e
|
|
|
|
echo "Stopping any running debug containers..."
|
|
docker stop task-executor-debug > /dev/null || true
|
|
echo "Building debug docker image (dev environment)..."
|
|
docker build -t task-executor-debug -f Dockerfile.debug .
|
|
|
|
echo "Starting debug container with Auto-Sync and Hot-Reload..."
|
|
echo "---------------------------------------------------------"
|
|
echo " App URL: http://localhost:8080"
|
|
echo " Debugger: localhost:2345"
|
|
echo " Source Code: Mounted from $(pwd)"
|
|
echo "---------------------------------------------------------"
|
|
echo "Usage:"
|
|
echo " 1. Connect GoLand to localhost:2345"
|
|
echo " 2. Edit code locally -> Container auto-recompiles (watch the logs)"
|
|
echo " 3. Re-connect Debugger in GoLand"
|
|
echo "---------------------------------------------------------"
|
|
|
|
# Create docker volumes for cache if they don't exist
|
|
docker volume create sandbox-k8s-gomod > /dev/null
|
|
docker volume create sandbox-k8s-gocache > /dev/null
|
|
|
|
# Run the container
|
|
# --rm: remove container after exit
|
|
# -v $(pwd):/workspace: Mount local code
|
|
# -v ...: Mount caches for speed
|
|
# reflex command:
|
|
# -r '\.go$': Watch all .go files recursively
|
|
# -s: Service mode (kill old process before starting new one)
|
|
# --: Delimiter
|
|
# dlv debug: Compile and run ./cmd/task
|
|
# --headless: No terminal UI
|
|
# --listen=:2345: Debugger port
|
|
# --api-version=2: API v2
|
|
# --accept-multiclient: Allow multiple connections
|
|
# --continue: Start running immediately (Optional, remove if you want to hit 'Resume' first)
|
|
# --output /tmp/debug_bin: Put binary in tmp to avoid clutter/loops
|
|
|
|
docker run --rm -it \
|
|
--privileged \
|
|
-p 5758:5758 \
|
|
-p 2345:2345 \
|
|
--security-opt seccomp=unconfined \
|
|
--cap-add=SYS_PTRACE \
|
|
-v "$(pwd):/workspace" \
|
|
-v sandbox-k8s-gomod:/go/pkg/mod \
|
|
-v sandbox-k8s-gocache:/go/.cache/go-build \
|
|
--name task-executor-debug \
|
|
-e SANDBOX_MAIN_CONTAINER=task-executor \
|
|
task-executor-debug \
|
|
reflex -r '\.go$' -s -- \
|
|
dlv debug ./cmd/task-executor \
|
|
--headless \
|
|
--listen=:2345 \
|
|
--api-version=2 \
|
|
--accept-multiclient \
|
|
--output /tmp/debug_bin \
|
|
-- \
|
|
-enable-sidecar-mode=true -main-container-name=task-executor |