Skip to content

Commit 82ec923

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/multi-51b3ba2ceb
2 parents d8013bb + 02ca3df commit 82ec923

File tree

78 files changed

+1456
-983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1456
-983
lines changed

.github/actions/start-opensearch/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ inputs:
2323
required: false
2424

2525
port:
26-
description: 'Port to run OpenSearch. Leave empty to use the default config (9200)'
26+
description: 'HTTP port to run OpenSearch. Leave empty to use the default config (9200)'
2727
required: false
2828
default: '9200'
2929

30+
transport_port:
31+
description: 'Transport port to run OpenSearch transport layer. Leave empty to use the default config (9300-9400)'
32+
required: false
33+
default: '9300-9400'
34+
3035
runs:
3136
using: "composite"
3237
steps:
@@ -128,11 +133,12 @@ runs:
128133
shell: bash
129134
working-directory: ${{ inputs.port }}
130135

131-
- name: Use more space
136+
- name: Use more space and update ports
132137
run: |
133138
echo '' >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
134139
echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
135140
echo "http.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
141+
echo "transport.port: ${{ inputs.transport_port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
136142
shell: bash
137143
working-directory: ${{ inputs.port }}
138144

.github/workflows/assistant-release-e2e-workflow.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,41 @@ jobs:
2222
uses: ./.github/workflows/release-e2e-workflow-template.yml
2323
with:
2424
test-name: dashboards assistant
25-
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
25+
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*chatbot*.js'
2626
osd-serve-args: --assistant.chat.enabled=true
27-
27+
artifact-name-suffix: "-with-security"
28+
2829
tests-without-security:
2930
needs: changes
3031
if: ${{ needs.changes.outputs.tests == 'true' }}
3132
uses: ./.github/workflows/release-e2e-workflow-template.yml
3233
with:
3334
test-name: dashboards assistant
34-
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
35+
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*chatbot*.js'
3536
osd-serve-args: --assistant.chat.enabled=true
3637
security-enabled: false
38+
artifact-name-suffix: "-without-security"
39+
multi-opensearch-enabled: false
40+
3741
tests-with-multiple-data-source-and-disabled-local-cluster:
3842
needs: changes
3943
if: ${{ needs.changes.outputs.tests == 'true' }}
4044
uses: ./.github/workflows/release-e2e-workflow-template.yml
4145
with:
4246
test-name: dashboards assistant
43-
test-command: env CYPRESS_DISABLE_LOCAL_CLUSTER=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/mds*.js'
47+
test-command: env CYPRESS_DISABLE_LOCAL_CLUSTER=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/mds_chatbot*.js'
4448
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --data_source.hideLocalCluster=true --assistant.chat.enabled=true
4549
security-enabled: true
50+
artifact-name-suffix: "-with-security-and-mds"
51+
52+
tests-with-query-enhancements:
53+
needs: changes
54+
if: ${{ needs.changes.outputs.tests == 'true' }}
55+
uses: ./.github/workflows/release-e2e-workflow-template.yml
56+
with:
57+
test-name: dashboards assistant
58+
test-command: env CYPRESS_DISABLE_LOCAL_CLUSTER=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true CYPRESS_WORKSPACE_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/mds_query_enhancements*.js'
59+
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --data_source.hideLocalCluster=true --assistant.chat.enabled=true --uiSettings.overrides.home:useNewHomePage=true --uiSettings.overrides.query:enhancements:enabled=true --workspace.enabled=true --savedObjects.permission.enabled=true --assistant.text2viz.enabled=true --opensearchDashboards.dashboardAdmin.users='["admin"]' --opensearch_security.multitenancy.enabled=false
60+
security-enabled: true
61+
artifact-name-suffix: "-with-query-enhancements"
4662

