Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Migrate Query Workbench to 7.10 #840

Merged
Merged
9 changes: 7 additions & 2 deletions .github/workflows/sql-workbench-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v*'

env:
PLUGIN_NAME: opendistroQueryWorkbenchKibana
OD_VERSION: 1.12.0.0

jobs:

build:
Expand All @@ -27,14 +31,14 @@ jobs:
uses: actions/checkout@v1
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: 7.9.1
ref: 7.10.0
token: ${{secrets.OD_ACCESS}}
path: sql/kibana

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.22.0'
node-version: '10.22.1'

- name: Move Workbench to Plugins Dir
run: |
Expand All @@ -52,6 +56,7 @@ jobs:
run: |
cd kibana/plugins/workbench
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
artifact=`ls ./build/*.zip`

aws s3 cp $artifact s3://artifacts.opendistroforelasticsearch.amazon.com/downloads/kibana-plugins/opendistro-query-workbench/
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/sql-workbench-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: SQL Workbench Test and Build

on: [pull_request, push]

env:
PLUGIN_NAME: opendistroQueryWorkbenchKibana
OD_VERSION: 1.12.0.0

jobs:

build:
Expand All @@ -15,15 +19,14 @@ jobs:
uses: actions/checkout@v1
with:
repository: elastic/kibana
ref: v7.9.1
ref: v7.10.0
path: sql/kibana
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.22.0'
node-version: '10.22.1'
- name: Move Workbench to Plugins Dir
run: |
mkdir kibana/plugins
mv workbench kibana/plugins
- name: Kibana Plugin Bootstrap
uses: nick-invision/retry@v1
Expand All @@ -39,6 +42,7 @@ jobs:
run: |
cd kibana/plugins/workbench
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
Expand Down
3 changes: 1 addition & 2 deletions workbench/.kibana-plugin-helpers.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"styleSheetToCompile": "public/app.scss",
"buildSourcePatterns": [
"serverSourcePatterns": [
"package.json",
"tsconfig.json",
"yarn.lock",
Expand Down
4 changes: 2 additions & 2 deletions workbench/kibana.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "opendistroQueryWorkbench",
"version": "7.9.1",
"id": "opendistroQueryWorkbenchKibana",
"version": "7.10.0",
"server": true,
"ui": true,
"requiredPlugins": ["navigation"],
Expand Down
56 changes: 9 additions & 47 deletions workbench/package.json
Original file line number Diff line number Diff line change
@@ -1,90 +1,52 @@
{
"name": "opendistro-query-workbench",
"version": "1.11.0.0",
"version": "1.12.0.0",
"description": "Query Workbench",
"main": "index.js",
"license": "Apache-2.0",
"homepage": "https://github.com/opendistro-for-elasticsearch/sql/tree/master/workbench",
"kibana": {
"version": "7.9.1",
"version": "7.10.0",
"templateVersion": "6.3.3"
},
"repository": {
"type": "git",
"url": "https://github.com/opendistro-for-elasticsearch/sql/tree/master/workbench"
},
"scripts": {
"preinstall": "node ../../preinstall_check",
"kbn": "node ../../scripts/kbn",
"lint": "tslint .",
"start": "plugin-helpers start",
"test:server": "plugin-helpers test:server",
"test:browser": "plugin-helpers test:browser",
"test:jest": "NODE_PATH=../../node_modules ../../node_modules/.bin/jest --config ./test/jest.config.js",
"build": "plugin-helpers build"
"build": "yarn plugin_helpers build",
"plugin_helpers": "node ../../scripts/plugin_helpers"
},
"dependencies": {
"brace": "0.11.1",
"css-loader": "^5.0.1",
"lodash": "^4.17.19",
"react-dom": "^16.3.0",
"react-double-scrollbar": "^0.0.15",
"style-loader": "^2.0.0"
"react-double-scrollbar": "^0.0.15"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.7.6",
"@babel/preset-react": "^7.7.4",
"@babel/preset-typescript": "^7.3.3",
"@elastic/elasticsearch": "^7.2.0",
"@elastic/eslint-config-kibana": "link:../../packages/eslint-config-kibana",
"@elastic/eslint-import-resolver-kibana": "link:../../packages/kbn-eslint-import-resolver-kibana",
"@elastic/eui": "^28.4.0",
"@kbn/expect": "link:../../packages/kbn-expect",
"@kbn/i18n": "link:../../packages/kbn-i18n",
"@kbn/plugin-helpers": "link:../../packages/kbn-plugin-helpers",
"@kbn/ui-framework": "link:../../packages/kbn-ui-framework",
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^10.0.3",
"@testing-library/user-event": "^4.1.0",
"@types/angular": "1.6.50",
"@types/hapi-latest": "npm:@types/[email protected]",
"@types/jest": "^25.2.1",
"@types/lodash": "^4.14.150",
"@types/node": "^13.13.4",
"@types/react": "^16.3.14",
"@types/react-dom": "^16.0.5",
"@types/react-router-dom": "^5.1.5",
"babel-eslint": "^10.1.0",
"cypress": "^4.9.0",
"cypress": "^5.0.0",
"eslint": "^6.8.0",
"eslint-plugin-babel": "^5.2.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.11.1",
"husky": "^4.2.5",
"jest": "^25.5.0",
"jest-cli": "^25.5.0",
"jest-raw-loader": "^1.0.1",
"lint-staged": "^10.2.0",
"mutationobserver-shim": "^0.3.3",
"prettier": "^2.0.5",
"ts-jest": "^25.4.0",
"ts-loader": "^7.0.1",
"ts-node": "^8.9.1",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "3.0.3"
"tslint-plugin-prettier": "^2.0.1"
},
"engines": {
"node": "10.22.0",
"node": "10.22.1",
"yarn": "^1.21.1"
},
"resolutions": {
Expand All @@ -97,4 +59,4 @@
"eslint-utils": "^2.0.0",
"**/@types/react": "16.3.14"
}
}
}
30 changes: 0 additions & 30 deletions workbench/public/components/Main/__snapshots__/main.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
exports[`<Main /> spec click clear button 1`] = `
<div>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down Expand Up @@ -387,11 +382,6 @@ exports[`<Main /> spec click clear button 1`] = `
exports[`<Main /> spec click run button, and response causes an error 1`] = `
<div>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down Expand Up @@ -771,11 +761,6 @@ exports[`<Main /> spec click run button, and response causes an error 1`] = `
exports[`<Main /> spec click run button, and response is not ok 1`] = `
<div>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down Expand Up @@ -1155,11 +1140,6 @@ exports[`<Main /> spec click run button, and response is not ok 1`] = `
exports[`<Main /> spec click run button, and response is ok 1`] = `
<div>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down Expand Up @@ -1542,11 +1522,6 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
data-aria-hidden="true"
>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down Expand Up @@ -1926,11 +1901,6 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
exports[`<Main /> spec renders the component 1`] = `
<div>
<div>
<div>
<hr
class="euiHorizontalRule euiHorizontalRule--full"
/>
</div>
<div
class="sql-console-query-container"
>
Expand Down
1 change: 0 additions & 1 deletion workbench/test/setup.jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* permissions and limitations under the License.
*/

import "@testing-library/react/cleanup-after-each";
import "@testing-library/jest-dom/extend-expect";
import 'mutationobserver-shim';
import { configure } from "@testing-library/react";
Expand Down
Loading