Skip to content

Commit

Permalink
Merge pull request #1004 from RasaHQ/port-3.6.x-latest-changes
Browse files Browse the repository at this point in the history
Port latest changes from 3.6.x
  • Loading branch information
ancalita authored Jul 12, 2023
2 parents 559141f + b3e2419 commit eb5ac61
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->

<!-- TOWNCRIER -->

## [3.6.1] - 2023-07-11

Rasa_Sdk 3.6.1 (2023-07-11)
### Bugfixes
- [#1219](https://github.com/rasahq/rasa-sdk/issues/1219): The logger for rasa_sdk plugin will not throw traceback when no plugins are found since plugins are optional. It will be only available in debug mode, however the action server will continue to run.


## [3.6.0] - 2023-06-13

Rasa_Sdk 3.6.0 (2023-06-13)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .mypy_cache | .pytest_cache | build | dist))"

[tool.poetry]
name = "rasa-sdk"
version = "3.7.0b1"
version = "3.6.1"
description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants"
authors = [ "Rasa Technologies GmbH <[email protected]>",]
maintainers = [ "Tom Bocklisch <[email protected]>",]
Expand Down
2 changes: 1 addition & 1 deletion rasa_sdk/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _discover_plugins(manager: pluggy.PluginManager) -> None:

rasa_sdk_plugins.init_hooks(manager)
except ModuleNotFoundError as e:
logger.info("No plugins found", exc_info=e)
logger.debug("No plugins found: %s", e)
pass


Expand Down
2 changes: 1 addition & 1 deletion rasa_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# this file will automatically be changed,
# do not add anything but the version number here!
__version__ = "3.7.0b1"
__version__ = "3.6.1"
13 changes: 12 additions & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import logging
import warnings

from pytest import MonkeyPatch
from pytest import MonkeyPatch, LogCaptureFixture
from pluggy import PluginManager
from unittest.mock import MagicMock

from rasa_sdk import endpoint
from rasa_sdk.plugin import plugin_manager


def test_plugins_not_found(caplog: LogCaptureFixture) -> None:
"""Test that a debug message is logged when no plugins are found.
This test must be run first because the plugin manager is cached.
"""
with caplog.at_level(logging.DEBUG):
plugin_manager()
assert "No plugins found: No module named 'rasa_sdk_plugins'" in caplog.text


def test_plugin_manager() -> None:
manager = plugin_manager()
assert isinstance(manager, PluginManager)
Expand Down

0 comments on commit eb5ac61

Please sign in to comment.