Skip to content

chore(docker): remove debugger flag from Flask dev server startup#40298

Closed
sha174n wants to merge 1 commit into
apache:masterfrom
sha174n:fix/flask-dev-server-flags
Closed

chore(docker): remove debugger flag from Flask dev server startup#40298
sha174n wants to merge 1 commit into
apache:masterfrom
sha174n:fix/flask-dev-server-flags

Conversation

@sha174n
Copy link
Copy Markdown
Contributor

@sha174n sha174n commented May 20, 2026

Summary

Removes the --debugger flag from the flask run command in docker/docker-bootstrap.sh.

The Werkzeug interactive debugger console (EVALEX) is not needed for development workflows in Docker — hot-reloading (--reload) provides the primary developer benefit. The console is not used in normal development flows and adds unnecessary surface area when the server is bound to 0.0.0.0.

Changes

  • docker/docker-bootstrap.sh: removed --debugger from the app case flask run invocation

Testing

  1. Start dev Docker with docker compose up
  2. Verify the app starts and serves the Superset UI normally
  3. Confirm GET /console returns 404
  4. Confirm ps aux | grep flask shows no --debugger flag
  5. Verify hot-reload still works by editing a Python file and observing the server restart

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added the install:docker Installation - docker container label May 20, 2026
app)
echo "Starting web app (using development server)..."
flask run -p $PORT --reload --debugger --host=0.0.0.0 --exclude-patterns "*/node_modules/*:*/.venv/*:*/build/*:*/__pycache__/*:*/superset-frontend/*"
flask run -p $PORT --reload --host=0.0.0.0 --exclude-patterns "*/node_modules/*:*/.venv/*:*/build/*:*/__pycache__/*:*/superset-frontend/*"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Architect Review — HIGH

Removing only the --debugger flag from the Docker dev flask run command does not disable the Werkzeug debugger, because the superset container still runs with FLASK_DEBUG=true from docker/.env via docker-compose.yml, and Flask debug mode enables the debugger (and its console) by default.

Suggestion: Explicitly disable the debugger for Docker app startup, for example by passing --no-debugger to flask run or updating the Docker dev environment so it does not set FLASK_DEBUG=true while preserving reload behavior, aligning this with docker/.env and the env_file configuration in docker-compose.yml.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.

**Path:** docker/docker-bootstrap.sh
**Line:** 83:83
**Comment:**
	*HIGH: Removing only the `--debugger` flag from the Docker dev `flask run` command does not disable the Werkzeug debugger, because the superset container still runs with `FLASK_DEBUG=true` from `docker/.env` via `docker-compose.yml`, and Flask debug mode enables the debugger (and its console) by default.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix

@bito-code-review
Copy link
Copy Markdown
Contributor

The provided pr_comments.csv file appears to be empty or contains only a header row with no actual comment data. Without specific review comments to analyze, I cannot validate or address the suggestion about the Docker dev environment configuration. Please ensure the file contains the expected review comments for further analysis.

Copy link
Copy Markdown
Contributor

@bito-code-review bito-code-review Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #633284

Actionable Suggestions - 1
  • docker/docker-bootstrap.sh - 1
Additional Suggestions - 1
  • docker/docker-bootstrap.sh - 1
    • Missing Debugger Flag Context · Line 83-83
      Removing --debugger disables Werkzeug's interactive debugger, which provides interactive traceback inspection. While --debug enables reloading and error pages, the interactive debugger offers additional debugging capabilities. Consider documenting this trade-off or adding a comment explaining the intentional removal.
Review Details
  • Files reviewed - 1 · Commit Range: c50468f..c50468f
    • docker/docker-bootstrap.sh
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

app)
echo "Starting web app (using development server)..."
flask run -p $PORT --reload --debugger --host=0.0.0.0 --exclude-patterns "*/node_modules/*:*/.venv/*:*/build/*:*/__pycache__/*:*/superset-frontend/*"
flask run -p $PORT --reload --host=0.0.0.0 --exclude-patterns "*/node_modules/*:*/.venv/*:*/build/*:*/__pycache__/*:*/superset-frontend/*"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation Inconsistency

Documentation in docs/developer_docs/contributing/development-setup.md (lines 410, 434, 588, 843, 908-909) and docs/developer_docs_versioned_docs/version-6.1.0/contributing/development-setup.md still reference --debugger flag that this change removes. Documentation must accurately reflect implemented code per BITO.md rule 10906.

Code Review Run #633284


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

@sha174n sha174n closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

install:docker Installation - docker container size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant