Skip to content

Commit

Permalink
Merge pull request #12252 from RasaHQ/merge-3.5.x-main-1bf7b1a
Browse files Browse the repository at this point in the history
Merge 3.5.x into main
  • Loading branch information
sanchariGr authored Apr 11, 2023
2 parents 53f3255 + 01f83ee commit b894719
Show file tree
Hide file tree
Showing 13 changed files with 325 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
shell: bash

- name: Install poetry 🦄
uses: Gr1N/setup-poetry@09236184f6c1ab47c0dc9c1001c7fe200cf2afb0
uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844
with:
poetry-version: ${{ env.POETRY_VERSION }}

Expand Down
88 changes: 87 additions & 1 deletion .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ jobs:
debug: true

integration_test:
name: Run Integration Tests
name: Run Non-Sequential Integration Tests
if: github.ref_type != 'tag'
runs-on: ubuntu-22.04
needs: [changes]
Expand Down Expand Up @@ -686,6 +686,92 @@ jobs:
run: |
make test-integration
sequential_integration_test:
name: Run Sequential Integration Tests
runs-on: ubuntu-20.04
needs: [changes]
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

services:
postgres:
image: postgres:13
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
# postgres image requires password to be set
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
ports:
# FIXME: cannot use ${{ env.POSTGRES_PORT }} here
# mapping container ports to the host
- 5432:5432

steps:
- name: Checkout git repository 🕝
if: needs.changes.outputs.backend == 'true'
uses: actions/checkout@v3

- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍
if: needs.changes.outputs.backend == 'true'
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Read Poetry Version 🔢
if: needs.changes.outputs.backend == 'true'
run: |
echo "POETRY_VERSION=$(scripts/poetry-version.sh)" >> $GITHUB_ENV
shell: bash

- name: Install poetry 🦄
if: needs.changes.outputs.backend == 'true'
uses: Gr1N/setup-poetry@09236184f6c1ab47c0dc9c1001c7fe200cf2afb0 # v7
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Load Poetry Cached Libraries ⬇
id: cache-poetry
if: needs.changes.outputs.backend == 'true'
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ env.DEFAULT_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-venv-${{ secrets.POETRY_CACHE_VERSION }}-${{ env.pythonLocation }}

- name: Clear Poetry cache
if: steps.cache-poetry.outputs.cache-hit == 'true' && needs.changes.outputs.backend == 'true' && contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-unit-tests')
run: rm -r .venv

