Skip to content

Commit 5f77c0f

Browse files
committed
Merge branch 'feature/global-semantic-search-PLM' into semantic-search
Signed-off-by: Zhenxing Shen <[email protected]>
2 parents b9a360b + dfc3f48 commit 5f77c0f

File tree

2,523 files changed

+243012
-43336
lines changed

Some content is hidden

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

2,523 files changed

+243012
-43336
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @ananzh @kavilla @AMoo-Miki @ashwin-pc @joshuarrrr @abbyhu2000 @zengyan-amazon @zhongnansu @manasvinibs @ZilongX @Flyingliuhub @curq @bandinib-amzn @SuZhou-Joe @ruanyl @BionIT @xinruiba @zhyuanqi @mengweieric @LDrago27 @virajsanghvi @sejli @joshuali925 @huyaboo @angle943 @Maosaic @wanglam @d-buckner
1+
* @ananzh @kavilla @AMoo-Miki @ashwin-pc @joshuarrrr @abbyhu2000 @zengyan-amazon @zhongnansu @manasvinibs @ZilongX @Flyingliuhub @curq @bandinib-amzn @SuZhou-Joe @ruanyl @BionIT @xinruiba @zhyuanqi @mengweieric @LDrago27 @virajsanghvi @sejli @joshuali925 @huyaboo @angle943 @Maosaic @wanglam @d-buckner @raintygao @ps48

.github/workflows/cypress_workflow.yml

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ env:
3737
CYPRESS_BROWSER: 'chromium'
3838
CYPRESS_VISBUILDER_ENABLED: true
3939
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
40-
CYPRESS_MEMORY_LIMIT: '10240'
40+
CYPRESS_MEMORY_LIMIT: '12288'
4141
CYPRESS_CACHE_FOLDER: '${{ github.workspace }}/.cypress-cache'
4242
# Optimize Chrome
4343
CYPRESS_CHROME_ARGS: >-
4444
--disable-dev-shm-usage
4545
--no-sandbox
4646
--disable-gpu
4747
--disable-software-rasterizer
48-
--js-flags="--max-old-space-size=10240"
48+
--js-flags="--max-old-space-size=12288"
4949
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
50-
OSD_OPTIMIZER_MAX_WORKERS: 8
51-
NODE_OPTIONS: '--max-old-space-size=10240 --max-semi-space-size=64 --dns-result-order=ipv4first'
50+
OSD_OPTIMIZER_MAX_WORKERS: 12
51+
NODE_OPTIONS: '--max-old-space-size=12288 --max-semi-space-size=128 --dns-result-order=ipv4first'
5252
COMMENT_TAG: '[MANUAL CYPRESS TEST RUN RESULTS]'
5353
COMMENT_SUCCESS_MSG: ':white_check_mark: Cypress test run succeeded!'
5454
COMMENT_FAILURE_MSG: ':x: Cypress test run failed!'
@@ -134,12 +134,16 @@ jobs:
134134
config: explore
135135
test_location: source
136136
# Explore tests - group 5
137-
- group: 15
137+
- group: 15Explore
138+
config: explore
139+
test_location: source
140+
141+
- group: 16Explore
138142
config: explore
139143
test_location: source
140144
container:
141145
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
142-
options: '--user 1001 --shm-size=2g'
146+
options: '--user 1001 --shm-size=4g'
143147
env:
144148
START_CMD: ${{ matrix.config == 'query_enhanced' &&
145149
'node scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=true --uiSettings.overrides[''home:useNewHomePage'']=true --data_source.enabled=true --workspace.enabled=true --opensearch.ignoreVersionMismatch=true --data.savedQueriesNewUI.enabled=true' ||
@@ -148,7 +152,8 @@ jobs:
148152
matrix.config == 'dashboard' &&
149153
'node scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true' ||
150154
'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=false' }}
151-
OPENSEARCH_SNAPSHOT_CMD: ${{ (matrix.config == 'query_enhanced' || matrix.config == 'explore') &&
155+
OPENSEARCH_SNAPSHOT_CMD:
156+
${{ (matrix.config == 'query_enhanced' || matrix.config == 'explore') &&
152157
'/bin/bash -c "./opensearch-${{ env.LATEST_VERSION }}/opensearch-tar-install.sh &"' ||
153158
matrix.config == 'dashboard' &&
154159
'node scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false -E search.concurrent_segment_search.mode=none' ||
@@ -193,15 +198,16 @@ jobs:
193198

194199
- name: Setup Yarn
195200
run: |
196-
npm uninstall -g yarn
197-
npm i -g yarn@^1.22.10
201+
npm uninstall -g yarn
202+
npm i -g yarn@^1.22.10
203+
yarn config set network-timeout 1000000 -g
198204
199205
- name: Run bootstrap
200206
run: yarn osd bootstrap
201207

202208
- name: Build plugins
203209
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12
204-
210+
205211
- name: Checkout FT repo
206212
uses: actions/checkout@v4
207213
with:
@@ -229,8 +235,8 @@ jobs:
229235
echo "SPEC=${FORMATTED_SPEC}" >> $GITHUB_ENV
230236
echo "SPEC=${FORMATTED_SPEC}"
231237
232-
# Setup spec files for Dashboards in-house cypress tests
233-
- name: Setup spec files for Dashboards tests
238+
# Setup spec files for OSD in-house cypress tests
239+
- name: Setup spec files for OSD tests
234240
if: ${{ inputs.specs == '' && matrix.test_location == 'source' }}
235241
shell: bash
236242
run: |
@@ -290,13 +296,13 @@ jobs:
290296
sleep 30
291297
shell: bash
292298

293-
# Clear Cypress Cache before running Dashboards tests
299+
# Clear Cypress Cache before running OSD tests
294300
- name: Clear Cypress Cache
295301
if: matrix.test_location == 'source'
296302
run: npx cypress cache clear
297303

298-
# Run Dashboards Cypress tests within the source repo
299-
- name: Run Dashboards Cypress tests with query enhancements
304+
# Run OSD Cypress tests within the source repo
305+
- name: Run OSD Cypress tests with query enhancements
300306
if: matrix.test_location == 'source' && (matrix.config == 'query_enhanced' || matrix.config == 'explore')
301307
uses: cypress-io/github-action@v6
302308
with:
@@ -305,7 +311,7 @@ jobs:
305311
wait-on: 'http://localhost:9200, http://localhost:5601'
306312
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.DASHBOARDS_SPEC }}
307313

308-
- name: Run Dashboards Cypress tests without query enhancements
314+
- name: Run OSD Cypress tests without query enhancements
309315
if: matrix.test_location == 'source' && matrix.config == 'dashboard'
310316
uses: cypress-io/github-action@v6
311317
with:
@@ -314,7 +320,6 @@ jobs:
314320
wait-on: 'http://localhost:9200, http://localhost:5601'
315321
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.DASHBOARDS_SPEC }}
316322

317-
# Compress and upload artifacts for FT repo
318323
- name: Compress FT repo artifacts
319324
if: always() && matrix.test_location == 'ftr'
320325
run: |
@@ -335,25 +340,24 @@ jobs:
335340
path: ftr-cypress-artifacts-${{ matrix.group }}.tar.gz
336341
retention-days: 1
337342

338-
# Compress and upload artifacts for Dashboards repo
339-
- name: Compress Dashboards repo artifacts
343+
- name: Compress OSD repo artifacts
340344
if: always() && matrix.test_location == 'source'
341345
run: |
342-
mkdir -p dashboard-artifacts
346+
mkdir -p osd-artifacts
343347
for dir in screenshots videos results; do
344348
if [ -d "cypress/$dir" ]; then
345-
cp -r "cypress/$dir" dashboard-artifacts/
349+
cp -r "cypress/$dir" osd-artifacts/
346350
fi
347351
done
348-
tar -czf dashboards-cypress-artifacts-${{ matrix.group }}.tar.gz -C dashboard-artifacts .
352+
tar -czf osd-cypress-artifacts-${{ matrix.group }}.tar.gz -C osd-artifacts .
349353
shell: bash
350354

351-
- name: Upload Dashboards repo artifacts
355+
- name: Upload OSD repo artifacts
352356
if: always() && matrix.test_location == 'source'
353357
uses: actions/upload-artifact@v4
354358
with:
355-
name: dashboards-cypress-artifacts-${{ matrix.group }}
356-
path: dashboards-cypress-artifacts-${{ matrix.group }}.tar.gz
359+
name: osd-cypress-artifacts-${{ matrix.group }}
360+
path: osd-cypress-artifacts-${{ matrix.group }}.tar.gz
357361
retention-days: 1
358362
overwrite: true
359363

