Skip to content

Update 3.0.0 qualifier from alpha1 to beta1 [DO NOT MERGE] #1291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
OPENSEARCH_DASHBOARDS_VERSION: 'main'
jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/verify-binary-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Install Dashboards with Plugin via Binary'

on: [push, pull_request]
env:
OPENSEARCH_VERSION: '3.0.0-alpha1'
OPENSEARCH_VERSION: '3.0.0-beta1'
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
Expand All @@ -16,7 +16,7 @@ jobs:
os: [ubuntu-latest]
# TODO: add windows support when OSD core is stable on windows
runs-on: ${{ matrix.os }}
steps:
steps:
- name: Checkout Branch
uses: actions/checkout@v3

Expand All @@ -41,14 +41,14 @@ jobs:
plugin_name: index-management-dashboards-plugin
built_plugin_name: index-management-dashboards
install_zip: true

- name: Start the binary
run: |
run: |
nohup ./bin/opensearch-dashboards &
working-directory: ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }}
shell: bash

- name: Health check
- name: Health check
run: |
timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
shell: bash
Expand Down
16 changes: 13 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@
// babelrc doesn't respect NODE_PATH anymore but using require does.
// Alternative to install them locally in node_modules
module.exports = function (api) {
// ensure env is test so that this config won't impact build or dev server
if (api.env("test")) {
const isTest = api.env("test");

// Common plugins for all environments
const commonPlugins = [require("@babel/plugin-proposal-nullish-coalescing-operator")];

// Test-specific configuration
if (isTest) {
return {
presets: [require("@babel/preset-env"), require("@babel/preset-react"), require("@babel/preset-typescript")],
plugins: [
[require("@babel/plugin-transform-runtime"), { regenerator: true }],
require("@babel/plugin-transform-class-properties"),
require("@babel/plugin-transform-object-rest-spread"),
[require("@babel/plugin-transform-modules-commonjs"), { allowTopLevelThis: true }],
...commonPlugins,
],
};
}
return {};

// Build/dev configuration
return {
plugins: commonPlugins,
};
};
12 changes: 12 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@ module.exports = defineConfig({
baseUrl: "http://localhost:5601",
viewportWidth: 2000,
viewportHeight: 1320,

// Performance optimizations
numTestsKeptInMemory: 0,
experimentalMemoryManagement: true,
video: false,
watchForFileChanges: false,
chromeWebSecurity: false,
modifyObstructiveCode: false,

// Environment variables
env: {
openSearchUrl: "http://localhost:9200",
SECURITY_ENABLED: false,
username: "admin",
password: "admin",
},

// Certificate configurations
clientCertificates: [
{
url: "https://localhost:9200/.opendistro-ism*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ describe("Snapshots", () => {

// Select all indexes to be included
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_1{enter}");
cy.wait(1000);
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_2{enter}");
cy.wait(1000);
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_3{enter}");
cy.wait(1000);

// if a toast message pops up then dismiss it
cy.dismissToast();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("Split Index", () => {
.clear()
.type(`${replicaNumber}`)
.end()
.get('[data-test-subj="splitButton"]')
.get('[data-test-subj="splitButton"]', { timeout: 8000 })
.click()
.end();

Expand Down Expand Up @@ -114,7 +114,7 @@ describe("Split Index", () => {
parseSpecialCharSequences: false,
})
.end()
.get('[data-test-subj="splitButton"]')
.get('[data-test-subj="splitButton"]', { timeout: 8000 })
.click()
.end();

Expand Down Expand Up @@ -146,7 +146,7 @@ describe("Split Index", () => {
.get('[data-test-subj="form-name-aliases"] [data-test-subj="comboBoxSearchInput"]')
.type(`${sampleAlias}{enter}${newAlias}{enter}`)
.end()
.get('[data-test-subj="splitButton"]')
.get('[data-test-subj="splitButton"]', { timeout: 8000 })
.click()
.end();

Expand All @@ -172,15 +172,15 @@ describe("Split Index", () => {
.click()
.end()
// Index can't be split if it's blocks write status is not true
.get('[data-test-subj="splitButton"]')
.get('[data-test-subj="splitButton"]', { timeout: 8000 })
.should("have.class", "euiButton-isDisabled")
.end()
.wait(1000)
// Set index to blocks write
.get('[data-test-subj="set-indexsetting-button"]')
.get('[data-test-subj="set-indexsetting-button"]', { timeout: 8000 })
.click()
.end()
.get('[data-test-subj="splitButton"]')
.get('[data-test-subj="splitButton"]', { timeout: 8000 })
.click()
.end();
}); // Blocks write
Expand Down
24 changes: 6 additions & 18 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
{
"id": "indexManagementDashboards",
"version": "3.0.0.0-alpha1",
"version": "3.0.0.0-beta1",
"opensearchDashboardsVersion": "3.0.0",
"configPath": [
"opensearch_index_management"
],
"requiredPlugins": [
"navigation",
"opensearchDashboardsReact",
"opensearchDashboardsUtils"
],
"optionalPlugins": [
"managementOverview",
"dataSource",
"dataSourceManagement"
],
"configPath": ["opensearch_index_management"],
"requiredPlugins": ["navigation", "opensearchDashboardsReact", "opensearchDashboardsUtils"],
"optionalPlugins": ["managementOverview", "dataSource", "dataSourceManagement"],
"server": true,
"ui": true,
"supportedOSDataSourceVersions": ">=2.0.0",
"requiredOSDataSourcePlugins": [
"opensearch-index-management"
]
}
"requiredOSDataSourcePlugins": ["opensearch-index-management"]
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch_index_management_dashboards",
"version": "3.0.0.0-alpha1",
"version": "3.0.0.0-beta1",
"description": "Opensearch Dashboards plugin for Index Management",
"main": "index.js",
"license": "Apache-2.0",
Expand Down Expand Up @@ -42,6 +42,7 @@
"**/elliptic": "^6.5.4"
},
"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards",
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards",
"@testing-library/dom": "^8.11.3",
Expand All @@ -52,7 +53,7 @@
"@types/json-schema": "^7.0.11",
"@types/react-dom": "^16.9.8",
"@types/react-router-dom": "^5.3.2",
"cypress": "12.17.4",
"cypress": "^13.6.0",
Comment on lines -55 to +56
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason upgrade cypress version? i see CI was failing because version conflicts

cypress
          12.17.4 => opensearch-dashboards
          ^13.6.0 => opensearch_index_management_dashboards

Copy link
Contributor Author

@vaibhoag vaibhoag Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unusual , because when I ran 'yarn osd bootstrap', it showed me the following error:

      The conflicting dependencies are:
        cypress
          ^13.6.0 => opensearch-dashboards
          12.17.4 => opensearch_index_management_dashboards

To fix this, I updated the cypress version.

I referred to line 414 of https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/package.json

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly my recommendation is just delete this line completely and rely on the reference in OSD package.json

"diff": "^4.0.1",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
Expand Down
4 changes: 2 additions & 2 deletions public/components/MonacoJSONEditor/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ monaco.editor.defineTheme("ismJSONTheme", {
export function useDiagnosticsOptions(props: { monaco?: typeof monaco; diagnosticsOptions?: DiagnosticsOptions }) {
const oldOptionsSettingsRef = useRef<DiagnosticsOptions | undefined>(props.monaco?.languages.json.jsonDefaults.diagnosticsOptions);
useEffect(() => {
if (props.monaco) {
if (props.monaco && props.monaco.languages.json) {
props.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
...oldOptionsSettingsRef.current,
...props.diagnosticsOptions,
Expand All @@ -35,7 +35,7 @@ export function useModel(props: { editor?: monaco.editor.IStandaloneCodeEditor;
if (props.path && props.editor) {
const originalModel = props.editor.getModel() as monaco.editor.ITextModel;
const originalValue = originalModel.getValue();
const originalLanguage = originalModel.getModeId();
const originalLanguage = originalModel.getLanguageId();
const originalUri = originalModel.uri;
originalModel.dispose();
const newModel = monaco.editor.createModel(
Expand Down
Loading
Loading