tiny-pilot / tiny-pilot/tinypilot

Do not run the shutdown command in debug mode

Open
#848 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
3.5k
Forks
291
PR merge metrics
No merged PRs in 30d

Description

When running in debug mode (with dev-scripts/serve-dev), I would expect the shutdown command to not be actually executed.

This causes my machine to reboot when I try for example to change the hostname in debug mode 😅
Maybe it's just me because I'm on ubuntu? It's possibly the same on Mac, did not try though.

We could use if flask.current_app.debug: like we do in other files to prevent the shutdown to be executed in debug mode.

Linking the code for reference: https://github.com/tiny-pilot/tinypilot/blob/aa0998cd0f6698abbc96b217cc0932c894122c03/app/local_system.py

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in app/local_system.py, using the linked revision, and inspect how the shutdown command is reached when dev-scripts/serve-dev enables debug mode. Reproduce the hostname-change flow in debug mode and verify that the shutdown command is not executed there while normal mode still behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.