Skip to content
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

Merge dev to main for OpenSearch 1.0.0-beta1 release #27

Merged
merged 5 commits into from
Apr 27, 2021
Merged
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
17 changes: 9 additions & 8 deletions .github/workflows/dashboards-reports-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:

env:
PLUGIN_NAME: reportsDashboards
OD_VERSION: 1.15.0.0
OPENSEARCH_VERSION: 1.0.0-beta1
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-beta1

jobs:
build:
Expand All @@ -28,7 +29,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
ref: ${{ env.OPENSEARCH_VERSION }}
path: dashboards-reports/OpenSearch-Dashboards

- name: Setup Node
Expand Down Expand Up @@ -68,9 +69,9 @@ jobs:

cd build
mkdir -p ./{linux-x64,linux-arm64,windows-x64}/OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip

s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/reports/"

Expand All @@ -79,7 +80,7 @@ jobs:
unzip chromium-linux-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-linux-x64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
linux_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip`
linux_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip`

#Inject build number before the suffix and upload to S3
linux_x64_artifact_outfile=`basename ${linux_x64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
Expand All @@ -92,7 +93,7 @@ jobs:
unzip chromium-linux-arm64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-linux-arm64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
linux_arm64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip`
linux_arm64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip`

#Inject build number before the suffix and upload to S3
linux_arm64_artifact_outfile=`basename ${linux_arm64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
Expand All @@ -105,7 +106,7 @@ jobs:
unzip chromium-windows-x64.zip -d ./OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
rm chromium-windows-x64.zip
zip -ur ./${{ env.PLUGIN_NAME }}-*.zip ./OpenSearch-Dashboards
windows_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip`
windows_x64_artifact=`ls ./${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip`

#Inject build number before the suffix and upload to S3
windows_x64_artifact_outfile=`basename ${windows_x64_artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on: [pull_request, push]

env:
PLUGIN_NAME: reportsDashboards
OD_VERSION: 1.15.0.0
OPENSEARCH_VERSION: 1.0.0-beta1
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-beta1

jobs:
build:
Expand All @@ -17,7 +18,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
ref: ${{ env.OPENSEARCH_VERSION }}
path: dashboards-reports/OpenSearch-Dashboards

- name: Setup Node
Expand All @@ -32,7 +33,7 @@ jobs:
run: |
sudo apt install -y libnss3-dev fonts-liberation libfontconfig1
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
unzip chromium-linux-x64.zip
rm chromium-linux-x64.zip

Expand All @@ -57,9 +58,9 @@ jobs:

cd build
mkdir -p ./{linux-x64,linux-arm64,windows-x64}/OpenSearch-Dashboards/${{ env.PLUGIN_NAME }}
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip

cd linux-x64
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
Expand All @@ -86,16 +87,16 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: dashboards-reports-linux-x64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-x64.zip
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip

- name: Upload Artifact For Linux arm64
uses: actions/upload-artifact@v1
with:
name: dashboards-reports-linux-arm64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-linux-arm64.zip
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip

- name: Upload Artifact For Windows
uses: actions/upload-artifact@v1
with:
name: dashboards-reports-windows-x64
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}-windows-x64.zip
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip
41 changes: 38 additions & 3 deletions .github/workflows/reports-scheduler-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,52 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Set up JDK 1.14
uses: actions/setup-java@v1
with:
java-version: 1.14

# dependencies: OpenSearch
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0.0-beta1'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=beta1 -Dbuild.snapshot=false

# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
repository: 'opensearch-project/common-utils'
ref: '1.0.0-beta1'
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1

# dependencies: job-scheduler
- name: Checkout job-scheduler
uses: actions/checkout@v2
with:
repository: 'opensearch-project/job-scheduler'
ref: '1.0.0-beta1'
path: job-scheduler
- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 -Dbuild.snapshot=false

# reports-scheduler
- name: Checkout Reports Scheduler
uses: actions/checkout@v2

- name: Build with Gradle
run: |
cd reports-scheduler
./gradlew build
./gradlew build -Dopensearch.version=1.0.0-beta1

- name: Create Artifact Path
run: |
Expand Down
4 changes: 2 additions & 2 deletions dashboards-reports/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "reportsDashboards",
"version": "1.15.0.0",
"opensearchDashboardsVersion": "7.10.2",
"version": "1.0.0.0-beta1",
"opensearchDashboardsVersion": "1.0.0-beta1",
"requiredPlugins": ["navigation", "data"],
"optionalPlugins": ["share"],
"server": true,
Expand Down
10 changes: 5 additions & 5 deletions dashboards-reports/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "reports-dashboards",
"version": "1.15.0.0",
"description": "OpenSearch Dashboards Reporting Plugin",
"name": "reports_dashboards",
"version": "1.0.0.0-beta1",
"description": "OpenSearch Dashboards Reports Plugin",
"license": "Apache-2.0",
"main": "index.ts",
"opensearchDashboards": {
"version": "7.10.2",
"templateVersion": "1.0.0"
"version": "1.0.0-beta1",
"templateVersion": "1.0.0-beta1"
},
"scripts": {
"osd": "node ../../scripts/osd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const generateInContextReport = async (
{
headers: {
'Content-Type': 'application/json',
'osd-version': '7.10.2',
'osd-version': '1.0.0',
accept: '*/*',
'accept-language': 'en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6',
pragma: 'no-cache',
Expand Down Expand Up @@ -340,7 +340,7 @@ async function getTenantInfoIfExists() {
const res = await fetch(`../api/v1/multitenancy/tenant`, {
headers: {
'Content-Type': 'application/json',
'osd-version': '7.10.2',
'osd-version': '1.0.0',
accept: '*/*',
'accept-language': 'en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6',
pragma: 'no-cache',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 2021-04-26 Version 1.0.0.0-beta1
Compatible with OpenSearch 1.0.0-alpha1

### OpenSearch Migration
* Migrate reporting frontend plugin to OpenSearch Dashboards ([#4](https://github.com/opensearch-project/dashboards-reports/pull/4))
* [migration] Rename elasticsearch to opensearch for reports-scheduler ([#5](https://github.com/opensearch-project/dashboards-reports/pull/5))
* Change dashboards nav to use OpenSearch ([#6](https://github.com/opensearch-project/dashboards-reports/pull/6))
* Add license headers for OpenSearch ([#8](https://github.com/opensearch-project/dashboards-reports/pull/8))
* dashboards-reports version reset ([#23](https://github.com/opensearch-project/dashboards-reports/pull/23))
* [Migration] Reports-scheduler renaming, version reset, fix CI ([#22](https://github.com/opensearch-project/dashboards-reports/pull/22))
* [Migration] Build reporting against OpenSearch 1.0.0-alpha2 ([#25](https://github.com/opensearch-project/dashboards-reports/pull/25))
* Update opensearch version to 1.0.0 beta1 ([#26](https://github.com/opensearch-project/dashboards-reports/pull/26))
2 changes: 1 addition & 1 deletion reports-scheduler/build-tools/pkgbuild.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ afterEvaluate {
maintainer 'OpenDistro for OpenSearch Team <opendistro@amazon.com>'
url 'https://opendistro.github.io/opensearch/downloads'
summary '''
OpenSearch Report scheduler.
OpenSearch Reports scheduler.
Reference documentation can be found at https://opendistro.github.io/opensearch/docs.
'''.stripIndent().replace('\n', ' ').trim()
}
Expand Down
41 changes: 14 additions & 27 deletions reports-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,19 @@ import java.util.concurrent.Callable

buildscript {
ext {
es_group = "org.opensearch"
es_version = System.getProperty("es.version", "7.10.3-SNAPSHOT")
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "1.0.0-beta1")
kotlin_version = System.getProperty("kotlin.version", "1.4.0")
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = 's3://search-vemsarat/'
credentials(AwsCredentials) {
accessKey = System.env.AWS_ACCESS_KEY_ID ?: findProperty('aws_access_key_id')
secretKey = System.env.AWS_SECRET_ACCESS_KEY ?: findProperty('aws_secret_access_key')
}
}
jcenter()
}

dependencies {
classpath "${es_group}.gradle:build-tools:${es_version}"
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.12.0"
Expand Down Expand Up @@ -76,10 +70,10 @@ def usingMultiNode = project.properties.containsKey('numNodes')
check.dependsOn jacocoTestReport

opensearchplugin {
name 'opendistro-reports-scheduler'
name 'opensearch-reports-scheduler'
description 'Scheduler for Dashboards Reports Plugin'
classname "com.amazon.opendistroforelasticsearch.reportsscheduler.ReportsSchedulerPlugin"
extendedPlugins = ['opendistro-job-scheduler']
extendedPlugins = ['opensearch-job-scheduler']
}

allOpen {
Expand Down Expand Up @@ -112,8 +106,8 @@ ext {
projectSubstitutions = [:]
licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE.txt')
opendistroVersion = "${version}"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearchVersion = "${version}.0-beta1"
}

if (isSnapshot) {
Expand All @@ -130,30 +124,23 @@ plugins.withId('org.jetbrains.kotlin.jvm') {

allprojects {
group = "com.amazon.opendistroforelasticsearch"
version = "${opendistroVersion}.0"

version = "${opensearchVersion}"
plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
}
}

repositories {
maven {
url = 's3://search-vemsarat/'
credentials(AwsCredentials) {
accessKey = System.env.AWS_ACCESS_KEY_ID ?: findProperty('aws_access_key_id')
secretKey = System.env.AWS_SECRET_ACCESS_KEY ?: findProperty('aws_secret_access_key')
}
}
mavenLocal()
}

dependencies {
compile "org.opensearch:opensearch:${es_version}"
compile "org.opensearch:opensearch:${opensearch_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9"
compile "${group}:common-utils:${opendistroVersion}.0"
compileOnly "${group}:opendistro-job-scheduler-spi:${opendistroVersion}.0-SNAPSHOT"
compile "${group}:common-utils:${opensearchVersion}"
compileOnly "${group}:opensearch-job-scheduler-spi:${opensearchVersion}"
compile group: 'com.google.guava', name: 'guava', version: '15.0'
compile "org.json:json:20180813"
compile group: 'com.github.wnameless', name: 'json-flattener', version: '0.1.0'
Expand All @@ -163,7 +150,7 @@ dependencies {
'org.junit.jupiter:junit-jupiter-api:5.6.2'
)
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2')
testCompile "org.opensearch.test:framework:${es_version}"
testCompile "org.opensearch.test:framework:${opensearch_version}"
testCompile "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testCompile "org.mockito:mockito-core:2.23.0"
Expand Down Expand Up @@ -254,7 +241,7 @@ integTest.dependsOn(bundle)
integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))}

testClusters.integTest {
testDistribution = 'OSS'
testDistribution = "ARCHIVE"
// need to install job-scheduler first, need to assemble job-scheduler first
plugin(provider(new Callable<RegularFile>(){
@Override
Expand Down
2 changes: 1 addition & 1 deletion reports-scheduler/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
#
##

version = 1.15.0
version = 1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class ReportsSchedulerPluginIT : OpenSearchIntegTestCase() {
val pluginInfos = nodesInfoResponse.nodes[0].getInfo(PluginsAndModules::class.java).pluginInfos
assertTrue(
pluginInfos.stream()
.anyMatch { pluginInfo: PluginInfo -> pluginInfo.name == "opendistro-job-scheduler" })
.anyMatch { pluginInfo: PluginInfo -> pluginInfo.name == "opensearch-job-scheduler" })
assertTrue(
pluginInfos.stream()
.anyMatch { pluginInfo: PluginInfo -> pluginInfo.name == "opendistro-reports-scheduler" })
.anyMatch { pluginInfo: PluginInfo -> pluginInfo.name == "opensearch-reports-scheduler" })
}
}
Binary file not shown.
Binary file not shown.