# Poetry >= 1.1.0b uses virtualenv to create a virtual environment.
# The virtualenv simply doesn't work on Windows with our setup,
# that's why we use venv to create virtual environment
- name: Create virtual environment
if: (steps.cache-poetry.outputs.cache-hit != 'true' || contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-unit-tests')) && needs.changes.outputs.backend == 'true'
run: python -m venv create .venv

- name: Set up virtual environment
if: needs.changes.outputs.backend == 'true'
# Poetry on Windows cannot pick up the virtual environments directory properly,
# and it creates a new one every time the pipeline runs.
# This step solves this problem — it tells poetry to always use `.venv` directory inside
# the project itself, which also makes it easier for us to determine the correct directory
# that needs to be cached.
run: poetry config virtualenvs.in-project true

- name: Install Dependencies (Linux) 📦
if: needs.changes.outputs.backend == 'true'
run: |
sudo apt-get -y install libpq-dev
make install-full | tee .output
if grep 'The lock file is not up to date' .output; then exit 1; fi
make prepare-tests-ubuntu
# these integration tests need to be ran in a sequential fashion,
# due to environment constraints, so we're running them in a single process.
- name: Test Code with Services 🩺 (sequential)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:

- name: Install poetry 🦄
if: needs.changes.outputs.docs == 'true'
uses: Gr1N/setup-poetry@09236184f6c1ab47c0dc9c1001c7fe200cf2afb0
uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844
with:
poetry-version: ${{ env.POETRY_VERSION }}

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->

<!-- TOWNCRIER -->

## [3.5.4] - 2023-04-05

Rasa 3.5.4 (2023-04-05)
### Bugfixes
- [#12226](https://github.com/rasahq/rasa/issues/12226): Fix issue with failures while publishing events to RabbitMQ after a RabbitMQ restart.
The fix consists of pinning `aio-pika` dependency to `8.2.3`, since this issue was introduced in `aio-pika` v`8.2.4`.
- [#12232](https://github.com/rasahq/rasa/issues/12232): Patch redis Race Conditiion vulnerability.

### Miscellaneous internal changes
- [#12230](https://github.com/rasahq/rasa/issues/12230), [#12238](https://github.com/rasahq/rasa/issues/12238)


## [3.5.3] - 2023-03-30

Rasa 3.5.3 (2023-03-30)
Expand Down
85 changes: 75 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .pytest_cache | build | dist))"

[tool.poetry]
name = "rasa"
version = "3.5.3"
version = "3.5.4"
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 <hi@rasa.com>",]
maintainers = [ "Tom Bocklisch <tom@rasa.com>",]
Expand Down Expand Up @@ -93,7 +93,7 @@ requests = "^2.23"
matplotlib = ">=3.1,<3.6"
attrs = ">=19.3,<22.2"
jsonpickle = ">=1.3,<3.1"
redis = ">=3.4,<5.0"
redis = ">=4.5.3, <5.0"
absl-py = ">=0.9,<1.4"
apscheduler = ">=3.6,<3.10"
tqdm = "^4.31"
Expand All @@ -116,6 +116,8 @@ terminaltables = "~3.1.0"
sanic = "~21.12"
sanic-cors = "~2.0.0"
sanic-jwt = "^1.6.0"
sanic-routing = "^0.7.2"
websockets = ">=10.0,<11.0"
cloudpickle = ">=1.2,<2.3"
aiohttp = ">=3.6,!=3.7.4.post0,<3.9"
questionary = ">=1.5.1,<1.11.0"
Expand All @@ -134,15 +136,14 @@ ujson = ">=1.35,<6.0"
regex = ">=2020.6,<2022.11"
joblib = ">=0.15.1,<1.3.0"
sentry-sdk = ">=0.17.0,<1.15.0"
aio-pika = ">=6.7.1,<9.0.0"
aio-pika = ">=6.7.1,<8.2.4"
aiogram = "<2.26"
typing-extensions = ">=4.1.1,<5.0.0"
typing-utils = "^0.1.0"
tarsafe = ">=0.0.3,<0.0.5"
google-auth = "<3"
CacheControl = "^0.12.9"
randomname = "^0.1.5"
sanic-routing = "^0.7.2"
pluggy = "^1.0.0"
slack-sdk = "^3.19.2"
confluent-kafka = ">=1.9.2,<3.0.0"
Expand Down Expand Up @@ -298,7 +299,6 @@ optional = true
version = "2.11.0"
markers = "sys_platform != 'win32' and platform_machine != 'arm64' and platform_machine != 'aarch64'"


[tool.poetry.dependencies."github3.py"]
version = "~3.2.0"
optional = true
Expand Down Expand Up @@ -326,3 +326,4 @@ branch = "fix_signal_issue"

[tool.poetry.group.dev.dependencies]
ruff = "^0.0.255"
docker = "^6.0.1"
3 changes: 1 addition & 2 deletions rasa/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,7 @@ async def parse_message(self, message_data: Text) -> Dict[Text, Any]:
Returns:
The parsed message.
Example:
Example:
{\
"text": '/greet{"name":"Rasa"}',\
"intent": {"name": "greet", "confidence": 1.0},\
Expand Down
2 changes: 2 additions & 0 deletions rasa/core/tracker_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def create(
domain=domain,
event_broker=event_broker,
)

tracker_store = (
_tracker_store
if _tracker_store
Expand Down Expand Up @@ -314,6 +315,7 @@ async def get_or_create_full_tracker(
async def stream_events(self, tracker: DialogueStateTracker) -> None:
"""Streams events to a message broker."""
if self.event_broker is None:
logger.debug("No event broker configured. Skipping streaming events.")
return None

offset = await self.number_of_existing_events(tracker.sender_id)
Expand Down
Loading

0 comments on commit b894719

Please sign in to comment.