Skip to content

Commit a10dcae

Browse files
Merge branch 'main' into refactor/elasticsearch-async-mixin-tests
2 parents 7d17a71 + 4b475ce commit a10dcae

33 files changed

Lines changed: 2477 additions & 7 deletions

.github/labeler.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ integration:docling:
6464
- any-glob-to-any-file: "integrations/docling/**/*"
6565
- any-glob-to-any-file: ".github/workflows/docling.yml"
6666

67+
integration:dspy:
68+
- changed-files:
69+
- any-glob-to-any-file: "integrations/dspy/**/*"
70+
- any-glob-to-any-file: ".github/workflows/dspy.yml"
71+
6772
integration:elasticsearch:
6873
- changed-files:
6974
- any-glob-to-any-file: "integrations/elasticsearch/**/*"
@@ -74,7 +79,6 @@ integration:faiss:
7479
- any-glob-to-any-file: "integrations/faiss/**/*"
7580
- any-glob-to-any-file: ".github/workflows/faiss.yml"
7681

77-
7882
integration:fastembed:
7983
- changed-files:
8084
- any-glob-to-any-file: "integrations/fastembed/**/*"
@@ -243,6 +247,11 @@ integration:stackit:
243247
- any-glob-to-any-file: "integrations/stackit/**/*"
244248
- any-glob-to-any-file: ".github/workflows/stackit.yml"
245249

250+
integration:supabase:
251+
- changed-files:
252+
- any-glob-to-any-file: "integrations/supabase/**/*"
253+
- any-glob-to-any-file: ".github/workflows/supabase.yml"
254+
246255
integration:tavily:
247256
- changed-files:
248257
- any-glob-to-any-file: "integrations/tavily/**/*"

.github/workflows/CI_coverage_comment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ on:
5050
- "Test / snowflake"
5151
- "Test / sqlalchemy"
5252
- "Test / stackit"
53+
- "Test / supabase"
5354
- "Test / tavily"
5455
- "Test / togetherai"
5556
- "Test / unstructured"