.github/workflows/links_checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
uses: lycheeverse/lychee-action@v1
1919
with:
2020
fail: true
21-
args: --accept=200,403,429 --base . --retry-wait-time=15 --max-retries=5 --exclude-path cypress/fixtures "**/*.html" "**/*.md" "**/*.txt" "**/*.json" "**/*.js" "**/*.ts" "**/*.tsx"
21+
args: --accept=200,403,429 --base . --retry-wait-time=15 --max-retries=5 --exclude-path cypress/fixtures --exclude-path src/plugins/explore/public/components/data_table/data_table.mocks.ts "**/*.html" "**/*.md" "**/*.txt" "**/*.json" "**/*.js" "**/*.ts" "**/*.tsx"
2222
env:
2323
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Auto Version Bump
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
version-bump:
10+
if: github.repository == 'opensearch-project/OpenSearch-Dashboards'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version-file: '.nvmrc'
24+
registry-url: 'https://registry.npmjs.org'
25+
26+
- name: Parse tag and determine version bump
27+
id: parse_tag
28+
run: |
29+
# Extract tag name without refs/tags/ prefix
30+
TAG=${GITHUB_REF#refs/tags/}
31+
VERSION=$TAG
32+
33+
# Validate version format (x.y.z)
34+
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
echo "Invalid version format: $VERSION"
36+
exit 1
37+
fi
38+
39+
# Extract major, minor, patch
40+
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
41+
42+
echo "current_version=$VERSION" >> $GITHUB_OUTPUT
43+
echo "major=$MAJOR" >> $GITHUB_OUTPUT
44+
echo "minor=$MINOR" >> $GITHUB_OUTPUT
45+
echo "patch=$PATCH" >> $GITHUB_OUTPUT
46+
47+
# Determine version type and next version
48+
if [ "$PATCH" = "0" ] && [ "$MINOR" = "0" ]; then
49+
# Major release (x.0.0) - bump to next major
50+
NEXT_MAJOR=$((MAJOR + 1))
51+
NEXT_VERSION="${NEXT_MAJOR}.0.0"
52+
VERSION_TYPE="major"
53+
TARGET_BRANCH="main"
54+
elif [ "$PATCH" = "0" ]; then
55+
# Minor release (x.y.0) - bump to next minor
56+
NEXT_MINOR=$((MINOR + 1))
57+
NEXT_VERSION="${MAJOR}.${NEXT_MINOR}.0"
58+
VERSION_TYPE="minor"
59+
TARGET_BRANCH="main"
60+
else
61+
# Patch release (x.y.z) - bump to next patch
62+
NEXT_PATCH=$((PATCH + 1))
63+
NEXT_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}"
64+
VERSION_TYPE="patch"
65+
TARGET_BRANCH="${MAJOR}.${MINOR}"
66+
fi
67+
68+
echo "next_version=$NEXT_VERSION" >> $GITHUB_OUTPUT
69+
echo "version_type=$VERSION_TYPE" >> $GITHUB_OUTPUT
70+
echo "target_branch=$TARGET_BRANCH" >> $GITHUB_OUTPUT
71+
72+
echo "Current version: $VERSION"
73+
echo "Version type: $VERSION_TYPE"
74+
echo "Next version: $NEXT_VERSION"
75+
echo "Target branch: $TARGET_BRANCH"
76+
77+
- name: Checkout target branch
78+
uses: actions/checkout@v4
79+
with:
80+
ref: "${{ steps.parse_tag.outputs.target_branch }}"
81+
82+
- name: Set environment variables for PR
83+
run: |
84+
TAG=${GITHUB_REF#refs/tags/}
85+
86+
echo "TAG=$TAG" >> $GITHUB_ENV
87+
echo "NEXT_VERSION=${{ steps.parse_tag.outputs.next_version }}" >> $GITHUB_ENV
88+
echo "BASE_BRANCH=${{ steps.parse_tag.outputs.target_branch }}" >> $GITHUB_ENV
89+
90+
- name: Update package.json version
91+
run: |
92+
NEXT_VERSION="${{ steps.parse_tag.outputs.next_version }}"
93+
94+
# Update version in package.json
95+
npm version $NEXT_VERSION --no-git-tag-version
96+
97+
echo "Updated package.json version to $NEXT_VERSION"
98+
99+
- name: Create PR for target branch
100+
uses: peter-evans/create-pull-request@v7
101+
with:
102+
base: ${{ env.BASE_BRANCH }}
103+
branch: 'create-pull-request/patch-${{ env.BASE_BRANCH }}'
104+
commit-message: Increment version to ${{ env.NEXT_VERSION }}
105+
signoff: true
106+
delete-branch: true
107+
title: '[AUTO] Increment version to ${{ env.NEXT_VERSION }}'
108+
body: |
109+
I've noticed that a new tag ${{ env.TAG }} was pushed, and incremented the version from ${{ env.CURRENT_VERSION }} to ${{ env.NEXT_VERSION }}.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/.opensearch
55
/.chromium
66
/package.json.bak
7+
.claude/
78
.DS_Store
89
.node_binaries
910
.native_modules
@@ -79,3 +80,4 @@ snapshots.js
7980
# Ignore the lighthousereport generatated
8081
.lighthouserc.js
8182
.lhci_output.json
83+
/.lighthouseci/

.lycheeignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Copyright OpenSearch Contributors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
node_modules/
5+
dist/
6+
build/
7+
.git/
8+
49
# Local or predefined end points
510
localhost
611
//opensearch
@@ -96,3 +101,4 @@ http://dev.w3.org/
96101
https://qntm.org/cmd
97102
http://fakenews.co/
98103
http://blond-winner.biz/
104+
https://www.iso.org/*

.vscode/launch.json

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,62 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4-
{
5-
"type": "pwa-node",
6-
"request": "attach",
7-
"name": "attach-to-service",
8-
"port": 9229
9-
}
4+
/**
5+
* Attaches a debugger to an already running OSD instance
6+
*/
7+
{
8+
"name": "Attach debugger to running Dashboards",
9+
"type": "pwa-node",
10+
"request": "attach",
11+
"port": 9229
12+
},
13+
/**
14+
* Starts the OSD instance only
15+
*/
16+
{
17+
"name": "Start Dashboards",
18+
"type": "node",
19+
"request": "launch",
20+
"runtimeExecutable": "yarn",
21+
"args": ["start", "--no-base-path"],
22+
"cwd": "${workspaceFolder}",
23+
"runtimeArgs": [],
24+
"env": {
25+
"NODE_ENV": "development"
26+
},
27+
"console": "integratedTerminal",
28+
"internalConsoleOptions": "openOnSessionStart"
29+
},
30+
/**
31+
* Starts the OpenSearch snapshot server
32+
* - Everytime this launch configuration runs, it overwrites your previous data. Thus, if you need to persist data, you can add a configuration in your VSCode workspace to run '${workspaceFolder}/.opensearch/{version}/bin/opensearch'
33+
*/
34+
{
35+
"name": "Start OpenSearch cluster snapshot",
36+
"type": "node",
37+
"request": "launch",
38+
"runtimeExecutable": "yarn",
39+
"args": ["opensearch", "snapshot"],
40+
"cwd": "${workspaceFolder}",
41+
"runtimeArgs": [],
42+
"env": {
43+
"NODE_ENV": "development"
44+
},
45+
"console": "integratedTerminal",
46+
"internalConsoleOptions": "openOnSessionStart"
47+
}
48+
],
49+
"compounds": [
50+
/**
51+
* This is the run configuration to startup OSD end-to-end
52+
* 1. Starts up OpenSearch Snapshot server
53+
* 2. Starts up Dashboards server
54+
*/
55+
{
56+
"name": "Start Dashboards with OpenSearch Cluster Snapshot",
57+
"configurations": ["Start OpenSearch cluster snapshot", "Start Dashboards"],
58+
// If either Dashboards or OpenSearch server is stopped, both servers will be stopped (set this to false to stop an individual server without stopping all servers)
59+
"stopAll": true
60+
}
1061
]
1162
}

0 commit comments

Comments
 (0)