Docker Debug Workflow: add dev/cvat-debug.sh, debug compose stack, and VS Code integration#10308
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- preserve mainstream launch configs and add a dedicated Docker attach compound - add VS Code tasks to bootstrap worker containers for debug sessions - introduce dev/debug.sh helper for common debug stack commands - move debug compose overrides to dev/docker-compose.debug.yml - add a concise from-scratch guide at dev/docker-debugging.md
- rename dev/debug.sh to dev/cvat-debug.sh and update references - add lightweight debug overlay image based on prebuilt cvat/server:dev - move and use dev/docker-compose.debug.yml for debug-specific compose overrides - add cleanup command set (clean/distclean/clobber) and usage guide - wire VS Code tasks and docs to the updated script/commands
- send timing output to stderr with clear command-scoped labels - add portable high-resolution timing fallback chain and doctor checks - document updated debug workflow and cleanup guidance
- rename build commands to build-debug/build-all with backward-compatible aliases - add rebuild path for local base image refresh and simplify compose function - speed up server restart via supervisor fast path with full-restart fallback - add command timing output to stderr with clear labels and update docs - set supervisord loglevel to info to reduce debug log noise
- remove legacy command aliases and keep canonical command names only - keep fast supervisor-based server restart with full-restart fallback
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.
Summary
Introduce a Docker-based CVAT development workflow that lets contributors work on backend and frontend code without installing Python, Node.js, Yarn, Redis, PostgreSQL, OPA, ClickHouse, or other CVAT runtime dependencies on the host.
The workflow is centered on one helper entrypoint:
What's included
dev/cvat-local.shas the standard local development entrypoint for Docker-based workflows.dev/docker-compose.local.ymlwith local development overrides for bind-mounted source code, backend debug ports, and the containerized webpack dev server.dev/Dockerfile.server.debugto layerdebugpyon top ofcvat/server:<tag>images.dev/Dockerfile.local-uifor the containerized UI development server and Docker-volume backed Yarn dependencies.Docker-based development environmentcontributor guide with setup, daily workflow, frontend debugging, backend debugging, UI checks, cleanup, and design tradeoffs.Docker: FrontendandDocker: Backendas the primary Docker debug profiles, while individual attach profiles stay hidden.Developer impact
debugpyports for the server and debug-enabled workers.http://localhost:3000, with source maps mapped back to the checkout.shell/execas escape hatches for uncommon commands.Common workflow
Frontend development:
Backend development:
./dev/cvat-local.sh up-workers ./dev/cvat-local.sh logs cvat_server ./dev/cvat-local.sh restart server # use VS Code launch profile: Docker: BackendUI sanity checks:
Validation
bash -n dev/cvat-local.sh./dev/cvat-local.sh compose-config./dev/cvat-local.sh check-uilaunch.jsonparsed and compound references checkedgit diff --check origin/develop..HEADNotes
dev/cvat-debug.sh/dev/docker-compose.debug.ymlapproach was replaced by the broaderdev/cvat-local.shworkflow.cvat_worker_utilscontainer is intentionally not debug-enabled in this patch because it runs scheduler-related processes that need a separate, explicit treatment.