Skip to content

Commit

Permalink
Fix Observability CI workflow checks (#2046)
Browse files Browse the repository at this point in the history
* add job scheduler to observability CI

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update workflow for integ tests

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove datasources test

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* exclude localhost links from link checker

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update links for link checker

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
  • Loading branch information
ps48 authored Aug 9, 2024
1 parent df6266a commit 61e6012
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 105 deletions.
67 changes: 0 additions & 67 deletions .cypress/integration/datasources_test/datasources_basic_ui.spec.js

This file was deleted.

28 changes: 20 additions & 8 deletions .github/workflows/ftr-e2e-dashboards-observability-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: [pull_request, push]

env:
PLUGIN_NAME: dashboards-observability
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_VERSION: '3.0.0'
OPENSEARCH_PLUGIN_VERSION: '3.0.0.0'
OPENSEARCH_DASHBOARDS_VERSION: "main"
OPENSEARCH_VERSION: "3.0.0"
OPENSEARCH_PLUGIN_VERSION: "3.0.0.0"

jobs:
tests:
Expand All @@ -29,8 +29,15 @@ jobs:
- name: Set up Java 21
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '21'
distribution: "corretto"
java-version: "21"

- name: Download Job Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: opensearch-job-scheduler.zip

- name: Download observability artifact
uses: suisei-cn/actions-download-file@v1.4.0
Expand All @@ -57,6 +64,11 @@ jobs:
rm -f opensearch-*.tar.gz
shell: bash

- name: Install job scheduler plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/opensearch-job-scheduler.zip"
shell: bash

- name: Install observability plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/observability.zip"
Expand Down Expand Up @@ -94,7 +106,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ steps.versions_step.outputs.node_version }}
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- name: Install correct yarn version for OpenSearch Dashboards
run: |
Expand All @@ -112,7 +124,7 @@ jobs:
cd OpenSearch-Dashboards
nohup yarn start --no-base-path --no-watch | tee dashboard.log &
- name : Check If OpenSearch Dashboards Is Ready
- name: Check If OpenSearch Dashboards Is Ready
if: ${{ runner.os == 'Linux' }}
run: |
cd ./OpenSearch-Dashboards
Expand All @@ -130,7 +142,7 @@ jobs:
repository: opensearch-project/opensearch-dashboards-functional-test
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
fetch-depth: 0

- name: Install Cypress
run: |
npm install cypress --save-dev
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/integration-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: [pull_request, push]

env:
PLUGIN_NAME: dashboards-observability
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_VERSION: '3.0.0'
OPENSEARCH_PLUGIN_VERSION: '3.0.0.0'
OPENSEARCH_DASHBOARDS_VERSION: "main"
OPENSEARCH_VERSION: "3.0.0"
OPENSEARCH_PLUGIN_VERSION: "3.0.0.0"

jobs:
tests:
Expand All @@ -26,7 +26,6 @@ jobs:
testgroups:
[
app_analytics_test,
datasources_test,
event_analytics_test,
integrations_test,
metrics_analytics_test,
Expand All @@ -43,8 +42,15 @@ jobs:
- name: Set up Java 21
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '21'
distribution: "corretto"
java-version: "21"

- name: Download Job Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: opensearch-job-scheduler.zip

- name: Download observability artifact
uses: suisei-cn/actions-download-file@v1.4.0
Expand All @@ -71,6 +77,11 @@ jobs:
rm -f opensearch-*.tar.gz
shell: bash

- name: Install job scheduler plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/opensearch-job-scheduler.zip"
shell: bash

- name: Install observability plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/observability.zip"
Expand Down Expand Up @@ -108,7 +119,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ steps.versions_step.outputs.node_version }}
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- name: Configure OpenSearch Dashboards
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Link Checker
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
linkchecker:

runs-on: ubuntu-latest

steps:
Expand All @@ -16,9 +15,8 @@ jobs:
id: lychee
uses: lycheeverse/lychee-action@master
with:
args: --accept=200,403,429 "./**/*.html" "./**/*.md" "./**/*.txt"
args: --accept=200,403,429 "./**/*.html" "./**/*.md" "./**/*.txt" --exclude "http://localhost" --exclude "https://localhost"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 61e6012

Please sign in to comment.