-
-
Notifications
You must be signed in to change notification settings - Fork 29
feat: send bus message on skill load #727
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
Conversation
|
Warning Rate limit exceeded@mikejgray has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 12 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds a second try block in SkillManager._load_plugin_skill that re-invokes Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant SM as SkillManager
participant PL as PluginSkillLoader
participant MB as MessageBus
note right of SM #DDEEFF: Original inner load attempt
SM->>PL: loader.load(skill_plugin) -- inner try
alt inner load raises exception
PL--xSM: Exception
SM->>SM: log exception
else inner load returns (truthy/false)
PL-->>SM: result
end
note right of SM #E8F8E8: Added outer try re-invokes load
SM->>PL: loader.load(skill_plugin) -- outer try (re-invoke)
alt outer load raises exception
PL--xSM: Exception
SM->>SM: log exception
else outer load returns truthy
PL-->>SM: truthy
SM->>SM: store loader in plugin_skills[skill_id]
SM->>MB: emit("mycroft.skill.loaded", {skill_id})
SM-->>SM: return loader
else outer load returns False
PL-->>SM: False
SM->>SM: store loader in plugin_skills[skill_id]
SM->>MB: emit("mycroft.skill.loaded", {skill_id})
SM-->>SM: return None
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
ovos_core/skill_manager.py(1 hunks)test/unittests/test_skill_manager.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
ovos_core/skill_manager.py (2)
test/unittests/test_skill_manager.py (1)
emit(41-43)test/unittests/test_skill_installer.py (1)
emit(21-23)
test/unittests/test_skill_manager.py (1)
ovos_core/skill_manager.py (2)
_get_plugin_skill_loader(327-343)_load_plugin_skill(345-365)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: license_tests
- GitHub Check: unit_tests
🔇 Additional comments (2)
test/unittests/test_skill_manager.py (2)
179-216: LGTM!The test correctly verifies that on successful load:
- The
mycroft.skill.loadedmessage is emitted with the skill_id- The loader is stored in
plugin_skills- The loader is returned
218-250: LGTM!The test correctly verifies that when an exception is raised during load:
- No success message is emitted
- The exception is logged
- The loader is still stored in
plugin_skills(via finally block)Noneis returned
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
ovos_core/skill_manager.py(1 hunks)test/unittests/test_skill_manager.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
ovos_core/skill_manager.py (2)
test/unittests/test_skill_manager.py (1)
emit(41-43)test/unittests/test_skill_installer.py (1)
emit(21-23)
test/unittests/test_skill_manager.py (1)
ovos_core/skill_manager.py (2)
_get_plugin_skill_loader(327-343)_load_plugin_skill(345-357)
🪛 Ruff (0.13.3)
ovos_core/skill_manager.py
358-358: unindent does not match any outer indentation level
(invalid-syntax)
362-362: unindent does not match any outer indentation level
(invalid-syntax)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: unit_tests
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
Closes #587
Summary by CodeRabbit
New Features
Tests