question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mtlynchcommented, Mar 16, 2021

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.

0reactions
jotaencommented, Mar 16, 2021

@mtlynch is this done or do you want to keep it open for the remaining scripts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change device hostname through web UI · Issue #433 - GitHub
As more users are deploying multiple TinyPilots to the same network, we should make it ... Allow TinyPilot to call privileged scripts in...
Read more >
Unable to update 64bit pi to 2.4.0 - TinyPilot
Then save the file and exit (Ctrl+O, Ctrl+X). Finally, run the update script manually: /opt/tinypilot-privileged/update. After it downloads the ...
Read more >
TinyPilot REST API
Overview. The TinyPilot REST API enables clients to create custom integrations for their TinyPilot device. Clients can use the REST API to ...
Read more >
TinyPilot no longer capturing video
sudo apt install libjpeg9-dev -y && sudo service ustreamer restart ... /opt/tinypilot/scripts/upgrade && sudo reboot. ReplySolution.
Read more >
How do I enable the read-only filesystem? - TinyPilot
Overview. Read-only mode is an OS setting on the TinyPilot that can increase the lifetime of your microSD card and reduce the risk...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found