Skip to content

Commit

Permalink
Upgrade Notifications and Notifications Dashboards to 2.1 (#468)
Browse files Browse the repository at this point in the history
* Bump gradle version to 7.4.2

Signed-off-by: Mohammad Qureshi <[email protected]>

* Bump Notifications backend to 2.1

Signed-off-by: Mohammad Qureshi <[email protected]>

* Upgrade Notifications Dashboards to 2.1 and add postbuild script for artifact renaming

Signed-off-by: Mohammad Qureshi <[email protected]>

* Remove renaming of Notifications Dashboards artifact in GitHub Action since postbuild script does the same thing

Signed-off-by: Mohammad Qureshi <[email protected]>
  • Loading branch information
qreshi authored Jun 23, 2022
1 parent 7af4099 commit cd377ee
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on: [pull_request, push]

env:
PLUGIN_NAME: notifications-dashboards
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_PLUGIN_VERSION: 2.0.0.0
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
OPENSEARCH_PLUGIN_VERSION: 2.1.0.0

jobs:

Expand Down Expand Up @@ -73,7 +73,6 @@ jobs:
run: |
cd OpenSearch-Dashboards/plugins/dashboards-notifications
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v1
Expand Down
4 changes: 2 additions & 2 deletions dashboards-notifications/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "notificationsDashboards",
"version": "2.0.0.0",
"opensearchDashboardsVersion": "2.0.0",
"version": "2.1.0.0",
"opensearchDashboardsVersion": "2.1.0",
"requiredPlugins": ["navigation", "data"],
"optionalPlugins": ["share"],
"server": true,
Expand Down
11 changes: 6 additions & 5 deletions dashboards-notifications/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "notifications-dashboards",
"version": "2.0.0.0",
"version": "2.1.0.0",
"description": "OpenSearch Dashboards Notifications Plugin",
"license": "Apache-2.0",
"main": "index.ts",
"opensearchDashboards": {
"version": "2.0.0",
"templateVersion": "1.0.0"
"config": {
"id": "notificationsDashboards",
"zip_name": "notifications-dashboards"
},
"scripts": {
"osd": "node ../../scripts/osd",
Expand All @@ -17,7 +17,8 @@
"test:jest": "TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js",
"cypress:run": "cypress run",
"cypress:open": "cypress open",
"plugin_helpers": "node ../../scripts/plugin_helpers"
"plugin_helpers": "node ../../scripts/plugin_helpers",
"postbuild": "echo Renaming build artifact to [$npm_package_config_zip_name-$npm_package_version.zip] && mv build/$npm_package_config_id*.zip build/$npm_package_config_zip_name-$npm_package_version.zip"
},
"dependencies": {
"cypress": "^6.0.0"
Expand Down
4 changes: 2 additions & 2 deletions notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
// 2.0.0-SNAPSHOT -> 2.0.0.0-SNAPSHOT
// 2.1.0-SNAPSHOT -> 2.1.0.0-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
if (buildVersionQualifier) {
Expand Down
Binary file modified notifications/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion notifications/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class PluginRestTestCase : OpenSearchRestTestCase() {
open fun wipeAllPluginIndices() {
val pluginIndices = listOf(".opensearch-notifications-config")
val response = client().performRequest(Request("GET", "/_cat/indices?format=json&expand_wildcards=all"))
val xContentType = XContentType.fromMediaTypeOrFormat(response.entity.contentType.value)
val xContentType = XContentType.fromMediaType(response.entity.contentType.value)
xContentType.xContent().createParser(
NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
response.entity.content
Expand Down

0 comments on commit cd377ee

Please sign in to comment.