Skip to content

Commit

Permalink
Add JDK-21 to Github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Feb 6, 2024
1 parent 344cae1 commit 2ca1f59
Show file tree
Hide file tree
Showing 522 changed files with 157 additions and 566 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gauntlet-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
java:
- 17
- 21
steps:
- name: Set up JDK
uses: actions/setup-java@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
java:
- 17
- 21
fail-fast: false
runs-on: [ubuntu-latest]
name: Building RCA package
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ plugins {
id "de.undercouch.download" version "5.5.0"
id 'com.adarshr.test-logger' version '4.0.0'
id 'org.gradle.test-retry' version '1.5.8'
id 'com.diffplug.spotless' version '5.11.0'
id 'com.diffplug.spotless' version '6.25.0'
}

application {
Expand Down Expand Up @@ -87,7 +87,7 @@ distributions {
spotless {
java {
licenseHeaderFile(file('license-header'))
googleJavaFormat('1.12.0').aosp()
googleJavaFormat('1.17.0').aosp()
importOrder()
removeUnusedImports()
trimTrailingWhitespace()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import java.io.File;
import java.io.FileReader;
import java.security.KeyStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import com.sun.net.httpserver.HttpServer;
import org.opensearch.performanceanalyzer.net.NetClient;
import org.opensearch.performanceanalyzer.net.NetServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import java.util.Collection;
import java.util.HashSet;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import io.netty.handler.codec.http.HttpMethod;
import java.io.BufferedReader;
import java.io.DataOutputStream;
Expand Down Expand Up @@ -65,7 +64,7 @@ public static void disablePA() throws InterruptedException {
public static class ClusterSettings {
static List<String> clusterSettings = new ArrayList<>();

public final static String SETTING_NOT_FOUND = "NULL";
public static final String SETTING_NOT_FOUND = "NULL";

static final String CLUSTER_SETTINGS_URL =
"/_cluster/settings?flat_settings=true&include_defaults=true&pretty";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import com.google.common.annotations.VisibleForTesting;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.sun.net.httpserver.HttpServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import org.opensearch.performanceanalyzer.commons.stats.metrics.StatExceptionCode;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer;


import com.google.common.annotations.VisibleForTesting;
import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator;
Expand All @@ -32,6 +31,7 @@ public class PerformanceAnalyzerWebServer {

@VisibleForTesting
public static final String WEBSERVICE_BIND_HOST_NAME = "webservice-bind-host";

// Use system default for max backlog.
private static final int INCOMING_QUEUE_LENGTH = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.collections;


import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.config.overrides;


import com.google.common.annotations.VisibleForTesting;
import java.io.IOException;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.core;


import java.io.File;
import java.security.AccessController;
import java.security.PrivilegedAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import java.util.List;
import java.util.Map;
import org.opensearch.performanceanalyzer.rca.store.rca.cluster.NodeKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public static class Summary {

@SerializedName(value = CURRENT_MAX_SIZE)
private long currentCacheMaxSizeInBytes;

// TODO: remove coolOffPeriodInMillis and canUpdate from summary
// as those already exist in baseline action object
@SerializedName(value = COOL_OFF_PERIOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import com.google.common.annotations.VisibleForTesting;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down Expand Up @@ -274,6 +273,7 @@ public static class Summary {

@SerializedName(value = CURRENT_CAPACITY)
private int currentCapacity;

// TODO: remove coolOffPeriodInMillis and canUpdate from summary
// as those already exist in baseline action object
@SerializedName(value = COOL_OFF_PERIOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import org.opensearch.performanceanalyzer.AppContext;

/** Actions that can be suppressed through a config. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions;


import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions.configs;


import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.actions.configs;


import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.performanceanalyzer.commons.stats.ServiceMetrics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import java.util.ArrayList;
import java.util.List;
import org.opensearch.performanceanalyzer.decisionmaker.actions.Action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import java.util.List;
import org.opensearch.performanceanalyzer.decisionmaker.actions.Action;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import org.opensearch.performanceanalyzer.grpc.FlowUnitMessage;
import org.opensearch.performanceanalyzer.rca.framework.core.GenericFlowUnit;
import org.opensearch.performanceanalyzer.rca.framework.util.InstanceDetails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import com.google.common.collect.ImmutableMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import com.google.common.annotations.VisibleForTesting;
import java.time.Instant;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders;


import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.collator;


import com.google.common.annotations.VisibleForTesting;
import java.io.Serializable;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.collator;


import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.collator;


import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs;


import java.util.Arrays;
import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs;


import org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm.OldGenDecisionPolicyConfig;
import org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm.young_gen.JvmGenTuningPolicyConfig;
import org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.searchbackpressure.SearchBackPressurePolicyConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs;


import org.opensearch.performanceanalyzer.rca.framework.core.Config;
import org.opensearch.performanceanalyzer.rca.framework.core.NestedConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm;


import org.opensearch.performanceanalyzer.rca.framework.core.Config;
import org.opensearch.performanceanalyzer.rca.framework.core.NestedConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm;


import org.opensearch.performanceanalyzer.rca.framework.core.Config;
import org.opensearch.performanceanalyzer.rca.framework.core.NestedConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm;


import org.opensearch.performanceanalyzer.rca.framework.core.Config;
import org.opensearch.performanceanalyzer.rca.framework.core.NestedConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm;


import org.opensearch.performanceanalyzer.rca.framework.core.Config;
import org.opensearch.performanceanalyzer.rca.framework.core.NestedConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.jvm.young_gen;


import java.util.concurrent.TimeUnit;
import org.opensearch.performanceanalyzer.decisionmaker.deciders.jvm.JvmGenTuningPolicy;
import org.opensearch.performanceanalyzer.rca.framework.core.Config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.opensearch.performanceanalyzer.decisionmaker.deciders.configs.searchbackpressure;


import java.util.concurrent.TimeUnit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Loading

0 comments on commit 2ca1f59

Please sign in to comment.