Allow TinyPilot to call privileged scripts in dev mode
See original GitHub issue[splitting off from a comment in #433]
Currently, in a development environment, the scripts under /opt/tinypilot-privileged
don’t exist, so API endpoints that depend on those scripts fail. This causes drift between the production and development environment, making it easier for bugs that affect the prod environment to slip through development unnoticed.
Option 1: Add mocks
When the user starts the server in dev mode (maybe we’ll add an option for specifying this), the paths to privileged scripts get replaced with paths to dummy scripts in the repo that simulate behavior of the real script without causing any external effect.
Option 2: Add an ansible example command for dev-mode installation
It should be possible to specify the right commands to the Ansible role so that it installs TinyPilot in dev mode, but with the real production privileged scripts. This might not be such a good solution for a general dev machine, but it would work well if you do development in a dedicated TinyPilot VM.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top GitHub Comments
I was leaving it open since it’s not fully fixed since we don’t mock out the upgrade script, but I guess we should close it for now and reopen if the upgrade issue becomes an obstacle.
@mtlynch is this done or do you want to keep it open for the remaining scripts?