-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[ansible/configuration] Remove already defaulted options #198
Conversation
WalkthroughThe pull request modifies the Jinja2 template for the Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
ansible/roles/ovos_installer/templates/mycroft.conf.j2 (2)
Line range hint
41-42
: Consider parameterizing the GUI file host path.The hardcoded path
/home/ovos/.cache/gui_files
might cause issues if the user directory changes. Consider making this path configurable through a variable.- "gui_file_host_path": "/home/ovos/.cache/gui_files" + "gui_file_host_path": "{{ ovos_installer_gui_files_path | default('/home/ovos/.cache/gui_files') }}"
Line range hint
51-51
: Document the rationale for websocket message size values.The max message size values (100 vs 25) seem arbitrary. Please add a comment explaining why these specific values were chosen and their implications.
+ # Increased message size needed for GUI operations in containers "websocket": { "max_msg_size": {{ 100 if ovos_installer_feature_gui | bool and ovos_installer_method == "containers" else 25 }} },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
ansible/roles/ovos_installer/templates/mycroft.conf.j2
(1 hunks)
🔇 Additional comments (2)
ansible/roles/ovos_installer/templates/mycroft.conf.j2 (2)
Line range hint 1-77
: Overall changes look good.
The template modifications successfully remove defaulted options while maintaining proper conditional logic for different installation scenarios. The structure is clean and the Jinja2 conditionals are well-organized.
16-16
: Verify default values for removed listener properties.
The removal of remove_silence
and instant_listen
properties suggests they are now using default values. Please ensure these defaults align with the expected behavior.
Let's check the default configuration in the codebase:
✅ Verification successful
Removal of listener properties is safe - using package defaults
The removed properties remove_silence
and instant_listen
are handled by the ovos-dinkum-listener package's default configuration. The package is properly included in both core and satellite requirements with extras and platform-specific optimizations ([extras,linux]
, [onnx]
), ensuring appropriate default behavior is maintained.
The VAD (Voice Activity Detection) configuration remains explicitly set in the template, using either Silero or WebRTCVAD based on CPU capability, which is the critical part of the listener configuration.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for default listener configuration
rg -A 5 '"listener":\s*{' --type json
Length of output: 133
Script:
#!/bin/bash
# Search for default listener configuration with fixed regex
rg -A 5 '"listener": \{' --type json
# Also try searching in yaml/conf files
rg -A 5 '"listener":' --type yaml --type conf
# Search for any listener related configuration files
fd -e json -e yaml -e conf -e cfg | grep -i listener
# Look for documentation about listener configuration
fd README -e md | xargs rg -i "listener|vad"
Length of output: 217
Script:
#!/bin/bash
# Search for any files containing listener configuration
rg -i "listener" -A 5 -B 5
# Search specifically in the ovos_installer role for listener defaults
fd . ansible/roles/ovos_installer -t f | xargs rg -i "listener|vad|remove_silence|instant_listen"
# Look for default configuration files
fd -e json -e yaml -e yml -e conf | grep -i "default\|config"
Length of output: 88896
Script:
#!/bin/bash
# Search for default listener configuration in the ovos-dinkum-listener package requirements
fd -e txt requirements | xargs rg -i "ovos-dinkum-listener"
# Look for any configuration files that might contain default listener settings
fd -e yml -e yaml -e json -e conf | xargs rg -i "remove_silence|instant_listen" -A 3 -B 3
# Check for any documentation about listener configuration
fd . -t f | xargs rg -i "remove_silence.*default|instant_listen.*default" -A 2 -B 2
Length of output: 796
Summary by CodeRabbit
New Features
Bug Fixes