.github/workflows/release-e2e-workflow-template.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
artifact-name-suffix:
1818
required: false
1919
type: string
20+
multi-opensearch-enabled:
21+
required: false
22+
type: boolean
23+
default: true
2024
jobs:
2125
tests:
2226
name: Run Cypress E2E tests for ${{ inputs.test-name }}
@@ -72,16 +76,20 @@ jobs:
7276
curl https://localhost:9200 -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} --insecure
7377
fi
7478
- uses: ./.github/actions/start-opensearch
79+
if: ${{ inputs.multi-opensearch-enabled }}
7580
with:
7681
opensearch-version: ${{ env.VERSION }}
7782
security-enabled: false
7883
port: 9201
84+
transport_port: 9301
7985
- uses: ./.github/actions/start-opensearch
86+
if: ${{ inputs.multi-opensearch-enabled }}
8087
with:
8188
opensearch-version: ${{ env.VERSION }}
8289
security-enabled: true
83-
admin-password: admin
90+
admin-password: myStrongPassword123!
8491
port: 9202
92+
transport_port: 9302
8593
- name: Get OpenSearch-Dashboards
8694
run: |
8795
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
@@ -120,7 +128,7 @@ jobs:
120128
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
121129
- name: Cache Cypress
122130
id: cache-cypress
123-
uses: actions/cache@v1
131+
uses: actions/cache@v4
124132
with:
125133
path: ~/.cache/Cypress
126134
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chrome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
7272
- name: Cache Cypress
7373
id: cache-cypress
74-
uses: actions/cache@v1
74+
uses: actions/cache@v4
7575
with:
7676
path: ~/.cache/Cypress
7777
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-ad-only.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-ism-only.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-tests-in-memory-0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-tests-in-memory-10.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-tests-in-memory-20.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium-tests-in-memory-5.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-chromium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-electron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

.github/workflows/release-signoff-firefox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
6161
- name: Cache Cypress
6262
id: cache-cypress
63-
uses: actions/cache@v1
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.cache/Cypress
6666
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"remoteDataSourceNoAuthUrl": "http://localhost:9201",
1515
"remoteDataSourceBasicAuthUrl": "https://localhost:9202",
1616
"remoteDataSourceBasicAuthUsername": "admin",
17-
"remoteDataSourceBasicAuthPassword": "admin",
17+
"remoteDataSourceBasicAuthPassword": "myStrongPassword123!",
1818
"SECURITY_ENABLED": false,
1919
"AGGREGATION_VIEW": false,
2020
"MULTITENANCY_ENABLED": true,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"index":{"_id": "id-1"}}
2+
{ "value": 1, "secondVal": 1, "timestamp": "2020-01-01"}
3+
{"index":{"_id": "id-2"}}
4+
{ "value": 2, "secondVal": 2, "timestamp": "2020-01-02"}
5+
{"index":{"_id": "id-3"}}
6+
{ "value": 3, "secondVal": 3, "timestamp": "2020-01-03"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"completion": " ```json\n{\n \"thought\": \"Thought: Let me use tool to figure out\",\n \"action\": \"CatIndexTool\",\n \"action_input\": \"\"}\n```\n",
2+
"completion": " ```json\n{\n \"thought\": \"Thought: Let me use tool to figure out\",\n \"action\": \"ListIndexTool\",\n \"action_input\": \"\"}\n```\n",
33
"stop_reason": "stop_sequence",
44
"stop": "\n\nHuman:"
55
}

