diff --git a/.github/workflows/draft-release-notes-workflow.yml b/.github/workflows/draft-release-notes-workflow.yml index 03e22f02..e321a271 100644 --- a/.github/workflows/draft-release-notes-workflow.yml +++ b/.github/workflows/draft-release-notes-workflow.yml @@ -16,6 +16,6 @@ jobs: with: config-name: draft-release-notes-config.yml tag: (None) - version: 2.6.0.0 + version: 2.10.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 73458975..2d59162c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -3,11 +3,10 @@ name: Publish snapshots to maven on: workflow_dispatch: push: - branches: [ - main - 1.* - 2.* - ] + branches: + - main + - '1.3' + - 2.x jobs: build-and-publish-snapshots: diff --git a/build.gradle b/build.gradle index e9c4585e..954e0d0c 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { opensearch_group = "org.opensearch" isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.6.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.10.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -26,7 +26,7 @@ buildscript { common_utils_version = System.getProperty("common_utils.version", opensearch_build) job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.6.0") + kotlin_version = System.getProperty("kotlin.version", "1.8.21") jackson_version = "2.14.1" } @@ -41,8 +41,8 @@ buildscript { 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.21.0" - classpath "org.jacoco:org.jacoco.agent:0.8.5" + classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0" + classpath "org.jacoco:org.jacoco.agent:0.8.8" } } @@ -116,6 +116,7 @@ configurations { ktlint testCompile testRuntime + zipArchive } detekt { @@ -133,7 +134,7 @@ configurations.all { force "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" force "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.11.4" - force "org.yaml:snakeyaml:1.32" + force "org.yaml:snakeyaml:2.0" } } @@ -167,14 +168,14 @@ repositories { } dependencies { + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" implementation "org.opensearch:opensearch:${opensearch_version}" implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9" implementation "${group}:common-utils:${common_utils_version}" compileOnly "${group}:opensearch-job-scheduler-spi:${job_scheduler_version}" - implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation "org.json:json:20180813" + implementation "org.json:json:20230227" implementation group: 'com.github.wnameless.json', name: 'json-flattener', version: '0.15.1' // json-base, jackson-databind, jackson-annotations are transitive dependencies by json-flattener implementation group: 'com.github.wnameless.json', name: 'json-base', version: '2.2.1' @@ -192,7 +193,7 @@ dependencies { testImplementation "org.opensearch.test:framework:${opensearch_version}" testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}" testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" - testImplementation "org.mockito:mockito-core:5.1.0" + testImplementation "org.mockito:mockito-core:${versions.mockito}" testImplementation "org.mockito:mockito-junit-jupiter:4.7.0" testImplementation 'com.google.code.gson:gson:2.8.9' @@ -293,8 +294,6 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); integTest.dependsOn(bundle) integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))} -String jobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version.replace("-SNAPSHOT", "") + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build.replace("-SNAPSHOT", "") + ".zip" - testClusters.integTest { testDistribution = "INTEG_TEST" // need to install job-scheduler first, need to assemble job-scheduler first @@ -304,15 +303,7 @@ testClusters.integTest { return new RegularFile() { @Override File getAsFile() { - File dir = new File("src/test/resources/job-scheduler") - if (!dir.exists()) { - dir.mkdirs() - } - File file = new File(dir, "opensearch-job-scheduler-" + opensearch_build + ".zip") - if (!file.exists()) { - new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} - } - return fileTree("src/test/resources/job-scheduler").getSingleFile() + return configurations.zipArchive.asFileTree.getSingleFile() } } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 62d4c053..943f0cbf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8a7d0b63..50832291 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,11 +1,6 @@ -## - # Copyright OpenSearch Contributors - # SPDX-License-Identifier: Apache-2.0 -## - -#Wed Jul 29 13:30:55 PDT 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7d..65dcd68d 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,78 +17,113 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -105,79 +140,105 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 24467a14..6689b85b 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,10 +25,14 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -37,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -51,7 +55,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -61,38 +65,26 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/release-notes/opensearch-reporting.release-notes-2.6.0.0.md b/release-notes/opensearch-reporting.release-notes-2.6.0.0.md new file mode 100644 index 00000000..0572aa7f --- /dev/null +++ b/release-notes/opensearch-reporting.release-notes-2.6.0.0.md @@ -0,0 +1,5 @@ +## Version 2.6.0.0 Release Notes +Compatible with OpenSearch and OpenSearch Dashboards Version 2.6.0 + +### Infrastructure +* Remove unnecessary scripts after repo split [#622](https://github.com/opensearch-project/reporting/pull/622)) \ No newline at end of file diff --git a/release-notes/opensearch-reporting.release-notes-2.7.0.0.md b/release-notes/opensearch-reporting.release-notes-2.7.0.0.md new file mode 100644 index 00000000..798ba3f9 --- /dev/null +++ b/release-notes/opensearch-reporting.release-notes-2.7.0.0.md @@ -0,0 +1,13 @@ +## Version 2.7.0.0 Release Notes +Compatible with OpenSearch and OpenSearch Dashboards Version 2.7.0 + +### Infrastructure +* Add publish snapshots to maven via GHA ([#651](https://github.com/opensearch-project/reporting/pull/651)) + +### Bug Fixes +* Bump mockito-core version ([#678](https://github.com/opensearch-project/reporting/pull/678)) +* Fix ci failures ([#681](https://github.com/opensearch-project/reporting/pull/681)) + +### Maintenance +* Increment version to 2.7.0-SNAPSHOT ([#657](https://github.com/opensearch-project/reporting/pull/657)) +* Bump snakeyaml to 2.0 ([#674](https://github.com/opensearch-project/reporting/pull/674)) \ No newline at end of file diff --git a/release-notes/opensearch-reporting.release-notes-2.8.0.0.md b/release-notes/opensearch-reporting.release-notes-2.8.0.0.md new file mode 100644 index 00000000..f7eb3d23 --- /dev/null +++ b/release-notes/opensearch-reporting.release-notes-2.8.0.0.md @@ -0,0 +1,11 @@ +## Version 2.8.0.0 Release Notes + +Compatible with OpenSearch 2.8.0 + +### Bug Fixes +* Update json version to 20230227 ([#692](https://github.com/opensearch-project/reporting/pull/692)) +* Update Gradle Wrapper to 7.6.1 ([#695](https://github.com/opensearch-project/reporting/pull/695)) +* Removing guava dependency to fix jarhell ([#709](https://github.com/opensearch-project/reporting/pull/709)) + +### Maintenance +* Increment version to 2.8.0-SNAPSHOT ([#688](https://github.com/opensearch-project/reporting/pull/688)) diff --git a/release-notes/opensearch-reporting.release-notes-2.9.0.0.md b/release-notes/opensearch-reporting.release-notes-2.9.0.0.md new file mode 100644 index 00000000..cbb57bb3 --- /dev/null +++ b/release-notes/opensearch-reporting.release-notes-2.9.0.0.md @@ -0,0 +1,9 @@ +## Version 2.9.0.0 Release Notes + +Compatible with OpenSearch 2.9.0 + +### Bug Fixes +* Removing guava dependency to fix jarhell ([#709](https://github.com/opensearch-project/reporting/pull/709)) + +### Maintenance +* Increment version to 2.9.0-SNAPSHOT ([#712](https://github.com/opensearch-project/reporting/pull/712)) diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt index e6ce40d7..9fb995fc 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt @@ -10,19 +10,14 @@ import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.node.DiscoveryNodes import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.NamedWriteableRegistry import org.opensearch.common.settings.ClusterSettings import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.common.settings.Setting import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsFilter -<<<<<<< HEAD -import org.opensearch.common.xcontent.NamedXContentRegistry -======= import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.xcontent.NamedXContentRegistry ->>>>>>> c254aad (Merge pull request #748 from derek-ho/insights) import org.opensearch.env.Environment import org.opensearch.env.NodeEnvironment import org.opensearch.jobscheduler.spi.JobSchedulerExtension diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/CreateReportDefinitionAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/CreateReportDefinitionAction.kt index 3c953c16..f003d9bb 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/CreateReportDefinitionAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/CreateReportDefinitionAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.CreateReportDefinitionRequest import org.opensearch.reportsscheduler.model.CreateReportDefinitionResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/DeleteReportDefinitionAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/DeleteReportDefinitionAction.kt index d80ab47c..453f9a0a 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/DeleteReportDefinitionAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/DeleteReportDefinitionAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.DeleteReportDefinitionRequest import org.opensearch.reportsscheduler.model.DeleteReportDefinitionResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportDefinitionsAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportDefinitionsAction.kt index 40bd71f5..6c469c97 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportDefinitionsAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportDefinitionsAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.GetAllReportDefinitionsRequest import org.opensearch.reportsscheduler.model.GetAllReportDefinitionsResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportInstancesAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportInstancesAction.kt index 5234d920..e9f31dec 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportInstancesAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetAllReportInstancesAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.GetAllReportInstancesRequest import org.opensearch.reportsscheduler.model.GetAllReportInstancesResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportDefinitionAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportDefinitionAction.kt index f52c6b18..00c80ce0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportDefinitionAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportDefinitionAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.GetReportDefinitionRequest import org.opensearch.reportsscheduler.model.GetReportDefinitionResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportInstanceAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportInstanceAction.kt index 49782f5a..c51039a0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportInstanceAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/GetReportInstanceAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.GetReportInstanceRequest import org.opensearch.reportsscheduler.model.GetReportInstanceResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/InContextReportCreateAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/InContextReportCreateAction.kt index 69f06ad0..f8b0865d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/InContextReportCreateAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/InContextReportCreateAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.InContextReportCreateRequest import org.opensearch.reportsscheduler.model.InContextReportCreateResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/OnDemandReportCreateAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/OnDemandReportCreateAction.kt index a6d75f68..59276232 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/OnDemandReportCreateAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/OnDemandReportCreateAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.OnDemandReportCreateRequest import org.opensearch.reportsscheduler.model.OnDemandReportCreateResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt index 0e423b81..080fc4fe 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt @@ -14,24 +14,20 @@ import org.opensearch.action.ActionRequest import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.client.Client -import org.opensearch.common.io.stream.Writeable import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.authuser.User -<<<<<<< HEAD -======= import org.opensearch.core.action.ActionListener import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.rest.RestStatus ->>>>>>> c254aad (Merge pull request #748 from derek-ho/insights) import org.opensearch.index.IndexNotFoundException import org.opensearch.index.engine.VersionConflictEngineException import org.opensearch.indices.InvalidIndexNameException import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt index a3c30a1d..c3812fe6 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.metrics.Metrics @@ -23,7 +24,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportDefinitionRequest import org.opensearch.reportsscheduler.model.UpdateReportDefinitionResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt index 37f32280..c2751ab0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.index.ReportInstancesIndex @@ -25,7 +26,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusRequest import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportDefinitionAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportDefinitionAction.kt index 43d77d0b..e3585917 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportDefinitionAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportDefinitionAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.UpdateReportDefinitionRequest import org.opensearch.reportsscheduler.model.UpdateReportDefinitionResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportInstanceStatusAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportInstanceStatusAction.kt index 8ef85700..4da0d7e3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportInstanceStatusAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/UpdateReportInstanceStatusAction.kt @@ -9,8 +9,8 @@ import org.opensearch.action.ActionType import org.opensearch.action.support.ActionFilters import org.opensearch.client.Client import org.opensearch.common.inject.Inject -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.commons.authuser.User +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusRequest import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusResponse import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportDefinitionsIndex.kt b/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportDefinitionsIndex.kt index 35d76481..9650bef8 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportDefinitionsIndex.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportDefinitionsIndex.kt @@ -17,8 +17,8 @@ import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.unit.TimeValue import org.opensearch.common.xcontent.LoggingDeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.index.query.QueryBuilders import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportInstancesIndex.kt b/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportInstancesIndex.kt index 42e98935..a7e5303b 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportInstancesIndex.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/index/ReportInstancesIndex.kt @@ -17,8 +17,8 @@ import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.unit.TimeValue import org.opensearch.common.xcontent.LoggingDeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.index.query.QueryBuilders import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.ReportInstance diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt index 3fbf2f53..4236d1c6 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt @@ -5,21 +5,12 @@ package org.opensearch.reportsscheduler.model -<<<<<<< HEAD -import org.opensearch.action.ActionResponse -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.rest.RestStatus -======= import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.action.ActionResponse import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder ->>>>>>> c254aad (Merge pull request #748 from derek-ho/insights) /** * Base response which give REST status. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt index ad7c0f1b..c3000dd0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt index 03e483cb..2d0342aa 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt index 13578a79..6c50e501 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt index 898759c3..144fb1ca 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt index 7cef7c35..258b15ac 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt index b8b3cd46..1002022e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser import org.opensearch.reportsscheduler.util.createJsonParser import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt index 6a3f1dce..5863e368 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt index de7c5266..c76ff856 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser import org.opensearch.reportsscheduler.util.createJsonParser import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt index 725029a3..07271272 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt index 63ad0baa..6e361e66 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt index edbd2c46..cc2282be 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt index 03931aa9..293c022c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt index 76684362..24031014 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt index 73780e7e..4aa9be58 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt index 02d8e9f9..b1402222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt index 4d1331b8..d4cd36f4 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt index dfa1b5a7..5aed866c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.jobscheduler.spi.schedule.ScheduleParser import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt index 82bd1ae3..352427d9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.ScheduledJobParameter import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetailsSearchResults.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetailsSearchResults.kt index 86e51116..1bbef9c5 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetailsSearchResults.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetailsSearchResults.kt @@ -7,7 +7,7 @@ package org.opensearch.reportsscheduler.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_LIST_FIELD /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt index c08bd78d..1a9ef222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.ACCESS_LIST_FIELD import org.opensearch.reportsscheduler.model.RestTag.BEGIN_TIME_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstanceSearchResults.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstanceSearchResults.kt index 84274652..aa67225f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstanceSearchResults.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstanceSearchResults.kt @@ -7,7 +7,7 @@ package org.opensearch.reportsscheduler.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_LIST_FIELD /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/RestTag.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/RestTag.kt index cf76d9f6..3a9fa7ce 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/RestTag.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/RestTag.kt @@ -5,8 +5,8 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContent.Params +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContent.Params /** * Plugin Rest common Tags. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt index 6e68a398..ecf74062 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt @@ -11,13 +11,13 @@ import org.apache.lucene.search.TotalHits.Relation.EQUAL_TO import org.apache.lucene.search.TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO import org.opensearch.action.search.SearchResponse import org.opensearch.common.xcontent.LoggingDeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.ToXContent.Params -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.ToXContent.Params +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REST_OUTPUT_PARAMS import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt index 221f710f..fc6df23c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt index 529beeb4..75d63203 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt index 83053ff7..47da69c3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt index 229bad2c..a19d51bf 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt index 492aa346..483ff762 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.InContextReportCreateAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for creating on-demand report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt index 3ea8fcd4..6a813ddc 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportDefinitionsAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report definitions. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt index 0a8c9221..6a3abf4d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.CreateReportDefinitionAction @@ -28,7 +29,6 @@ import org.opensearch.rest.RestRequest.Method.DELETE import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for report definitions lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt index a3eaef1a..a5094bbe 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportInstancesAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt index 5f3a6d99..1400d7a3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetReportInstanceAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST -import org.opensearch.rest.RestStatus /** * Rest handler for report instances lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt index 1900c7b6..0a19975e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.metrics.Metrics @@ -15,7 +16,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting reporting backend stats diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt index cb770da3..a0cf270d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.resthandler -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.rest.RestStatus +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.BaseResponse import org.opensearch.rest.BytesRestResponse import org.opensearch.rest.RestChannel import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus import org.opensearch.rest.action.RestToXContentListener /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/scheduler/ReportDefinitionJobParser.kt b/src/main/kotlin/org/opensearch/reportsscheduler/scheduler/ReportDefinitionJobParser.kt index cb4b57db..3aba45cd 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/scheduler/ReportDefinitionJobParser.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/scheduler/ReportDefinitionJobParser.kt @@ -5,7 +5,7 @@ package org.opensearch.reportsscheduler.scheduler -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser import org.opensearch.jobscheduler.spi.JobDocVersion import org.opensearch.jobscheduler.spi.ScheduledJobParameter import org.opensearch.jobscheduler.spi.ScheduledJobParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt index a7ee17c9..9f25831f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt @@ -7,9 +7,9 @@ package org.opensearch.reportsscheduler.security import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.settings.PluginSettings -import org.opensearch.rest.RestStatus /** * Class for checking/filtering user access. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt index 0836065b..08e35a89 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt @@ -7,16 +7,16 @@ package org.opensearch.reportsscheduler.util import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser -import org.opensearch.common.xcontent.XContentParser.Token -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.model.ReportInstance import org.opensearch.rest.RestRequest import java.net.URI diff --git a/src/test/kotlin/org/opensearch/integTest/PluginRestTestCase.kt b/src/test/kotlin/org/opensearch/integTest/PluginRestTestCase.kt index 7e5bc6ae..c48612c8 100644 --- a/src/test/kotlin/org/opensearch/integTest/PluginRestTestCase.kt +++ b/src/test/kotlin/org/opensearch/integTest/PluginRestTestCase.kt @@ -19,11 +19,11 @@ import org.opensearch.client.WarningFailureException import org.opensearch.client.WarningsHandler import org.opensearch.common.io.PathUtils import org.opensearch.common.settings.Settings -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.ConfigConstants import org.opensearch.commons.rest.SecureRestClientBuilder +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.MediaType +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.test.rest.OpenSearchRestTestCase import java.io.BufferedReader import java.io.IOException @@ -61,7 +61,7 @@ abstract class PluginRestTestCase : OpenSearchRestTestCase() { open fun wipeAllODFEIndices() { if (preserveODFEIndicesAfterTest()) return val response = client().performRequest(Request("GET", "/_cat/indices?format=json&expand_wildcards=all")) - val xContentType = XContentType.fromMediaType(response.entity.contentType.value) + val xContentType = MediaType.fromMediaType(response.entity.contentType.value) xContentType.xContent().createParser( NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, response.entity.content diff --git a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt index e1eb7550..875ab509 100644 --- a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt @@ -7,12 +7,12 @@ package org.opensearch.integTest.bwc import org.junit.Assert import org.opensearch.common.settings.Settings +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class ReportsSchedulerBackwardsCompatibilityIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt index 07e8c243..f3956d41 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -13,7 +14,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class InContextMenuReportGenerationIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt index 399d144e..7decd12a 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -14,7 +15,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Duration import java.time.Instant diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt index 15385396..434580c7 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportDefinitionIT : PluginRestTestCase() { fun `test create, get, update, delete report definition`() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt index 926cd8ff..8ec9bfa0 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportInstanceIT : PluginRestTestCase() { fun `test update on-demand report definition status to success after creation`() { diff --git a/src/test/kotlin/org/opensearch/reportsscheduler/TestHelpers.kt b/src/test/kotlin/org/opensearch/reportsscheduler/TestHelpers.kt index e2a8fd20..1d52e223 100644 --- a/src/test/kotlin/org/opensearch/reportsscheduler/TestHelpers.kt +++ b/src/test/kotlin/org/opensearch/reportsscheduler/TestHelpers.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.ToXContent import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParser import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentParser import org.opensearch.reportsscheduler.model.ReportDefinition import org.opensearch.reportsscheduler.model.ReportDefinitionDetails import org.opensearch.reportsscheduler.model.ReportInstance