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

1.3release - cherry-picking from main to 1.x branch #190

Merged
merged 22 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5bbf0a1
OpenSearch 1.1.0 release (#103)
annie3431 Sep 10, 2021
d4dc436
Updates to workflow, unit tests, and some appearance (#114)
annie3431 Sep 15, 2021
3f4e338
Cherry-pick commits from main branch to 1.x branch (#131)
annie3431 Oct 12, 2021
9ff7822
Cherry-picking commits from main to 1.x branch for 1.2 release (#142)
AWSHurneyt Nov 5, 2021
052b128
Added DCO section to CONTRIBUTING.md and GitHub workflows. Updated co…
AWSHurneyt Nov 9, 2021
b0315b5
support creating monitor for anomaly detector with custom result inde…
ylwu-amzn Nov 9, 2021
9c02e0d
Bumping version to 1.3. Signed-off-by: AWSHurneyt <[email protected]
AWSHurneyt Dec 18, 2021
a85dec5
initial commit (#150)
CEHENKLE Dec 31, 2021
f15a3d1
Add .whitesource configuration file (#153)
mend-for-github.aaakk.us.kg[bot] Jan 14, 2022
dab2efe
Implemented a toast to display successful attempts to acknowledge ale…
AWSHurneyt Jan 27, 2022
cb98e0a
Adding basic unit tests (#151)
annie3431 Jan 28, 2022
aacf413
Fix the error handling when config index is not found (#173)
annie3431 Feb 11, 2022
c2f76f8
Updated copyright notices and headers. (#168)
AWSHurneyt Feb 17, 2022
ecd47f9
Refactored acknowledge alerts button on Alerts by trigger dashboard p…
AWSHurneyt Feb 17, 2022
6588090
Adding a few more basic unit tests (#180)
annie3431 Feb 28, 2022
15fc4cc
Remove node version declaration in package.json (#166)
annie3431 Mar 1, 2022
cb6dbae
Update DestinationsService.js (#182)
Mar 5, 2022
e4c83cf
Add backport workflow (#176)
Mar 8, 2022
7b6ad7c
Configure test workflows to run on 1.x branches (#183)
Mar 8, 2022
7480540
Add 1.3 release notes (#175) (#185)
opensearch-trigger-bot[bot] Mar 9, 2022
26ac128
Add backport documentation link (#184) (#187)
opensearch-trigger-bot[bot] Mar 10, 2022
a5d42d7
Implemented support for cluster metrics monitors (#162) (#189)
AWSHurneyt Mar 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @opensearch-project/alerting-plugin
29 changes: 29 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: Backport
on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: Backport
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Backport
uses: VachaShah/[email protected]
with:
github_token: ${{ steps.github_app_token.outputs.token }}
branch_name: backport/backport-${{ github.event.number }}
24 changes: 3 additions & 21 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ on:
pull_request:
branches:
- main
- 1.x
push:
branches:
- main
- 1.x
env:
OPENSEARCH_DASHBOARDS_VERSION: '1.x'
OPENSEARCH_VERSION: '1.1.0-SNAPSHOT'
OPENSEARCH_VERSION: '1.3.0-SNAPSHOT'
jobs:
tests:
name: Run Cypress E2E tests
Expand All @@ -24,26 +26,6 @@ jobs:
with:
# TODO: Parse this from alerting plugin
java-version: 14
# dependencies: OpenSearch
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: opensearch-project/OpenSearch
path: OpenSearch
ref: '1.x'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal
# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
repository: opensearch-project/common-utils
path: common-utils
ref: 'main'
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Developer Certificate of Origin Check

on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
15 changes: 15 additions & 0 deletions .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Delete merged branch of the backport PRs
on:
pull_request:
types:
- closed

jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref,'backport/')
steps:
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- main
- 1.x
pull_request:
branches:
- main
- 1.x
env:
OPENSEARCH_DASHBOARDS_VERSION: '1.x'
jobs:
Expand Down Expand Up @@ -45,4 +47,6 @@ jobs:
- name: Run tests
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn run test:jest
yarn run test:jest --coverage
- name: Uploads coverage
uses: codecov/codecov-action@v1
15 changes: 15 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken": "",
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Contributing to this Project

OpenSearch is a community project that is built and maintained by people just like **you**.
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
6 changes: 5 additions & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ Example output: `./build/alertingDashboards-1.0.0-rc1.zip`

If you are running Cypress tests with OpenSearch-Dashboards development server, pass these 2 options to `yarn start`:
1. `--no-base-path`: opt out the BasePathProxy.
1. `--no-watch`: make sure your server has not restarted.
1. `--no-watch`: make sure your server has not restarted.

### Backport

- [Link to backport documentation](https://github.com/opensearch-project/opensearch-plugins/blob/main/BACKPORT.md)
14 changes: 2 additions & 12 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
OpenSearch
Copyright 2021 OpenSearch Contributors

This product includes software developed by
Elasticsearch (http://www.elastic.co).
Copyright 2009-2018 Elasticsearch

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).

This product includes software developed by
Joda.org (http://www.joda.org/).
OpenSearch (https://opensearch.org/)
Copyright OpenSearch Contributors
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[![Unit tests](https://github.com/opensearch-project/alerting-dashboards-plugin/workflows/Unit%20tests%20workflow/badge.svg)](https://github.com/opensearch-project/alerting-dashboards-plugin/actions?query=workflow%3A%22Unit+tests+workflow%22)
[![Integration tests](https://github.com/opensearch-project/alerting-dashboards-plugin/workflows/E2E%20Cypress%20tests/badge.svg)](https://github.com/opensearch-project/alerting-dashboards-plugin/actions?query=workflow%3A%22E2E+Cypress+tests%22)
[![codecov](https://codecov.io/gh/opensearch-project/alerting-dashboards-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/opensearch-project/alerting-dashboards-plugin)
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://opensearch.org/docs/monitoring-plugins/alerting/index/)
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/Use-this-category-for-all-questions-around-machine-learning-plugins)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)

<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/>

- [OpenSearch Alerting Dashboards](#opensearch-alerting-dashboards)
Expand Down Expand Up @@ -41,4 +48,4 @@ This project is licensed under the [Apache v2.0 License](LICENSE).

## Copyright

Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details.
134 changes: 134 additions & 0 deletions cypress/fixtures/sample_alerts_flyout_bucket_level_monitor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"name": "sample_alerts_flyout_bucket_level_monitor",
"type": "monitor",
"monitor_type": "bucket_level_monitor",
"enabled": true,
"schedule": {
"period": {
"unit": "MINUTES",
"interval": 1
}
},
"inputs": [
{
"search": {
"indices": ["opensearch_dashboards_sample_data_ecommerce"],
"query": {
"size": 0,
"aggregations": {
"composite_agg": {
"composite": {
"sources": [
{
"customer_gender": {
"terms": {
"field": "customer_gender"
}
}
},
{
"user": {
"terms": {
"field": "user"
}
}
}
]
},
"aggs": {
"avg_products_price": {
"avg": {
"field": "products.price"
}
}
}
}
},
"query": {
"bool": {
"filter": [
{
"range": {
"order_date": {
"gte": "{{period_end}}||-10d",
"lte": "{{period_end}}",
"format": "epoch_millis"
}
}
}
]
}
}
}
}
}
],
"triggers": [
{
"bucket_level_trigger": {
"id": "JHpsfH0BYHgJ26-yS5n7",
"name": "sample_alerts_flyout_bucket_level_trigger",
"severity": "4",
"condition": {
"buckets_path": {
"_count": "_count",
"avg_products_price": "avg_products_price"
},
"parent_bucket_path": "composite_agg",
"script": {
"source": "params._count < 10000 || params.avg_products_price == 10",
"lang": "painless"
},
"gap_policy": "skip"
},
"actions": []
}
}
],
"ui_metadata": {
"schedule": {
"timezone": null,
"frequency": "interval",
"period": {
"unit": "MINUTES",
"interval": 1
},
"daily": 0,
"weekly": {
"tue": false,
"wed": false,
"thur": false,
"sat": false,
"fri": false,
"mon": false,
"sun": false
},
"monthly": {
"type": "day",
"day": 1
},
"cronExpression": "0 */1 * * *"
},
"search": {
"searchType": "graph",
"timeField": "order_date",
"aggregations": [
{
"aggregationType": "avg",
"fieldName": "products.price"
}
],
"groupBy": ["customer_gender", "user"],
"bucketValue": 10,
"bucketUnitOfTime": "d",
"where": {
"fieldName": [],
"fieldRangeEnd": 0,
"fieldRangeStart": 0,
"fieldValue": "",
"operator": "is"
}
},
"monitor_type": "bucket_level_monitor"
}
}
Loading