Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b7267ae
Upgrade gradle 8.10.2 and JDK 23 (#1428)
peterzhuamazon Feb 25, 2025
554fbf5
dependabot: bump com.netflix.nebula.ospackage from 11.5.0 to 11.11.1 …
dependabot[bot] Feb 27, 2025
2eac109
Adding release notes for 3.0-alpha1 (#1432)
junweid62 Mar 6, 2025
9e9bcf6
Use testclusters when testing with security (#1414)
cwperks Mar 18, 2025
5735a00
adding ability to run AD with 2 local clusters (#1441)
amitgalitz Mar 19, 2025
9f4e54e
distinguish local cluster when name is same as remote (#1446)
amitgalitz Apr 8, 2025
c31f323
Adding release notes for 3.0.0.0-beta1 (#1447)
Rishikesh1159 Apr 8, 2025
41b3cd5
Add integtest.sh to specifically run integTestRemote task (#1456)
peterzhuamazon Apr 16, 2025
381324b
Add AWS SAM template for WAF log analysis and anomaly detection (#1460)
kaituo Apr 22, 2025
6e6b1a9
adding release notes for 3.0.0 (#1464)
saimedhi Apr 29, 2025
9831322
Allow maven to publish to all versions (#1470)
peterzhuamazon May 1, 2025
8ea3a0b
Switch guava deps from compileOnly to implementation (#1473)
cwperks May 9, 2025
928cdbd
Introduce state machine, separate config index, improve suggest/valid…
kaituo Jun 6, 2025
c3af9d0
fix complie error
jackiehanyang Aug 4, 2025
bb9f074
adding release notes for 3.1.0 (#1488)
kaituo Jun 10, 2025
d1dac77
Fix incorrect task state handling in ForecastRunOnceTransportAction (…
kaituo Jun 13, 2025
3aa75a4
Fix LatestTimeRetriever range query failing on non-epoch date mapping…
kaituo Jun 17, 2025
8f56497
Refine cold-start, window delay, and task updates (#1496)
kaituo Jun 19, 2025
0d4d1ed
Fix stopping issue when forecaster is in FORECAST_FAILURE state (#1502)
kaituo Jun 23, 2025
e2e06da
Support >1 hr intervals (#1513)
kaituo Jul 7, 2025
b3f0aa7
fix compile error
jackiehanyang Aug 4, 2025
8baa0f2
Fixing concurrency bug on writer (#1508)
amitgalitz Jul 8, 2025
8c3b0f9
Remove instantiation of LockService from JS and use Mock instead (#1523)
cwperks Jul 15, 2025
922b012
fix: advance past current interval & anchor on now (#1528)
kaituo Jul 24, 2025
62bdae5
fix compile error
jackiehanyang Aug 4, 2025
84a6cd9
using asyncrequest instead of direct search (#1535)
amitgalitz Jul 31, 2025
95909ad
fix spotless check
jackiehanyang Aug 4, 2025
96f0cbb
Updates build.gradle to conditionally download certificates (#1517)
DarshitChanpura Jul 7, 2025
288449a
migrating from lang2 to lang3 (#1525)
amitgalitz Jul 18, 2025
b61285f
fix test compile
jackiehanyang Aug 5, 2025
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
23 changes: 23 additions & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Changelog Verifier"
on:
push:
branches-ignore:
- 'whitesource-remediate/**'
- 'backport/**'
pull_request:
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
if: github.repository == 'opensearch-project/anomaly-detection'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}

- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
3 changes: 0 additions & 3 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
types:
- opened

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
label:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
push:
branches:
- 'main'
- '1.*'
- '2.*'
- 'main'
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

jobs:
build-and-publish-snapshots:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test_build_multi_platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Spotless requires JDK 17+
- uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin
- name: Spotless Check
run: ./gradlew spotlessCheck
Expand All @@ -30,7 +29,7 @@ jobs:
needs: spotless
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]
name: Build and Test Anomaly Detection Plugin on Windows
runs-on: windows-latest
env:
Expand Down Expand Up @@ -58,7 +57,7 @@ jobs:
needs: [Get-CI-Image-Tag, spotless]
strategy:
matrix:
java: [11, 17, 21]
java: [21]
fail-fast: false
name: Build and Test Anomaly detection Plugin on Linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,7 +95,7 @@ jobs:
needs: spotless
strategy:
matrix:
java: [11,17,21]
java: [21]
fail-fast: false

name: Build and Test Anomaly detection Plugin on MacOS
Expand Down
112 changes: 38 additions & 74 deletions .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,49 @@
name: Security test workflow for Anomaly Detection
name: Security test workflow
# This workflow is triggered on pull requests to main
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
- "**"
push:
branches:
- "**"

jobs:
Build-ad:
strategy:
matrix:
java: [11,17,21]
fail-fast: false

name: Security test workflow for Anomaly Detection
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

security-test:
needs: Get-CI-Image-Tag
# This job runs on Linux
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

# time-series-analytics
- name: Checkout AD
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
# index-management
- name: Checkout Branch
uses: actions/checkout@v4

- name: Build Anomaly Detection
run: |
./gradlew assemble
# example of variables:
# plugin = opensearch-time-series-analytics-2.10.0.0-SNAPSHOT.zip
# version = 2.10.0, plugin_version = 2.10.0.0, qualifier = SNAPSHOT
- name: Pull and Run Docker
- name: Run integration tests
run: |
plugin=`basename $(ls build/distributions/*.zip)`
version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-3`
plugin_version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-4`
qualifier=`echo $plugin|awk -F- '{print $5}'| cut -d. -f 1-1`

if $qualifier!=SNAPSHOT
then
docker_version=$version-$qualifier
else
docker_version=$version
fi
echo plugin version plugin_version qualifier docker_version
echo "($plugin) ($version) ($plugin_version) ($qualifier) ($docker_version)"

cd ..
if docker pull opensearchstaging/opensearch:$docker_version
then
echo "FROM opensearchstaging/opensearch:$docker_version" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-anomaly-detection ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-anomaly-detection; fi" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-time-series-analytics ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-time-series-analytics; fi" >> Dockerfile
echo "ADD anomaly-detection/build/distributions/$plugin /tmp/" >> Dockerfile
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/$plugin" >> Dockerfile
docker build -t opensearch-ad:test .
echo "imagePresent=true" >> $GITHUB_ENV
else
echo "imagePresent=false" >> $GITHUB_ENV
fi
- name: Run Docker Image
if: env.imagePresent == 'true'
run: |
cd ..
docker run -p 9200:9200 -d -p 9600:9600 -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!" -e "discovery.type=single-node" opensearch-ad:test
sleep 90
- name: Run AD Test
if: env.imagePresent == 'true'
run: |
security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:myStrongPassword123! --insecure |grep opensearch-security|wc -l`
if [ $security -gt 0 ]
then
echo "Security plugin is available"
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=myStrongPassword123!
else
echo "Security plugin is NOT available, skipping integration tests"
fi
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew integTest -Dsecurity=true -Dhttps=true --tests '*IT'"
- name: Upload failed logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
overwrite: 'true'
path: build/testclusters/integTest-*/logs/*
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CHANGELOG
All notable changes to this project are documented in this file.

Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)

## [Unreleased 3.x](https://github.com/opensearch-project/anomaly-detection/compare/3.0...HEAD)
### Features
### Enhancements
- Support >1 hr intervals ([#1513](https://github.com/opensearch-project/anomaly-detection/pull/1513))
- Introduce state machine, separate config index, improve suggest/validate APIs, and persist cold-start results for run-once visualization ([#1479](https://github.com/opensearch-project/anomaly-detection/pull/1479))


### Bug Fixes
- Fixing concurrency bug on writer ([#1508](https://github.com/opensearch-project/anomaly-detection/pull/1508))
- fix(forecast): advance past current interval & anchor on now ([#1528](https://github.com/opensearch-project/anomaly-detection/pull/1528))
- Changing search calls on interval calculation ([#1535](https://github.com/opensearch-project/anomaly-detection/pull/1535))

### Infrastructure
### Documentation
### Maintenance
### Refactoring

## [Unreleased 2.x](https://github.com/opensearch-project/anomaly-detection/compare/2.19...2.x)
### Features
### Enhancements
### Bug Fixes
### Infrastructure
### Documentation
### Maintenance
### Refactoring
23 changes: 13 additions & 10 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ Currently we just put RCF jar in lib as dependency. Plan to publish to Maven and

1. `./gradlew build` builds and tests
2. `./gradlew :run` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed
3. `./gradlew :integTest` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed and runs all integration tests except security
4. ` ./gradlew :integTest --tests="**.test execute foo"` runs a single integration test class or method
5. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=<admin-password>` launches integration tests against a local cluster and run tests with security
6. `./gradlew spotlessApply` formats code. And/or import formatting rules in `.eclipseformat.xml` with IDE.
7. `./gradlew adBwcCluster#mixedClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by upgrading one of the nodes with the current version of OpenSearch with anomaly-detection and job-scheduler creating a mixed cluster.
8. `./gradlew adBwcCluster#rollingUpgradeClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by performing rolling upgrade of each node with the current version of OpenSearch with anomaly-detection and job-scheduler.
9. `./gradlew adBwcCluster#fullRestartClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by performing a full restart on the cluster upgrading all the nodes with the current version of OpenSearch with anomaly-detection and job-scheduler.
10. `./gradlew bwcTestSuite -Dtests.security.manager=false` runs all the above bwc tests combined.
11. `./gradlew ':test' --tests "org.opensearch.ad.ml.HCADModelPerfTests" -Dtests.seed=2AEBDBBAE75AC5E0 -Dtests.security.manager=false -Dtests.locale=es-CU -Dtests.timezone=Chile/EasterIsland -Dtest.logs=true -Dmodel-benchmark=true` launches HCAD model performance tests and logs the result in the standard output
12. `./gradlew integTest --tests "org.opensearch.ad.e2e.SingleStreamModelPerfIT" -Dtests.seed=60CDDB34427ACD0C -Dtests.security.manager=false -Dtests.locale=kab-DZ -Dtests.timezone=Asia/Hebron -Dtest.logs=true -Dmodel-benchmark=true` launches single stream AD model performance tests and logs the result in the standard output
3. `./gradlew :run -PdualCluster=true` launches 2 single node clusters with anomaly-detection (and job-scheduler) plugin installed, one cluster is on localhost:9200 and the other on localhost:9200
4. `./gradlew :integTest` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed and runs all integration tests except security
5. ` ./gradlew :integTest --tests="**.test execute foo"` runs a single integration test class or method
6. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=<admin-password>` launches integration tests against a local cluster and run tests with security
7. `./gradlew spotlessApply` formats code. And/or import formatting rules in `.eclipseformat.xml` with IDE.
8. `./gradlew adBwcCluster#mixedClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by upgrading one of the nodes with the current version of OpenSearch with anomaly-detection and job-scheduler creating a mixed cluster.
9. `./gradlew adBwcCluster#rollingUpgradeClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by performing rolling upgrade of each node with the current version of OpenSearch with anomaly-detection and job-scheduler.
10. `./gradlew adBwcCluster#fullRestartClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by performing a full restart on the cluster upgrading all the nodes with the current version of OpenSearch with anomaly-detection and job-scheduler.
11. `./gradlew bwcTestSuite -Dtests.security.manager=false` runs all the above bwc tests combined.
12. `./gradlew ':test' --tests "org.opensearch.ad.ml.HCADModelPerfTests" -Dtests.seed=2AEBDBBAE75AC5E0 -Dtests.security.manager=false -Dtests.locale=es-CU -Dtests.timezone=Chile/EasterIsland -Dtest.logs=true -Dmodel-benchmark=true` launches HCAD model performance tests and logs the result in the standard output
13. `./gradlew integTest --tests "org.opensearch.ad.e2e.SingleStreamModelPerfIT" -Dtests.seed=60CDDB34427ACD0C -Dtests.security.manager=false -Dtests.locale=kab-DZ -Dtests.timezone=Asia/Hebron -Dtest.logs=true -Dmodel-benchmark=true` launches single stream AD model performance tests and logs the result in the standard output
14. `./gradlew integTest -Dsecurity=true -Dhttps=true --tests '*IT'` runs integration tests against a secure cluster


When launching a cluster using one of the above commands logs are placed in `/build/cluster/run node0/opensearch-<version>/logs`. Though the logs are teed to the console, in practices it's best to check the actual log file.

Expand Down
2 changes: 1 addition & 1 deletion build-tools/coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
apply plugin: 'jacoco'

jacoco {
toolVersion = "0.8.10"
toolVersion = "0.8.12"
}

/**
Expand Down
Loading
Loading