.github/workflows/supabase.yml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# This workflow comes from https://github.com/ofek/hatch-mypyc
2+
# https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml
3+
name: Test / supabase
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
pull_request:
9+
paths:
10+
- "integrations/supabase/**"
11+
- "!integrations/supabase/*.md"
12+
- ".github/workflows/supabase.yml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "integrations/supabase/**"
18+
- "!integrations/supabase/*.md"
19+
- ".github/workflows/supabase.yml"
20+
21+
defaults:
22+
run:
23+
working-directory: integrations/supabase
24+
25+
concurrency:
26+
group: supabase-${{ github.head_ref || github.sha }}
27+
cancel-in-progress: true
28+
29+
env:
30+
PYTHONUNBUFFERED: "1"
31+
FORCE_COLOR: "1"
32+
TEST_MATRIX_OS: '["ubuntu-latest"]'
33+
TEST_MATRIX_PYTHON: '["3.10", "3.14"]'
34+
35+
jobs:
36+
compute-test-matrix:
37+
runs-on: ubuntu-slim
38+
defaults:
39+
run:
40+
working-directory: .
41+
outputs:
42+
os: ${{ steps.set.outputs.os }}
43+
python-version: ${{ steps.set.outputs.python-version }}
44+
steps:
45+
- id: set
46+
run: |
47+
echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT"
48+
echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT"
49+
50+
run:
51+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
52+
needs: compute-test-matrix
53+
permissions:
54+
contents: write
55+
pull-requests: write
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
os: ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
61+
python-version: ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
62+
63+
services:
64+
pgvector:
65+
image: pgvector/pgvector:pg17
66+
env:
67+
POSTGRES_USER: postgres
68+
POSTGRES_PASSWORD: postgres
69+
POSTGRES_DB: postgres
70+
ports:
71+
- 5432:5432
72+
options: >-
73+
--health-cmd pg_isready
74+
--health-interval 10s
75+
--health-timeout 5s
76+
--health-retries 5
77+
78+
steps:
79+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
80+
81+
- name: Create pgvector extension
82+
run: >
83+
docker run --rm --network host
84+
-e PGPASSWORD=postgres
85+
pgvector/pgvector:pg17
86+
psql -h localhost -U postgres -d postgres -c "CREATE EXTENSION IF NOT EXISTS vector;"
87+
88+
- name: Set up Python ${{ matrix.python-version }}
89+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
90+
with:
91+
python-version: ${{ matrix.python-version }}
92+
93+
- name: Install Hatch
94+
run: pip install hatch
95+
- name: Lint
96+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
97+
run: hatch run fmt-check && hatch run test:types
98+
99+
- name: Run unit tests
100+
run: hatch run test:unit-cov-retry
101+
102+
# On PR: posts coverage comment (directly on same-repo PRs; via artifact for fork PRs). On push to main: stores coverage baseline on data branch.
103+
- name: Store unit tests coverage
104+
id: coverage_comment
105+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
106+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
107+
with:
108+
GITHUB_TOKEN: ${{ github.token }}
109+
COVERAGE_PATH: integrations/supabase
110+
SUBPROJECT_ID: supabase
111+
MINIMUM_GREEN: 90
112+
MINIMUM_ORANGE: 60
113+
114+
- name: Upload coverage comment to be posted
115+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name == 'pull_request' && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
116+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
117+
with:
118+
name: coverage-comment-supabase
119+
path: python-coverage-comment-action-supabase.txt
120+
121+
- name: Run integration tests
122+
if: runner.os == 'Linux'
123+
env:
124+
SUPABASE_DB_URL: "postgresql://postgres:postgres@localhost:5432/postgres"
125+
run: hatch run test:integration-cov-append-retry
126+
127+
- name: Store combined coverage
128+
if: github.event_name == 'push'
129+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
130+
with:
131+
GITHUB_TOKEN: ${{ github.token }}
132+
COVERAGE_PATH: integrations/supabase
133+
SUBPROJECT_ID: supabase-combined
134+
MINIMUM_GREEN: 90
135+
MINIMUM_ORANGE: 60
136+
137+
- name: Run unit tests with lowest direct dependencies
138+
if: github.event_name != 'push'
139+
run: |
140+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
141+
hatch -e test env run -- uv pip install -r requirements_lowest_direct.txt
142+
hatch run test:unit
143+
144+
- name: Nightly - run unit tests with Haystack main branch
145+
if: github.event_name == 'schedule'
146+
run: |
147+
hatch env prune
148+
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
149+
hatch run test:unit
150+
151+
152+
notify-slack-on-failure:
153+
needs: run
154+
if: failure() && github.event_name == 'schedule'
155+
runs-on: ubuntu-slim
156+
steps:
157+
- uses: deepset-ai/notify-slack-action@3cda73b77a148f16f703274198e7771340cf862b # v1
158+
with:
159+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Please check out our [Contribution Guidelines](CONTRIBUTING.md) for all the deta
7575
| [snowflake-haystack](integrations/snowflake/) | Retriever | [![PyPI - Version](https://img.shields.io/pypi/v/snowflake-haystack.svg)](https://pypi.org/project/snowflake-haystack) | [![Test / snowflake](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/snowflake.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/snowflake.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-snowflake/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-snowflake/htmlcov/index.html) | |
7676
| [sqlalchemy-haystack](integrations/sqlalchemy/) | Retriever | [![PyPI - Version](https://img.shields.io/pypi/v/sqlalchemy-haystack.svg)](https://pypi.org/project/sqlalchemy-haystack) | [![Test / sqlalchemy](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/sqlalchemy.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/sqlalchemy.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-sqlalchemy/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-sqlalchemy/htmlcov/index.html) | |
7777
| [stackit-haystack](integrations/stackit/) | Embedder, Generator | [![PyPI - Version](https://img.shields.io/pypi/v/stackit-haystack.svg)](https://pypi.org/project/stackit-haystack) | [![Test / stackit](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/stackit.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/stackit.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-stackit/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-stackit/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-stackit-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-stackit-combined/htmlcov/index.html) |
78+
| [supabase-haystack](integrations/supabase/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/supabase-haystack.svg)](https://pypi.org/project/supabase-haystack) | [![Test / supabase](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/supabase.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/supabase.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-supabase/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-supabase/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-supabase-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-supabase-combined/htmlcov/index.html) |
7879
| [tavily-haystack](integrations/tavily/) | Websearch | [![PyPI - Version](https://img.shields.io/pypi/v/tavily-haystack.svg)](https://pypi.org/project/tavily-haystack) | [![Test / tavily](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/tavily.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/tavily.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-tavily/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-tavily/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-tavily-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-tavily-combined/htmlcov/index.html) |
7980
| [togetherai-haystack](integrations/togetherai/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/togetherai-haystack.svg)](https://pypi.org/project/togetherai-haystack) | [![Test / togetherai](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/togetherai.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/togetherai.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-togetherai/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-togetherai/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-togetherai-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-togetherai-combined/htmlcov/index.html) |
8081
| [unstructured-fileconverter-haystack](integrations/unstructured/) | File converter | [![PyPI - Version](https://img.shields.io/pypi/v/unstructured-fileconverter-haystack.svg)](https://pypi.org/project/unstructured-fileconverter-haystack) | [![Test / unstructured](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/unstructured.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/unstructured.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-unstructured/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-unstructured/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-unstructured-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-unstructured-combined/htmlcov/index.html) |

integrations/amazon_bedrock/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [integrations/amazon_bedrock-v6.8.1] - 2026-04-22
4+
5+
### 🐛 Bug Fixes
6+
7+
- *(amazon-bedrock)* Prevent double-wrapping of tools_cachepoint_config in _format_tools (#3199)
8+
9+
### 🧪 Testing
10+
11+
- Bedrock - increase unit tests coverage (#3165)
12+
13+
314
## [integrations/amazon_bedrock-v6.8.0] - 2026-04-09
415

516
### 🚀 Features

integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _format_tools(
9393
)
9494

9595
if tools_cachepoint_config:
96-
tool_specs.append({"cachePoint": tools_cachepoint_config})
96+
tool_specs.append(tools_cachepoint_config)
9797

9898
return {"tools": tool_specs}
9999

integrations/amazon_bedrock/tests/test_chat_generator_utils.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def tools():
6767

6868
class TestAmazonBedrockChatGeneratorUtils:
6969
def test_format_tools(self, tools):
70-
formatted_tool = _format_tools(tools, tools_cachepoint_config={"type": "default"})
70+
formatted_tool = _format_tools(tools, tools_cachepoint_config={"cachePoint": {"type": "default"}})
7171
assert formatted_tool == {
7272
"tools": [
7373
{
@@ -103,6 +103,19 @@ def test_format_tools(self, tools):
103103
],
104104
}
105105

106+
def test_format_tools_does_not_double_wrap_cachepoint(self, tools):
107+
# Regression test for https://github.com/deepset-ai/haystack-core-integrations/issues/3181
108+
# __init__ pre-formats tools_cachepoint_config via _validate_and_format_cache_point,
109+
# so _format_tools must append it as-is without an extra cachePoint wrapper.
110+
111+
formatted_config = _validate_and_format_cache_point({"type": "default"})
112+
assert formatted_config == {"cachePoint": {"type": "default"}}
113+
114+
result = _format_tools(tools, tools_cachepoint_config=formatted_config)
115+
cache_entries = [e for e in result["tools"] if "cachePoint" in e]
116+
assert len(cache_entries) == 1
117+
assert cache_entries[0] == {"cachePoint": {"type": "default"}}
118+
106119
def test_convert_file_content_to_bedrock_format_no_mime_type(self):
107120
file_content = FileContent(
108121
base64_data=base64.b64encode(b"This is a test file content."),

integrations/azure_ai_search/tests/test_bm25_retriever.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,19 @@ def test_run_time_params():
149149
assert res["documents"][0].content == "Test doc"
150150

151151

152+
def test_init_raises_type_error_on_invalid_document_store():
153+
with pytest.raises(TypeError, match="document_store must be an instance of AzureAISearchDocumentStore"):
154+
AzureAISearchBM25Retriever(document_store=object())
155+
156+
157+
def test_run_raises_runtime_error_when_retrieval_fails():
158+
mock_store = Mock(spec=AzureAISearchDocumentStore)
159+
mock_store._bm25_retrieval.side_effect = RuntimeError("boom")
160+
retriever = AzureAISearchBM25Retriever(document_store=mock_store)
161+
with pytest.raises(RuntimeError, match="bm25 retrieval process"):
162+
retriever.run(query="Test query")
163+
164+
152165
@pytest.mark.skipif(
153166
not os.environ.get("AZURE_AI_SEARCH_ENDPOINT", None) and not os.environ.get("AZURE_AI_SEARCH_API_KEY", None),
154167
reason="Missing AZURE_AI_SEARCH_ENDPOINT or AZURE_AI_SEARCH_API_KEY.",

0 commit comments

Comments
 (0)