Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configure.py to care less about being run on a streamer or not #575

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

rtertiaer
Copy link
Contributor

@rtertiaer rtertiaer commented Dec 19, 2023

This PR allows configure.py to care less about it being run on a streamer. This permits us to generate one system image that can run on both types of appliances. The changes aren't hefty:

  • deploy all test shortcuts on all appliance types, regardless of their relevance for that particular type. This does not affect end users, but internally we'll need to communicate with manufacturing (@mrahman313 👀 )
  • deploy the audiodetector service on everything, even boxes without RCA in - but gatekeep the service launch with a conditional.

I've tested this on both regular and streamer appliances. The test shortcuts get deployed everywhere. The audiodetector service correctly does not launch on streamers, wie so:

pi@amplipi:~ $ systemctl --user status amplipi-audiodetector.service 
● amplipi-audiodetector.service - Amplipi RCA Input Audio Detector
   Loaded: loaded (/home/pi/.config/systemd/user/amplipi-audiodetector.service; enabled; vendor preset: ena[...]
   Active: inactive (dead)
Condition: start condition failed at Tue 2023-12-19 18:33:30 EST; 1min 17s ago
           └─ ConditionPathExists=!/home/pi/.config/amplipi/is_streamer was not met

Dec 19 18:33:30 amplipi systemd[583]: Condition check resulted in Amplipi RCA Input Audio Detector being sk[...]

This PR fixes #573 , which came up during image creation, #542.

@@ -517,6 +517,7 @@ def _audiodetector_service(directory: str):
return f"""\
[Unit]
Description=Amplipi RCA Input Audio Detector
ConditionPathExists=!/home/pi/.config/amplipi/is_streamer
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documentation here.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6f5d89a) 51.60% compared to head (7815b41) 51.60%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #575   +/-   ##
=======================================
  Coverage   51.60%   51.60%           
=======================================
  Files          24       24           
  Lines        5676     5676           
=======================================
  Hits         2929     2929           
  Misses       2747     2747           
Flag Coverage Δ
unittests 51.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@linknum23 linknum23 left a comment

Choose a reason for hiding this comment

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

LGTM. The easiest way to validate this works is to upgrade a streamer and then yank that CM3+ and put it in a main unit. Please try something like that before merging this.

@rtertiaer
Copy link
Contributor Author

spoke IRL; since I've already tested on existing appliances and we'll be doing further testing during the pressing of 0.3.1, we can ship this right now.

@rtertiaer rtertiaer merged commit 71aae7e into main Dec 20, 2023
3 checks passed
@rtertiaer rtertiaer deleted the make_configure.py_less_streamer-y branch December 20, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audiodetector service ought to be installed on all images, but 'gatekept' from boxes without RCA in
3 participants