Skip to content

Commit 66bcdb0

Browse files
authored
Adding Flow Framework Dashboards integration tests (opensearch-project#1596)
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent 970b0f4 commit 66bcdb0

File tree

18 files changed

+1063
-0
lines changed

18 files changed

+1063
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Flow Framework Release tests workflow in Bundled OpenSearch Dashboards
2+
on:
3+
pull_request:
4+
branches: [ '**' ]
5+
jobs:
6+
changes:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
tests: ${{ steps.filter.outputs.tests }}
10+
steps:
11+
- uses: dorny/paths-filter@v2
12+
id: filter
13+
with:
14+
filters: |
15+
tests:
16+
- 'cypress/**/dashboards-flow-framework/**'
17+
18+
tests:
19+
needs: changes
20+
if: ${{ needs.changes.outputs.tests == 'true' }}
21+
uses: ./.github/workflows/release-e2e-workflow-template.yml
22+
with:
23+
test-name: Flow Framework
24+
test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-flow-framework/*'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Amazon Bedrock - Titan",
3+
"description": "The connector to BedRock Titan embedding model",
4+
"version": 1,
5+
"protocol": "aws_sigv4",
6+
"parameters": {
7+
"region": "us-west-2",
8+
"service_name": "bedrock",
9+
"model": "amazon.titan-embed-text-v1"
10+
},
11+
"credential": {
12+
"access_key": "<key>",
13+
"secret_key": "<value>",
14+
"session_token": "<token>"
15+
16+
},
17+
"actions": [
18+
{
19+
"action_type": "predict",
20+
"method": "POST",
21+
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/invoke",
22+
"headers": {
23+
"content-type": "application/json",
24+
"x-amz-content-sha256": "required"
25+
},
26+
"request_body": "{ \"inputText\": \"${parameters.inputText}\" }"
27+
}
28+
]
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "BedRock Titan embedding model",
3+
"version": "1.0.1",
4+
"function_name": "remote",
5+
"description": "",
6+
"connector_id": "connector_id",
7+
"interface": {
8+
"input": {
9+
"type": "object",
10+
"properties": {
11+
"parameters": {
12+
"type": "object",
13+
"properties": {
14+
"inputText": {
15+
"type": "string"
16+
}
17+
},
18+
"additionalProperties": true
19+
}
20+
}
21+
},
22+
"output": {
23+
"type": "object",
24+
"properties": {
25+
"inference_results": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"properties": {
30+
"output": {
31+
"type": "array",
32+
"items": {
33+
"type": "object",
34+
"properties": {
35+
"name": {
36+
"type": "string"
37+
},
38+
"dataAsMap": {
39+
"type": "object",
40+
"properties": {
41+
"embedding": {
42+
"type": "array"
43+
}
44+
},
45+
"required": ["embedding"]
46+
}
47+
},
48+
"required": ["name", "dataAsMap"]
49+
}
50+
},
51+
"status_code": {
52+
"type": "integer"
53+
}
54+
},
55+
"required": ["output", "status_code"]
56+
}
57+
}
58+
},
59+
"required": ["inference_results"]
60+
}
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
{
2+
"name": "semantic_search_1",
3+
"use_case": "",
4+
"description": "A basic workflow containing the ingest pipeline, search pipeline, and index configurations for performing semantic search",
5+
"version": {
6+
"template": "1.0.0",
7+
"compatibility": ["2.17.0", "3.0.0"]
8+
},
9+
"workflows": {
10+
"provision": {
11+
"user_params": {},
12+
"nodes": [
13+
{
14+
"id": "ingest_pipeline_4112b7671c507097",
15+
"type": "create_ingest_pipeline",
16+
"previous_node_inputs": {},
17+
"user_inputs": {
18+
"configurations": "{\"description\":\"An ingest pipeline\",\"processors\":[{\"ml_inference\":{\"model_id\":\"jUssbZIBtUlObUc3aHho\",\"input_map\":[{\"inputText\":\"item_text\"}],\"output_map\":[{\"my_embedding\":\"embedding\"}],\"full_response_path\":false,\"ignore_missing\":false,\"ignore_failure\":false,\"model_config\":{}}}]}",
19+
"pipeline_id": "ingest_pipeline_4112b7671c507097"
20+
}
21+
},
22+
{
23+
"id": "search_pipeline_bbfed4e51c5f8b65",
24+
"type": "create_search_pipeline",
25+
"previous_node_inputs": {},
26+
"user_inputs": {
27+
"configurations": "{\"request_processors\":[{\"ml_inference\":{\"model_id\":\"jUssbZIBtUlObUc3aHho\",\"input_map\":[{\"inputText\":\"query.term.item_text.value\"}],\"output_map\":[{\"vector\":\"embedding\"}],\"query_template\":\"{\\n \\\"_source\\\": {\\n \\\"excludes\\\": [\\n \\\"my_embedding\\\"\\n ]\\n },\\n \\\"query\\\": {\\n \\\"knn\\\": {\\n \\\"my_embedding\\\": {\\n \\\"vector\\\": ${vector},\\n \\\"k\\\": 10\\n }\\n }\\n }\\n}\",\"full_response_path\":false,\"ignore_missing\":false,\"ignore_failure\":false,\"model_config\":{}}}],\"response_processors\":[],\"phase_results_processors\":[]}",
28+
"pipeline_id": "search_pipeline_bbfed4e51c5f8b65"
29+
}
30+
},
31+
{
32+
"id": "knn_index_adda44",
33+
"type": "create_index",
34+
"previous_node_inputs": {
35+
"ingest_pipeline_4112b7671c507097": "pipeline_id",
36+
"search_pipeline_bbfed4e51c5f8b65": "pipeline_id"
37+
},
38+
"user_inputs": {
39+
"configurations": "{\"settings\":{\"index.knn\":true,\"default_pipeline\":\"${{ingest_pipeline_4112b7671c507097.pipeline_id}}\",\"index.search.default_pipeline\":\"${{search_pipeline_bbfed4e51c5f8b65.pipeline_id}}\"},\"mappings\":{\"properties\":{\"item_text\":{\"type\":\"text\"},\"my_embedding\":{\"type\":\"knn_vector\",\"dimension\":1536}}}}",
40+
"index_name": "knn_index_adda44"
41+
}
42+
}
43+
],
44+
"edges": [
45+
{
46+
"source": "ingest_pipeline_4112b7671c507097",
47+
"dest": "knn_index_adda44"
48+
},
49+
{
50+
"source": "search_pipeline_bbfed4e51c5f8b65",
51+
"dest": "knn_index_adda44"
52+
}
53+
]
54+
}
55+
},
56+
"ui_metadata": {
57+
"type": "Semantic search",
58+
"config": {
59+
"search": {
60+
"pipelineName": {
61+
"id": "pipelineName",
62+
"type": "string",
63+
"value": "search_pipeline_bbfed4e51c5f8b65"
64+
},
65+
"request": {
66+
"id": "request",
67+
"type": "json",
68+
"value": "{\n \"query\": {\n \"term\": {\n \"item_text\": {\n \"value\": \"shoes\"\n }\n }\n }\n}"
69+
},
70+
"index": {
71+
"name": {
72+
"id": "indexName",
73+
"type": "string",
74+
"value": "knn_index_adda44"
75+
}
76+
},
77+
"enrichRequest": {
78+
"processors": [
79+
{
80+
"name": "ML Inference Processor",
81+
"id": "ml_processor_search_request_664d078f4e3c6083",
82+
"fields": [
83+
{
84+
"id": "model",
85+
"type": "model",
86+
"value": {
87+
"id": "jUssbZIBtUlObUc3aHho"
88+
}
89+
},
90+
{
91+
"id": "input_map",
92+
"type": "mapArray",
93+
"value": [
94+
[
95+
{
96+
"value": "query.term.item_text.value",
97+
"key": "inputText"
98+
}
99+
]
100+
]
101+
},
102+
{
103+
"id": "output_map",
104+
"type": "mapArray",
105+
"value": [
106+
[
107+
{
108+
"value": "embedding",
109+
"key": "vector"
110+
}
111+
]
112+
]
113+
}
114+
],
115+
"type": "ml_inference",
116+
"optionalFields": [
117+
{
118+
"id": "query_template",
119+
"type": "jsonString",
120+
"value": "{\n \"_source\": {\n \"excludes\": [\n \"my_embedding\"\n ]\n },\n \"query\": {\n \"knn\": {\n \"my_embedding\": {\n \"vector\": ${vector},\n \"k\": 10\n }\n }\n }\n}"
121+
},
122+
{
123+
"id": "model_config",
124+
"type": "json",
125+
"value": "{}"
126+
},
127+
{
128+
"id": "full_response_path",
129+
"type": "boolean",
130+
"value": false
131+
},
132+
{
133+
"id": "ignore_missing",
134+
"type": "boolean",
135+
"value": false
136+
},
137+
{
138+
"id": "ignore_failure",
139+
"type": "boolean",
140+
"value": false
141+
},
142+
{
143+
"id": "max_prediction_tasks",
144+
"type": "number",
145+
"value": 10
146+
},
147+
{
148+
"id": "tag",
149+
"type": "string",
150+
"value": ""
151+
},
152+
{
153+
"id": "description",
154+
"type": "string",
155+
"value": ""
156+
}
157+
]
158+
}
159+
]
160+
},
161+
"enrichResponse": {
162+
"processors": []
163+
}
164+
},
165+
"ingest": {
166+
"pipelineName": {
167+
"id": "pipelineName",
168+
"type": "string",
169+
"value": "ingest_pipeline_4112b7671c507097"
170+
},
171+
"enrich": {
172+
"processors": [
173+
{
174+
"name": "ML Inference Processor",
175+
"id": "ml_processor_ingest_f32b4938df7a4cc2",
176+
"fields": [
177+
{
178+
"id": "model",
179+
"type": "model",
180+
"value": {
181+
"id": "jUssbZIBtUlObUc3aHho"
182+
}
183+
},
184+
{
185+
"id": "input_map",
186+
"type": "mapArray",
187+
"value": [
188+
[
189+
{
190+
"value": "item_text",
191+
"key": "inputText"
192+
}
193+
]
194+
]
195+
},
196+
{
197+
"id": "output_map",
198+
"type": "mapArray",
199+
"value": [
200+
[
201+
{
202+
"value": "embedding",
203+
"key": "my_embedding"
204+
}
205+
]
206+
]
207+
}
208+
],
209+
"type": "ml_inference",
210+
"optionalFields": [
211+
{
212+
"id": "model_config",
213+
"type": "json",
214+
"value": "{}"
215+
},
216+
{
217+
"id": "full_response_path",
218+
"type": "boolean",
219+
"value": false
220+
},
221+
{
222+
"id": "ignore_missing",
223+
"type": "boolean",
224+
"value": false
225+
},
226+
{
227+
"id": "ignore_failure",
228+
"type": "boolean",
229+
"value": false
230+
},
231+
{
232+
"id": "max_prediction_tasks",
233+
"type": "number",
234+
"value": 10
235+
},
236+
{
237+
"id": "tag",
238+
"type": "string",
239+
"value": ""
240+
},
241+
{
242+
"id": "description",
243+
"type": "string",
244+
"value": ""
245+
}
246+
]
247+
}
248+
]
249+
},
250+
"index": {
251+
"settings": {
252+
"id": "indexSettings",
253+
"type": "json",
254+
"value": "{\n \"index.knn\": true\n}"
255+
},
256+
"mappings": {
257+
"id": "indexMappings",
258+
"type": "json",
259+
"value": "{\n \"properties\": {\n \"item_text\": {\n \"type\": \"text\"\n },\n \"my_embedding\": {\n \"type\": \"knn_vector\",\n \"dimension\": 1536\n }\n }\n}"
260+
},
261+
"name": {
262+
"id": "indexName",
263+
"type": "string",
264+
"value": "knn_index_adda44"
265+
}
266+
},
267+
"enabled": {
268+
"id": "enabled",
269+
"type": "boolean",
270+
"value": true
271+
}
272+
}
273+
}
274+
}
275+
}

0 commit comments

Comments
 (0)