diff --git a/.github/workflows/cypress-e2e-reporting-test.yml b/.github/workflows/cypress-e2e-reporting-test.yml index 3fe5539f..49a25141 100644 --- a/.github/workflows/cypress-e2e-reporting-test.yml +++ b/.github/workflows/cypress-e2e-reporting-test.yml @@ -7,8 +7,8 @@ env: # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm OPENSEARCH_DASHBOARDS_VERSION: 'main' - OPENSEARCH_VERSION: '3.0.0' - OPENSEARCH_PLUGIN_VERSION: '3.0.0.0' + OPENSEARCH_VERSION: '3.0.0-alpha1' + OPENSEARCH_PLUGIN_VERSION: '3.0.0.0-alpha1' PLUGIN_NAME: dashboards-reporting jobs: @@ -17,8 +17,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] - jdk: [ 11 ] + os: [ubuntu-latest] + jdk: [21] runs-on: ${{ matrix.os }} steps: @@ -56,7 +56,7 @@ jobs: run: | /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/job-scheduler.zip" shell: bash - + - name: Install Reports Scheduler run: | /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/reports-scheduler.zip" @@ -92,7 +92,7 @@ jobs: - name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir uses: actions/checkout@v2 with: - path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} + path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - id: tool-versions run: | @@ -125,17 +125,24 @@ jobs: nohup yarn start --no-base-path --no-watch | tee dashboard.log & working-directory: OpenSearch-Dashboards - - name : Check If OpenSearch Dashboards Is Ready + - name: Check If OpenSearch Dashboards Is Ready if: ${{ runner.os == 'Linux' }} run: | - if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then + if timeout 1200 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then echo "OpenSearch Dashboards compiled successfully." else - echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling." + echo "Timeout for 1200 seconds reached. OpenSearch Dashboards did not finish compiling." exit 1 fi working-directory: OpenSearch-Dashboards + - name: Upload Dashboards logs + uses: actions/upload-artifact@v4.4.0 + if: failure() + with: + name: dashboard.logs + path: OpenSearch-Dashboards/dashboard.log + - name: Install Cypress run: | npx cypress install diff --git a/.github/workflows/dashboards-reports-test-and-build-workflow.yml b/.github/workflows/dashboards-reports-test-and-build-workflow.yml index 3b0f7438..5cafe86f 100644 --- a/.github/workflows/dashboards-reports-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-reports-test-and-build-workflow.yml @@ -5,9 +5,8 @@ on: [pull_request, push] env: PLUGIN_NAME: reportsDashboards ARTIFACT_NAME: reports-dashboards - OPENSEARCH_VERSION: 'main' - OPENSEARCH_PLUGIN_VERSION: 3.0.0.0 - + OPENSEARCH_DASHBOARDS_VERSION: 'main' + OPENSEARCH_PLUGIN_VERSION: '3.0.0.0-alpha1' jobs: Get-CI-Image-Tag: @@ -30,12 +29,12 @@ jobs: uses: actions/checkout@v2 with: repository: opensearch-project/Opensearch-Dashboards - ref: ${{ env.OPENSEARCH_VERSION }} + ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }} path: OpenSearch-Dashboards - - name: Checkout Plugin + - name: Checkout Plugin uses: actions/checkout@v2 - with: + with: path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - name: OpenSearch Dashboards Plugin Bootstrap and test @@ -74,7 +73,6 @@ jobs: windows-build: runs-on: windows-latest steps: - # Enable longer filenames for windows - name: Enable longer filenames run: git config --system core.longpaths true @@ -83,7 +81,7 @@ jobs: uses: actions/checkout@v1 with: repository: opensearch-project/Opensearch-Dashboards - ref: ${{ env.OPENSEARCH_VERSION }} + ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }} path: OpenSearch-Dashboards - name: Setup Node @@ -103,9 +101,9 @@ jobs: - run: node -v - run: yarn -v - - name: Checkout Plugin + - name: Checkout Plugin uses: actions/checkout@v1 - with: + with: path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - name: OpenSearch Dashboards Plugin Bootstrap @@ -127,7 +125,6 @@ jobs: yarn build mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip - - name: Upload Artifact For Windows uses: actions/upload-artifact@v4.4.0 with: @@ -141,7 +138,7 @@ jobs: uses: actions/checkout@v1 with: repository: opensearch-project/Opensearch-Dashboards - ref: ${{ env.OPENSEARCH_VERSION }} + ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }} path: OpenSearch-Dashboards - name: Setup Node @@ -161,9 +158,9 @@ jobs: - run: node -v - run: yarn -v - - name: Checkout Plugin + - name: Checkout Plugin uses: actions/checkout@v1 - with: + with: path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - name: OpenSearch Dashboards Plugin Bootstrap diff --git a/.github/workflows/ftr-e2e-reporting-test.yml b/.github/workflows/ftr-e2e-reporting-test.yml index 0470fc6e..0737e9ca 100644 --- a/.github/workflows/ftr-e2e-reporting-test.yml +++ b/.github/workflows/ftr-e2e-reporting-test.yml @@ -7,8 +7,8 @@ env: # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm OPENSEARCH_DASHBOARDS_VERSION: 'main' - OPENSEARCH_VERSION: '3.0.0' - OPENSEARCH_PLUGIN_VERSION: '3.0.0.0' + OPENSEARCH_VERSION: '3.0.0-alpha1' + OPENSEARCH_PLUGIN_VERSION: '3.0.0.0-alpha1' PLUGIN_NAME: dashboards-reporting jobs: @@ -17,8 +17,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] - jdk: [ 11 ] + os: [ubuntu-latest] + jdk: [21] runs-on: ${{ matrix.os }} steps: @@ -56,7 +56,7 @@ jobs: run: | /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/job-scheduler.zip" shell: bash - + - name: Install Reports Scheduler run: | /bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/reports-scheduler.zip" @@ -92,7 +92,7 @@ jobs: - name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir uses: actions/checkout@v2 with: - path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} + path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - id: tool-versions run: | @@ -125,17 +125,24 @@ jobs: nohup yarn start --no-base-path --no-watch | tee dashboard.log & working-directory: OpenSearch-Dashboards - - name : Check If OpenSearch Dashboards Is Ready + - name: Check If OpenSearch Dashboards Is Ready if: ${{ runner.os == 'Linux' }} run: | - if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then + if timeout 1200 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then echo "OpenSearch Dashboards compiled successfully." else - echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling." + echo "Timeout for 1200 seconds reached. OpenSearch Dashboards did not finish compiling." exit 1 fi working-directory: OpenSearch-Dashboards + - name: Upload Dashboards logs + uses: actions/upload-artifact@v4.4.0 + if: failure() + with: + name: dashboard.logs + path: OpenSearch-Dashboards/dashboard.log + - name: Checkout Dashboards Functioanl Test Repo uses: actions/checkout@v2 with: diff --git a/.github/workflows/verify-binary-installation.yml b/.github/workflows/verify-binary-installation.yml index d8264c49..06141441 100644 --- a/.github/workflows/verify-binary-installation.yml +++ b/.github/workflows/verify-binary-installation.yml @@ -2,7 +2,7 @@ name: 'Install Dashboards with Plugin via Binary' on: [push, pull_request] env: - OPENSEARCH_VERSION: '3.0.0' + OPENSEARCH_VERSION: '3.0.0-alpha1' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -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 @@ -42,14 +42,14 @@ jobs: built_plugin_name: reportsDashboards built_plugin_suffix: ${{ env.OPENSEARCH_VERSION }} 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 \ No newline at end of file + shell: bash diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 7ad7b34f..f30a075f 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,20 +1,10 @@ { "id": "reportsDashboards", - "version": "3.0.0.0", + "version": "3.0.0.0-alpha1", "opensearchDashboardsVersion": "3.0.0", - "requiredPlugins": [ - "navigation", - "data", - "opensearchDashboardsUtils" - ], - "optionalPlugins": [ - "share", - "dataSource", - "dataSourceManagement" - ], + "requiredPlugins": ["navigation", "data", "opensearchDashboardsUtils"], + "optionalPlugins": ["share", "dataSource", "dataSourceManagement"], "server": true, "ui": true, - "configPath": [ - "opensearch_reporting" - ] -} \ No newline at end of file + "configPath": ["opensearch_reporting"] +} diff --git a/package.json b/package.json index a2318ee0..98290ee8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reports-dashboards", - "version": "3.0.0.0", + "version": "3.0.0.0-alpha1", "description": "OpenSearch Dashboards Reports Plugin", "license": "Apache-2.0", "main": "index.ts",