From d061f060904e364a750afbc6c67e9716f84fb55c Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 10:22:51 +0200 Subject: [PATCH 01/28] first initial setup of the working change --- CHANGELOG.rst | 1 + rasa/cli/x.py | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 98e00a72a990..dd9baed27524 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -40,6 +40,7 @@ Changed trackers are still loaded from pickle but will be dumped as json in any subsequent save operations. - Event brokers are now also passed to custom tracker stores (using the ``event_broker`` parameter) +- Updated Rasa X model pull interval to be used and give a warning message if the user has a custom url in the ``endpoints.yml`` file. Removed ------- diff --git a/rasa/cli/x.py b/rasa/cli/x.py index eb4b8376b68b..998ac21c3097 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -111,11 +111,27 @@ def _overwrite_endpoints_for_local_x( from rasa.utils.endpoints import EndpointConfig import questionary - endpoints.model = EndpointConfig( + # Checking if endpoint.yml has existing url and wait time values set, if so give warning we are overwriting + # the endpoint.yml file. + custom_wait_time_pulls = endpoints.model.kwargs['wait_time_between_pulls'] + custom_url = endpoints.model.url + + if custom_url is not None: + cli_utils.print_warning("Modifying the endpoints.yml file for Rasa X with our defaults") + + if custom_wait_time_pulls: + endpoints.model = EndpointConfig( + "{}/projects/default/models/tags/production".format(rasa_x_url), + token=rasa_x_token, + wait_time_between_pulls=custom_wait_time_pulls, + ) + else: + endpoints.model = EndpointConfig( "{}/projects/default/models/tags/production".format(rasa_x_url), token=rasa_x_token, wait_time_between_pulls=2, - ) + ) + overwrite_existing_event_broker = False if endpoints.event_broker and not _is_correct_event_broker(endpoints.event_broker): From 31b953bfed4a63310341817c47ac65e70bb21305 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 10:41:19 +0200 Subject: [PATCH 02/28] first initial commit of proposed changes --- rasa/cli/x.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 998ac21c3097..f9b2bfd29063 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -113,25 +113,26 @@ def _overwrite_endpoints_for_local_x( # Checking if endpoint.yml has existing url and wait time values set, if so give warning we are overwriting # the endpoint.yml file. - custom_wait_time_pulls = endpoints.model.kwargs['wait_time_between_pulls'] + custom_wait_time_pulls = endpoints.model.kwargs["wait_time_between_pulls"] custom_url = endpoints.model.url if custom_url is not None: - cli_utils.print_warning("Modifying the endpoints.yml file for Rasa X with our defaults") - + cli_utils.print_warning( + "Modifying the endpoints.yml file for Rasa X with our defaults" + ) + if custom_wait_time_pulls: endpoints.model = EndpointConfig( - "{}/projects/default/models/tags/production".format(rasa_x_url), - token=rasa_x_token, - wait_time_between_pulls=custom_wait_time_pulls, + "{}/projects/default/models/tags/production".format(rasa_x_url), + token=rasa_x_token, + wait_time_between_pulls=custom_wait_time_pulls, ) else: endpoints.model = EndpointConfig( - "{}/projects/default/models/tags/production".format(rasa_x_url), - token=rasa_x_token, - wait_time_between_pulls=2, + "{}/projects/default/models/tags/production".format(rasa_x_url), + token=rasa_x_token, + wait_time_between_pulls=2, ) - overwrite_existing_event_broker = False if endpoints.event_broker and not _is_correct_event_broker(endpoints.event_broker): From 41e73d488910a710f625b62095e97e5e4f85841a Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 15:46:12 +0200 Subject: [PATCH 03/28] fixing the logging message based on review --- rasa/cli/x.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index f9b2bfd29063..ffc357ba05b7 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -117,8 +117,11 @@ def _overwrite_endpoints_for_local_x( custom_url = endpoints.model.url if custom_url is not None: - cli_utils.print_warning( - "Modifying the endpoints.yml file for Rasa X with our defaults" + logger.info( + "Ignoring url '{0}' from 'endpoints.yml' and using " + "{1}/projects/default/models/tag/production instead".format( + custom_url,rasa_x_url + ) ) if custom_wait_time_pulls: From 6b3123a2bb8a21a50856bf99b83ce7363ae1176b Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 15:48:03 +0200 Subject: [PATCH 04/28] fixing logging feedback and if condition --- rasa/cli/x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index ffc357ba05b7..2ea8a209cb6c 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -116,7 +116,7 @@ def _overwrite_endpoints_for_local_x( custom_wait_time_pulls = endpoints.model.kwargs["wait_time_between_pulls"] custom_url = endpoints.model.url - if custom_url is not None: + if custom_url is not None and custom_url != model_pull_url: logger.info( "Ignoring url '{0}' from 'endpoints.yml' and using " "{1}/projects/default/models/tag/production instead".format( From 522f15c017d0e13a604649ee9e73ed3d96fb3bca Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 15:55:21 +0200 Subject: [PATCH 05/28] fixing kwargs to prevent key error --- rasa/cli/x.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 2ea8a209cb6c..e268c0cb26be 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -113,10 +113,11 @@ def _overwrite_endpoints_for_local_x( # Checking if endpoint.yml has existing url and wait time values set, if so give warning we are overwriting # the endpoint.yml file. - custom_wait_time_pulls = endpoints.model.kwargs["wait_time_between_pulls"] + custom_wait_time_pulls = endpoints.model.kwargs.get("wait_time_between_pulls") custom_url = endpoints.model.url - if custom_url is not None and custom_url != model_pull_url: + + if custom_url is not None and custom_url != custom_url: logger.info( "Ignoring url '{0}' from 'endpoints.yml' and using " "{1}/projects/default/models/tag/production instead".format( From 808f99d51de873ede38a92f833b716672eefa361 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 16:01:08 +0200 Subject: [PATCH 06/28] fixed a typo in conditional statement and de-duplicated some code --- rasa/cli/x.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index e268c0cb26be..26d90d575ade 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -117,7 +117,7 @@ def _overwrite_endpoints_for_local_x( custom_url = endpoints.model.url - if custom_url is not None and custom_url != custom_url: + if custom_url is not None and custom_url != rasa_x_url: logger.info( "Ignoring url '{0}' from 'endpoints.yml' and using " "{1}/projects/default/models/tag/production instead".format( @@ -125,18 +125,11 @@ def _overwrite_endpoints_for_local_x( ) ) - if custom_wait_time_pulls: - endpoints.model = EndpointConfig( - "{}/projects/default/models/tags/production".format(rasa_x_url), - token=rasa_x_token, - wait_time_between_pulls=custom_wait_time_pulls, - ) - else: - endpoints.model = EndpointConfig( - "{}/projects/default/models/tags/production".format(rasa_x_url), - token=rasa_x_token, - wait_time_between_pulls=2, - ) + endpoints.model = EndpointConfig( + "{}/projects/default/models/tags/production".format(rasa_x_url), + token=rasa_x_token, + wait_time_between_pulls=custom_wait_time_pulls, + ) overwrite_existing_event_broker = False if endpoints.event_broker and not _is_correct_event_broker(endpoints.event_broker): From 235597b5c916fa31c12ebcf993bb0cea38f72f6b Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 16:01:53 +0200 Subject: [PATCH 07/28] added or condition to endpoints setup --- rasa/cli/x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 26d90d575ade..0915fb458b86 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -128,7 +128,7 @@ def _overwrite_endpoints_for_local_x( endpoints.model = EndpointConfig( "{}/projects/default/models/tags/production".format(rasa_x_url), token=rasa_x_token, - wait_time_between_pulls=custom_wait_time_pulls, + wait_time_between_pulls=custom_wait_time_pulls or 2, ) overwrite_existing_event_broker = False From 06d060974da722b95fc964fd3adfb121b5017553 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 18 Oct 2019 16:05:24 +0200 Subject: [PATCH 08/28] updated the changelog --- CHANGELOG.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b87508252c7a..9b5bf466c0bd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,7 +41,9 @@ Changed trackers are still loaded from pickle but will be dumped as json in any subsequent save operations. - Event brokers are now also passed to custom tracker stores (using the ``event_broker`` parameter) -- Updated Rasa X model pull interval to be used and give a warning message if the user has a custom url in the ``endpoints.yml`` file. +- Give a info message now if we will be updating the ``endpoints.yml`` file when using Rasa X if custom_url is set. +- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, + this will be used instead of the default one when running Rasa X - Updated the ``/status`` api route to use the actual model file location instead of the ``tmp`` location. From e674b898ff9428c13c5712d3aabd604c2be1dd8c Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 22 Oct 2019 09:23:34 +0200 Subject: [PATCH 09/28] updating PR based on feedback --- CHANGELOG.rst | 2 +- rasa/cli/x.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9b5bf466c0bd..6ab68fd2f36e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,7 +41,7 @@ Changed trackers are still loaded from pickle but will be dumped as json in any subsequent save operations. - Event brokers are now also passed to custom tracker stores (using the ``event_broker`` parameter) -- Give a info message now if we will be updating the ``endpoints.yml`` file when using Rasa X if custom_url is set. +- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` - If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, this will be used instead of the default one when running Rasa X - Updated the ``/status`` api route to use the actual model file location instead of the ``tmp`` location. diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 0915fb458b86..701f57cce702 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -117,16 +117,14 @@ def _overwrite_endpoints_for_local_x( custom_url = endpoints.model.url - if custom_url is not None and custom_url != rasa_x_url: + if custom_url and custom_url != rasa_x_url: logger.info( - "Ignoring url '{0}' from 'endpoints.yml' and using " - "{1}/projects/default/models/tag/production instead".format( - custom_url,rasa_x_url - ) + f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " + f"{rasa_x_url}/projects/default/models/tag/production instead" ) endpoints.model = EndpointConfig( - "{}/projects/default/models/tags/production".format(rasa_x_url), + f"{rasa_x_url}/projects/default/models/tags/production", token=rasa_x_token, wait_time_between_pulls=custom_wait_time_pulls or 2, ) From 4c75164e4cfdb0ec56e357404cc919c40ba00540 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 22 Oct 2019 10:27:21 +0200 Subject: [PATCH 10/28] fixing linting error --- rasa/cli/x.py | 1 - 1 file changed, 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 701f57cce702..ca6e6d4d4e6d 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -116,7 +116,6 @@ def _overwrite_endpoints_for_local_x( custom_wait_time_pulls = endpoints.model.kwargs.get("wait_time_between_pulls") custom_url = endpoints.model.url - if custom_url and custom_url != rasa_x_url: logger.info( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " From b6c2a50cd90d40aba333d364b252bfd2739c7a55 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 29 Oct 2019 08:45:06 -0400 Subject: [PATCH 11/28] updating based on feedback --- CHANGELOG.rst | 6 +++--- rasa/cli/x.py | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index aae22fcfe471..176e43c5468b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,9 @@ Added Changed ------- +- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` +- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, + this will be used instead of the default one when running Rasa X Removed ------- @@ -80,9 +83,6 @@ Changed trackers are still loaded from pickle but will be dumped as json in any subsequent save operations. - Event brokers are now also passed to custom tracker stores (using the ``event_broker`` parameter) -- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` -- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, - this will be used instead of the default one when running Rasa X - Don't run the Rasa Docker image as ``root``. - Use multi-stage builds to reduce the size of the Rasa Docker image. - Updated the ``/status`` api route to use the actual model file location instead of the ``tmp`` location. diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 265d4ab9f7c3..732f0038664a 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -116,15 +116,16 @@ def _overwrite_endpoints_for_local_x( # the endpoint.yml file. custom_wait_time_pulls = endpoints.model.kwargs.get("wait_time_between_pulls") custom_url = endpoints.model.url + default_rasax_model_server_url = f"{rasa_x_url}/projects/default/models/tag/production" - if custom_url and custom_url != rasa_x_url: + if custom_url != default_rasax_model_server_url: logger.info( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " - f"{rasa_x_url}/projects/default/models/tag/production instead" + f"{default_rasax_model_server_url} instead" ) endpoints.model = EndpointConfig( - f"{rasa_x_url}/projects/default/models/tags/production", + f"{default_rasax_model_server_url}", token=rasa_x_token, wait_time_between_pulls=custom_wait_time_pulls or 2, ) From dcb942633eb4271af977b310c46e9f85d664de17 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 29 Oct 2019 09:05:13 -0400 Subject: [PATCH 12/28] forgot check to verify custom_url isn't empty --- rasa/cli/x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 732f0038664a..b3494caaa35a 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -118,7 +118,7 @@ def _overwrite_endpoints_for_local_x( custom_url = endpoints.model.url default_rasax_model_server_url = f"{rasa_x_url}/projects/default/models/tag/production" - if custom_url != default_rasax_model_server_url: + if custom_url is not None and != default_rasax_model_server_url: logger.info( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " f"{default_rasax_model_server_url} instead" From 0d9fd830719715313dc71d2204aac5ddd2a44401 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Wed, 30 Oct 2019 06:56:20 -0400 Subject: [PATCH 13/28] fixing 2 review issues --- rasa/cli/x.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index b3494caaa35a..2f8510ae7e91 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -118,10 +118,10 @@ def _overwrite_endpoints_for_local_x( custom_url = endpoints.model.url default_rasax_model_server_url = f"{rasa_x_url}/projects/default/models/tag/production" - if custom_url is not None and != default_rasax_model_server_url: + if custom_url is not None and custom_url != default_rasax_model_server_url: logger.info( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " - f"{default_rasax_model_server_url} instead" + f"'{default_rasax_model_server_url}' instead" ) endpoints.model = EndpointConfig( From 86857263cdf76ef6c5d97b93989eb61d68a662fe Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Wed, 30 Oct 2019 06:57:04 -0400 Subject: [PATCH 14/28] updating with black --- rasa/cli/x.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 2f8510ae7e91..487b6c5acc4b 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -116,7 +116,9 @@ def _overwrite_endpoints_for_local_x( # the endpoint.yml file. custom_wait_time_pulls = endpoints.model.kwargs.get("wait_time_between_pulls") custom_url = endpoints.model.url - default_rasax_model_server_url = f"{rasa_x_url}/projects/default/models/tag/production" + default_rasax_model_server_url = ( + f"{rasa_x_url}/projects/default/models/tag/production" + ) if custom_url is not None and custom_url != default_rasax_model_server_url: logger.info( From b56a67b0819ba0957dbf3aee11a6986c5b205254 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 15 Nov 2019 09:33:44 -0500 Subject: [PATCH 15/28] updating first test to check for url --- rasa/cli/x.py | 2 ++ tests/cli/test_rasa_x.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 487b6c5acc4b..1c7c56818958 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -150,6 +150,8 @@ def _overwrite_endpoints_for_local_x( if not endpoints.tracker_store or overwrite_existing_event_broker: endpoints.event_broker = EndpointConfig(type="sql", db=DEFAULT_EVENTS_DB) + return endpoints + def _is_correct_event_broker(event_broker: EndpointConfig) -> bool: return all( diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index 6b6da6cbfa1c..d254bebfbd0e 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -9,6 +9,7 @@ import rasa.utils.io as io_utils from rasa.cli import x from rasa.utils.endpoints import EndpointConfig +from rasa.core.utils import AvailableEndpoints def test_x_help(run: Callable[..., RunResult]): @@ -79,6 +80,14 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): config = EndpointConfig(**kwargs) assert not x._is_correct_event_broker(config) +def test_wait_time_between_pulls_custom(): + #endpoint_config = EndpointConfig(url="http://localhost:5002/api/projects/default/models/tag/production", wait_time_between_pulls=3) + endpoint_config = EndpointConfig(url="http://testserver:5002/models/default@latest", wait_time_between_pulls=5) + endpoints = AvailableEndpoints(model=endpoint_config) + + updated_endpoints = x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + updated_config = updated_endpoints.model + assert updated_config.url == 'http://localhost/projects/default/models/tag/production' async def test_pull_runtime_config_from_server(): config_url = "http://example.com/api/config?token=token" @@ -99,6 +108,7 @@ async def test_pull_runtime_config_from_server(): endpoints_path, credentials_path = await x._pull_runtime_config_from_server( config_url, 1, 0 ) + with open(endpoints_path) as f: assert f.read() == endpoint_config From 54a372a355bc4867a8b8265b8c60cfe06f923d1f Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 15 Nov 2019 10:13:59 -0500 Subject: [PATCH 16/28] cleaning up some code based on review --- rasa/cli/x.py | 6 +++--- tests/cli/test_rasa_x.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index bac01c3af8f0..8da99c7234eb 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -120,14 +120,14 @@ def _overwrite_endpoints_for_local_x( f"{rasa_x_url}/projects/default/models/tag/production" ) - if custom_url is not None and custom_url != default_rasax_model_server_url: + if custom_url != default_rasax_model_server_url: logger.info( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " - f"'{default_rasax_model_server_url}' instead" + f"'{default_rasax_model_server_url}' instead." ) endpoints.model = EndpointConfig( - f"{default_rasax_model_server_url}", + default_rasax_model_server_url, token=rasa_x_token, wait_time_between_pulls=custom_wait_time_pulls or 2, ) diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index 30c32c48db15..d1544f9f3751 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -127,7 +127,6 @@ async def test_pull_runtime_config_from_server(): config_url, 1, 0 ) - with open(endpoints_path) as f: assert f.read() == endpoint_config with open(credentials_path) as f: From 0fc1032632a3e1796c4b7e23a500f8ca83bd5995 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 15 Nov 2019 10:17:20 -0500 Subject: [PATCH 17/28] fixed some formatting for tests --- tests/cli/test_rasa_x.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index d1544f9f3751..03e1f01b7ae7 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -16,7 +16,6 @@ from tests.conftest import assert_log_emitted - def test_x_help(run: Callable[..., RunResult]): output = run("x", "--help") @@ -85,26 +84,40 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): config = EndpointConfig(**kwargs) assert not x._is_correct_event_broker(config) + def test_overwrite_for_local_x(caplog: LogCaptureFixture): test_wait_time = 5 default_wait_time = 2 - endpoint_config_missing_wait = EndpointConfig(url="http://testserver:5002/models/default@latest") - endpoint_config_custom = EndpointConfig(url="http://testserver:5002/models/default@latest", wait_time_between_pulls=test_wait_time) + endpoint_config_missing_wait = EndpointConfig( + url="http://testserver:5002/models/default@latest" + ) + endpoint_config_custom = EndpointConfig( + url="http://testserver:5002/models/default@latest", + wait_time_between_pulls=test_wait_time, + ) endpoints_custom = AvailableEndpoints(model=endpoint_config_custom) endpoints_missing_wait = AvailableEndpoints(model=endpoint_config_missing_wait) # Check that we get INFO message about overwriting the endpoints configuration log_message = "Ignoring url 'http://testserver:5002/models/default@latest' from 'endpoints.yml' and using 'http://localhost/projects/default/models/tag/production' instead" - with assert_log_emitted(caplog, 'rasa.cli.x', logging.INFO, log_message): + with assert_log_emitted(caplog, "rasa.cli.x", logging.INFO, log_message): x._overwrite_endpoints_for_local_x(endpoints_custom, "test", "http://localhost") # Checking for url to be changed in config and wait time value to be honored - assert endpoints_custom.model.url == 'http://localhost/projects/default/models/tag/production' - assert endpoints_custom.model.kwargs['wait_time_between_pulls'] == test_wait_time + assert ( + endpoints_custom.model.url + == "http://localhost/projects/default/models/tag/production" + ) + assert endpoints_custom.model.kwargs["wait_time_between_pulls"] == test_wait_time # Check for wait time to be set to 3 since it isn't specified - x._overwrite_endpoints_for_local_x(endpoints_missing_wait, "test", "http://localhost") - assert endpoints_missing_wait.model.kwargs['wait_time_between_pulls'] == default_wait_time + x._overwrite_endpoints_for_local_x( + endpoints_missing_wait, "test", "http://localhost" + ) + assert ( + endpoints_missing_wait.model.kwargs["wait_time_between_pulls"] + == default_wait_time + ) async def test_pull_runtime_config_from_server(): @@ -126,7 +139,7 @@ async def test_pull_runtime_config_from_server(): endpoints_path, credentials_path = await x._pull_runtime_config_from_server( config_url, 1, 0 ) - + with open(endpoints_path) as f: assert f.read() == endpoint_config with open(credentials_path) as f: From f4f640f5e0cd30f87b348714c738ce9f9b070388 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Thu, 21 Nov 2019 14:36:33 -0500 Subject: [PATCH 18/28] updated tests and setup warnings.warn --- rasa/cli/x.py | 3 +- tests/cli/test_rasa_x.py | 71 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index 8da99c7234eb..d0203bc7409c 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -2,6 +2,7 @@ import asyncio import importlib.util import logging +import warnings import os import signal import traceback @@ -121,7 +122,7 @@ def _overwrite_endpoints_for_local_x( ) if custom_url != default_rasax_model_server_url: - logger.info( + warnings.warn( f"Ignoring url '{custom_url}' from 'endpoints.yml' and using " f"'{default_rasax_model_server_url}' instead." ) diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index 03e1f01b7ae7..eb52a250e485 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -1,5 +1,5 @@ from pathlib import Path -import logging +import warnings import pytest from typing import Callable, Dict @@ -13,7 +13,6 @@ from rasa.cli import x from rasa.utils.endpoints import EndpointConfig from rasa.core.utils import AvailableEndpoints -from tests.conftest import assert_log_emitted def test_x_help(run: Callable[..., RunResult]): @@ -85,23 +84,83 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): assert not x._is_correct_event_broker(config) +def test_overwrite_model_server_url(): + """ + Ensures the model url is overwritten + :return: + """ + endpoint_config = EndpointConfig(url="http://testserver:5002/models/default@latest") + endpoints = AvailableEndpoints(model=endpoint_config) + x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + assert ( + endpoints.model.url == "http://localhost/projects/default/models/tag/production" + ) + # Check that we get INFO message about overwriting the endpoints configuration + log_message = "Ignoring url 'http://testserver:5002/models/default@latest' from 'endpoints.yml' and using 'http://localhost/projects/default/models/tag/production' instead" + with warnings.catch_warnings(record=True): + x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + + +def test_reuse_wait_time_between_pulls(): + """ + Checks to ensure wait_between_pull_time is honored + :return: + """ + test_wait_time = 5 + endpoint_config = EndpointConfig( + url="http://localhost:5002/models/default@latest", + wait_time_between_pulls=test_wait_time, + ) + endpoints = AvailableEndpoints(model=endpoint_config) + assert endpoints.model.kwargs["wait_time_between_pulls"] == test_wait_time + + +def test_no_wait_time_between_pulls(): + """ + Checks to ensure when wait_between_pull_time isn't specified it should be default value + :return: + """ + endpoint_config = EndpointConfig(url="http://localhost:5002/models/default@latest") + endpoints = AvailableEndpoints(model=endpoint_config) + x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + assert endpoints.model.kwargs["wait_time_between_pulls"] == 2 + + +def test_no_model_server_url(): + """ + Checks for the model server url being empty to ensure it gives back default value. + :return: + """ + endpoint_config = EndpointConfig() + endpoints = AvailableEndpoints(model=endpoint_config) + x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + assert ( + endpoints.model.url == "http://localhost/projects/default/models/tag/production" + ) + + def test_overwrite_for_local_x(caplog: LogCaptureFixture): test_wait_time = 5 default_wait_time = 2 endpoint_config_missing_wait = EndpointConfig( - url="http://testserver:5002/models/default@latest" + url="http://localhost:5002/models/default@latest" ) endpoint_config_custom = EndpointConfig( - url="http://testserver:5002/models/default@latest", + url="http://localhost:5002/models/default@latest", wait_time_between_pulls=test_wait_time, ) endpoints_custom = AvailableEndpoints(model=endpoint_config_custom) endpoints_missing_wait = AvailableEndpoints(model=endpoint_config_missing_wait) # Check that we get INFO message about overwriting the endpoints configuration - log_message = "Ignoring url 'http://testserver:5002/models/default@latest' from 'endpoints.yml' and using 'http://localhost/projects/default/models/tag/production' instead" - with assert_log_emitted(caplog, "rasa.cli.x", logging.INFO, log_message): + expected_warning = ( + "Ignoring url 'http://localhost:5002/models/default@latest' from 'endpoints.yml'" + " and using 'http://localhost/projects/default/models/tag/production' instead." + ) + with pytest.warns(UserWarning, match="test") as warning_checker: x._overwrite_endpoints_for_local_x(endpoints_custom, "test", "http://localhost") + warning = warning_checker.list[0] + assert str(warning.message) == expected_warning # Checking for url to be changed in config and wait time value to be honored assert ( From e966628ebfa842261b13b92420d14c5fa94532d6 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Fri, 22 Nov 2019 06:59:42 -0500 Subject: [PATCH 19/28] updating based on last review --- rasa/cli/x.py | 4 +-- tests/cli/test_rasa_x.py | 64 ++-------------------------------------- 2 files changed, 5 insertions(+), 63 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index d0203bc7409c..a3df4eb89e21 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -113,8 +113,8 @@ def _overwrite_endpoints_for_local_x( from rasa.utils.endpoints import EndpointConfig import questionary - # Checking if endpoint.yml has existing url and wait time values set, if so give warning we are overwriting - # the endpoint.yml file. + # Checking if endpoint.yml has existing url and wait time values set, if so give + # warning we are overwriting the endpoint.yml file. custom_wait_time_pulls = endpoints.model.kwargs.get("wait_time_between_pulls") custom_url = endpoints.model.url default_rasax_model_server_url = ( diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index eb52a250e485..0f1abfe20fea 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -85,27 +85,17 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): def test_overwrite_model_server_url(): - """ - Ensures the model url is overwritten - :return: - """ endpoint_config = EndpointConfig(url="http://testserver:5002/models/default@latest") endpoints = AvailableEndpoints(model=endpoint_config) x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") assert ( endpoints.model.url == "http://localhost/projects/default/models/tag/production" ) - # Check that we get INFO message about overwriting the endpoints configuration - log_message = "Ignoring url 'http://testserver:5002/models/default@latest' from 'endpoints.yml' and using 'http://localhost/projects/default/models/tag/production' instead" - with warnings.catch_warnings(record=True): + with pytest.warns(UserWarning): x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") def test_reuse_wait_time_between_pulls(): - """ - Checks to ensure wait_between_pull_time is honored - :return: - """ test_wait_time = 5 endpoint_config = EndpointConfig( url="http://localhost:5002/models/default@latest", @@ -115,22 +105,14 @@ def test_reuse_wait_time_between_pulls(): assert endpoints.model.kwargs["wait_time_between_pulls"] == test_wait_time -def test_no_wait_time_between_pulls(): - """ - Checks to ensure when wait_between_pull_time isn't specified it should be default value - :return: - """ +def test_default_wait_time_between_pulls(): endpoint_config = EndpointConfig(url="http://localhost:5002/models/default@latest") endpoints = AvailableEndpoints(model=endpoint_config) x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") assert endpoints.model.kwargs["wait_time_between_pulls"] == 2 -def test_no_model_server_url(): - """ - Checks for the model server url being empty to ensure it gives back default value. - :return: - """ +def test_default_model_server_url(): endpoint_config = EndpointConfig() endpoints = AvailableEndpoints(model=endpoint_config) x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") @@ -139,46 +121,6 @@ def test_no_model_server_url(): ) -def test_overwrite_for_local_x(caplog: LogCaptureFixture): - test_wait_time = 5 - default_wait_time = 2 - endpoint_config_missing_wait = EndpointConfig( - url="http://localhost:5002/models/default@latest" - ) - endpoint_config_custom = EndpointConfig( - url="http://localhost:5002/models/default@latest", - wait_time_between_pulls=test_wait_time, - ) - endpoints_custom = AvailableEndpoints(model=endpoint_config_custom) - endpoints_missing_wait = AvailableEndpoints(model=endpoint_config_missing_wait) - - # Check that we get INFO message about overwriting the endpoints configuration - expected_warning = ( - "Ignoring url 'http://localhost:5002/models/default@latest' from 'endpoints.yml'" - " and using 'http://localhost/projects/default/models/tag/production' instead." - ) - with pytest.warns(UserWarning, match="test") as warning_checker: - x._overwrite_endpoints_for_local_x(endpoints_custom, "test", "http://localhost") - warning = warning_checker.list[0] - assert str(warning.message) == expected_warning - - # Checking for url to be changed in config and wait time value to be honored - assert ( - endpoints_custom.model.url - == "http://localhost/projects/default/models/tag/production" - ) - assert endpoints_custom.model.kwargs["wait_time_between_pulls"] == test_wait_time - - # Check for wait time to be set to 3 since it isn't specified - x._overwrite_endpoints_for_local_x( - endpoints_missing_wait, "test", "http://localhost" - ) - assert ( - endpoints_missing_wait.model.kwargs["wait_time_between_pulls"] - == default_wait_time - ) - - async def test_pull_runtime_config_from_server(): config_url = "http://example.com/api/config?token=token" credentials = "rasa: http://example.com:5002/api" From e266dda22802ed0a9427dbcb0d68f1b0bd341cff Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Mon, 25 Nov 2019 06:14:24 -0500 Subject: [PATCH 20/28] trying to fix changelog conflict issue --- CHANGELOG.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 01f8a5c482e8..8b5c8939521b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -28,11 +28,11 @@ Added Changed ------- +- Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. +- Upgraded ``jsonschema`` version - Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` - If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, this will be used instead of the default one when running Rasa X -- Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. -- Upgraded ``jsonschema`` version Removed ------- From ca437cb4b5a218f3457b8ca809e28e8793d3292d Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Mon, 25 Nov 2019 07:45:59 -0500 Subject: [PATCH 21/28] fixing tests based on recent master changes --- rasa/cli/x.py | 8 +++---- tests/cli/test_rasa_x.py | 46 ++++++++-------------------------------- 2 files changed, 13 insertions(+), 41 deletions(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index d32edba59fd4..dc817e0f3647 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -133,6 +133,7 @@ def _overwrite_endpoints_for_local_x( wait_time_between_pulls=custom_wait_time_pulls or 2, ) + overwrite_existing_event_broker = False if endpoints.event_broker and not _is_correct_event_broker(endpoints.event_broker): cli_utils.print_error( "Rasa X currently only supports a SQLite event broker with path '{}' " @@ -147,9 +148,8 @@ def _overwrite_endpoints_for_local_x( if not overwrite_existing_event_broker: exit(0) - endpoints.event_broker = EndpointConfig( - type="sql", db=DEFAULT_EVENTS_DB, dialect="sqlite" - ) + if not endpoints.tracker_store or overwrite_existing_event_broker: + endpoints.event_broker = EndpointConfig(type="sql", db=DEFAULT_EVENTS_DB) def _is_correct_event_broker(event_broker: EndpointConfig) -> bool: @@ -419,4 +419,4 @@ def run_locally(args: argparse.Namespace): "the issue visit our forum: https://forum.rasa.com/." ) finally: - process.terminate() + process.terminate() \ No newline at end of file diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index 8e7d893eaf59..b9e424ebc707 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -1,19 +1,18 @@ from pathlib import Path -from unittest.mock import Mock +import warnings -from typing import Callable, Dict, Text, Any import pytest +from typing import Callable, Dict from _pytest.pytester import RunResult +from _pytest.logging import LogCaptureFixture -from _pytest.monkeypatch import MonkeyPatch -import questionary from aioresponses import aioresponses import rasa.utils.io as io_utils from rasa.cli import x -from rasa.core.utils import AvailableEndpoints from rasa.utils.endpoints import EndpointConfig +from rasa.core.utils import AvailableEndpoints def test_x_help(run: Callable[..., RunResult]): @@ -66,33 +65,6 @@ def test_prepare_credentials_if_already_valid(tmpdir: Path): assert actual == credentials -@pytest.mark.parametrize( - "event_broker", - [ - # Event broker was not configured. - {}, - # Event broker was explicitly configured to work with Rasa X in local mode. - {"type": "sql", "dialect": "sqlite", "db": x.DEFAULT_EVENTS_DB}, - # Event broker was configured but the values are not compatible for running Rasa - # X in local mode. - {"type": "sql", "dialect": "postgresql"}, - ], -) -def test_overwrite_endpoints_for_local_x( - event_broker: Dict[Text, Any], monkeypatch: MonkeyPatch -): - confirm = Mock() - confirm.return_value.ask.return_value = True - monkeypatch.setattr(questionary, "confirm", confirm) - - event_broker_config = EndpointConfig.from_dict(event_broker) - endpoints = AvailableEndpoints(event_broker=event_broker_config) - - x._overwrite_endpoints_for_local_x(endpoints, "test-token", "http://localhost:5002") - - assert x._is_correct_event_broker(endpoints.event_broker) - - def test_if_endpoint_config_is_valid_in_local_mode(): config = EndpointConfig(type="sql", dialect="sqlite", db=x.DEFAULT_EVENTS_DB) @@ -113,14 +85,14 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): def test_overwrite_model_server_url(): - endpoint_config = EndpointConfig(url="http://testserver:5002/models/default@latest") + endpoint_config = EndpointConfig( + url="http://testserver:5002/models/default@latest") endpoints = AvailableEndpoints(model=endpoint_config) - x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") + with pytest.warns(UserWarning): + x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") assert ( endpoints.model.url == "http://localhost/projects/default/models/tag/production" ) - with pytest.warns(UserWarning): - x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") def test_reuse_wait_time_between_pulls(): @@ -172,4 +144,4 @@ async def test_pull_runtime_config_from_server(): with open(endpoints_path) as f: assert f.read() == endpoint_config with open(credentials_path) as f: - assert f.read() == credentials + assert f.read() == credentials \ No newline at end of file From 88b5d4f2e0df0f4e7d5ffc23bbe5497d69d304dc Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Mon, 25 Nov 2019 08:04:13 -0500 Subject: [PATCH 22/28] fixed formatting of test file --- tests/cli/test_rasa_x.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/cli/test_rasa_x.py b/tests/cli/test_rasa_x.py index b9e424ebc707..6e04f36ffee4 100644 --- a/tests/cli/test_rasa_x.py +++ b/tests/cli/test_rasa_x.py @@ -85,8 +85,7 @@ def test_if_endpoint_config_is_invalid_in_local_mode(kwargs: Dict): def test_overwrite_model_server_url(): - endpoint_config = EndpointConfig( - url="http://testserver:5002/models/default@latest") + endpoint_config = EndpointConfig(url="http://testserver:5002/models/default@latest") endpoints = AvailableEndpoints(model=endpoint_config) with pytest.warns(UserWarning): x._overwrite_endpoints_for_local_x(endpoints, "test", "http://localhost") @@ -144,4 +143,4 @@ async def test_pull_runtime_config_from_server(): with open(endpoints_path) as f: assert f.read() == endpoint_config with open(credentials_path) as f: - assert f.read() == credentials \ No newline at end of file + assert f.read() == credentials From 212e2be0ffdf5aeb542c82cf3591442438a4ae8b Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Mon, 25 Nov 2019 08:04:43 -0500 Subject: [PATCH 23/28] fixed formatting of test file --- rasa/cli/x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/cli/x.py b/rasa/cli/x.py index dc817e0f3647..dc2d05a97da0 100644 --- a/rasa/cli/x.py +++ b/rasa/cli/x.py @@ -419,4 +419,4 @@ def run_locally(args: argparse.Namespace): "the issue visit our forum: https://forum.rasa.com/." ) finally: - process.terminate() \ No newline at end of file + process.terminate() From 914aa4b371e18beb01a31c7b44e1060808556041 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Mon, 25 Nov 2019 09:17:14 -0500 Subject: [PATCH 24/28] fixing changelog based on review --- CHANGELOG.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 91fc1eb6d9bf..ac1f9edf3363 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -29,11 +29,6 @@ Added Changed ------- -- Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. -- Upgraded ``jsonschema`` version -- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` -- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, - this will be used instead of the default one when running Rasa X - Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. - Upgraded ``jsonschema`` version. From 3fde3fd30def605afa482d7ca92bd6909e896942 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 26 Nov 2019 09:19:27 -0500 Subject: [PATCH 25/28] adding in updates to changelog --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ac1f9edf3363..86806f1bbf18 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -32,6 +32,9 @@ Changed - Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. - Upgraded ``jsonschema`` version. +- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` +- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, + this will be used instead of the default one when running Rasa X Removed ------- From 32bf73215f98eb446b4f9fa58202477ee8e4e9f8 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 26 Nov 2019 09:32:20 -0500 Subject: [PATCH 26/28] putting it on the right section this time --- CHANGELOG.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d81ec24984d1..d99e11f82b43 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,9 @@ Added Changed ------- +- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` +- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, + this will be used instead of the default one when running Rasa X Removed ------- @@ -47,9 +50,6 @@ Changed - Do not retrain the entire Core model if only the ``templates`` section of the domain is changed. - Upgraded ``jsonschema`` version. -- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` -- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, - this will be used instead of the default one when running Rasa X Removed ------- From 6c67039c18363409f8339b90c8702546f9528d46 Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 26 Nov 2019 15:35:28 +0100 Subject: [PATCH 27/28] fix duplicate `and` --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d99e11f82b43..8699690e27f0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Added Changed ------- -- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` +- Print info message when running Rasa X and a custom model server url was specified in ``endpoints.yml`` - If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, this will be used instead of the default one when running Rasa X From c4d0379245e2d329db54a1858a8003907ebe1684 Mon Sep 17 00:00:00 2001 From: Brian Hopkins Date: Tue, 26 Nov 2019 09:36:27 -0500 Subject: [PATCH 28/28] removing duplicate and from changelog entry --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d99e11f82b43..8699690e27f0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Added Changed ------- -- Print info message when running Rasa X and and custom model server url was specified in ``endpoints.yml`` +- Print info message when running Rasa X and a custom model server url was specified in ``endpoints.yml`` - If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``, this will be used instead of the default one when running Rasa X