cypress/fixtures/plugins/dashboards-assistant/flow-template.json renamed to cypress/fixtures/plugins/dashboards-assistant/flow-templates/chat.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"x-amz-content-sha256": "required",
2626
"content-type": "application/json"
2727
},
28-
"method": "GET",
28+
"method": "POST",
2929
"request_body": "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
3030
"action_type": "predict",
3131
"url": "http://127.0.0.1:3000"
@@ -61,12 +61,12 @@
6161
}
6262
},
6363
{
64-
"id": "cat_index_tool",
64+
"id": "list_index_tool",
6565
"type": "create_tool",
6666
"previous_node_inputs": {},
6767
"user_inputs": {
68-
"type": "CatIndexTool",
69-
"name": "CatIndexTool",
68+
"type": "ListIndexTool",
69+
"name": "ListIndexTool",
7070
"description": "Use this tool to get OpenSearch index information: (health, status, index, uuid, primary count, replica count, docs.count, docs.deleted, store.size, primary.store.size).",
7171
"parameters": {
7272
"index": ".kibana"
@@ -77,7 +77,7 @@
7777
"id": "sub_agent",
7878
"type": "register_agent",
7979
"previous_node_inputs": {
80-
"cat_index_tool": "tools",
80+
"list_index_tool": "tools",
8181
"register_model_2": "model_id"
8282
},
8383
"user_inputs": {
@@ -130,7 +130,7 @@
130130
}
131131
},
132132
{
133-
"id": "root_agent",
133+
"id": "os_chat",
134134
"type": "register_agent",
135135
"previous_node_inputs": {
136136
"agent_tool": "tools",
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"name": "Cypress-register-query-assist-ppl-agent",
3+
"description": "Cypress Flow template",
4+
"use_case": "REGISTER_AGENT",
5+
"version": {
6+
"template": "1.0.0",
7+
"compatibility": ["2.12.0", "3.0.0"]
8+
},
9+
"workflows": {
10+
"provision": {
11+
"user_params": {},
12+
"nodes": [
13+
{
14+
"id": "create_connector_1",
15+
"type": "create_connector",
16+
"previous_node_inputs": {},
17+
"user_inputs": {
18+
"version": "1",
19+
"name": "Claude instant runtime T2V with instructions Connector",
20+
"protocol": "aws_sigv4",
21+
"description": "The connector to BedRock service for claude model",
22+
"actions": [
23+
{
24+
"headers": {
25+
"x-amz-content-sha256": "required",
26+
"content-type": "application/json"
27+
},
28+
"method": "POST",
29+
"request_body": "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
30+
"action_type": "predict",
31+
"url": "http://127.0.0.1:3000"
32+
}
33+
],
34+
"credential": {
35+
"access_key": "<key>",
36+
"secret_key": "<value>"
37+
},
38+
"parameters": {
39+
"endpoint": "bedrock-runtime.us-west-2.amazonaws.com",
40+
"content_type": "application/json",
41+
"auth": "Sig_V4",
42+
"max_tokens_to_sample": "8000",
43+
"service_name": "bedrock",
44+
"temperature": "0.0001",
45+
"response_filter": "$.completion",
46+
"region": "us-west-2",
47+
"anthropic_version": "bedrock-2023-05-31"
48+
}
49+
}
50+
},
51+
{
52+
"id": "register_model_2",
53+
"type": "register_remote_model",
54+
"previous_node_inputs": {
55+
"create_connector_1": "connector_id"
56+
},
57+
"user_inputs": {
58+
"description": "test model",
59+
"deploy": true,
60+
"name": "claude-instant-t2v-with-instructions"
61+
}
62+
},
63+
{
64+
"id": "ppl_tool",
65+
"type": "create_tool",
66+
"previous_node_inputs": {
67+
"register_model_2": "model_id"
68+
},
69+
"user_inputs": {
70+
"type": "PPLTool",
71+
"name": "TransferQuestionToPPLAndExecuteTool",
72+
"description": "Use this tool to transfer natural language to generate PPL and execute PPL to query inside. Use this tool after you know the index name, otherwise, call IndexRoutingTool first. The input parameters are: {index:IndexName, question:UserQuestion}",
73+
"parameters": {
74+
"model_type": "FINETUNE",
75+
"execute": false
76+
}
77+
}
78+
},
79+
{
80+
"id": "os_query_assist_ppl",
81+
"type": "register_agent",
82+
"previous_node_inputs": {
83+
"register_model_2": "model_id",
84+
"ppl_tool": "tools"
85+
},
86+
"user_inputs": {
87+
"parameters": {},
88+
"type": "flow",
89+
"name": "t2vega with instructions agent",
90+
"description": "this is the t2vega with instructions agent",
91+
"tools_order": ["ppl_tool"]
92+
}
93+
}
94+
]
95+
}
96+
}
97+
}

0 commit comments

Comments
 (0)