Skip to content

Commit

Permalink
Remove JDK 14 and Add JDK 17 (opensearch-project#383)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Angie Zhang <[email protected]>
  • Loading branch information
lezzago authored and Angie Zhang committed Jun 29, 2022
1 parent bc4e307 commit 64f086f
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bwc-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [ 14 ]
java: [ 11 ]
# Job name
name: Build and test Alerting
# This job runs on Linux
Expand All @@ -27,10 +27,10 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v2
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 14
- name: Set Up JDK 11
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 11
- name: Run Alerting Backwards Compatibility Tests
run: |
echo "Running backwards compatibility tests..."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [ 11 ]
java: [ 11, 17 ]
# Job name
name: Build and test Alerting
# This job runs on Linux
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/security-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [ 11 ]
java: [ 11, 17 ]
# Job name
name: Build and test Alerting
# This job runs on Linux
Expand All @@ -27,10 +27,10 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v2
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: 11
java-version: ${{ matrix.java }}
- name: Build Alerting
# Only assembling since the full build is governed by other workflows
run: ./gradlew assemble
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [11, 14]
java: [11, 17]
# Job name
name: Build Alerting with JDK ${{ matrix.java }}
# This job runs on Linux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data class BucketLevelTriggerRunResult(
override fun writeTo(out: StreamOutput) {
super.writeTo(out)
out.writeMap(aggregationResultBuckets, StreamOutput::writeString) {
valueOut: StreamOutput, aggResultBucket: AggregationResultBucket ->
valueOut: StreamOutput, aggResultBucket: AggregationResultBucket ->
aggResultBucket.writeTo(valueOut)
}
out.writeMap(actionResultsMap as Map<String, Any>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RestGetAlertsAction : BaseRestHandler() {

val getAlertsRequest = GetAlertsRequest(table, severityLevel, alertState, monitorId)
return RestChannelConsumer {
channel ->
channel ->
client.execute(GetAlertsAction.INSTANCE, getAlertsRequest, RestToXContentListener(channel))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class RestGetDestinationsAction : BaseRestHandler() {
destinationType
)
return RestChannelConsumer {
channel ->
channel ->
client.execute(GetDestinationsAction.INSTANCE, getDestinationsRequest, RestToXContentListener(channel))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RestGetMonitorAction : BaseRestHandler() {
}
val getMonitorRequest = GetMonitorRequest(monitorId, RestActions.parseVersion(request), request.method(), srcContext)
return RestChannelConsumer {
channel ->
channel ->
client.execute(GetMonitorAction.INSTANCE, getMonitorRequest, RestToXContentListener(channel))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class RestIndexDestinationAction : BaseRestHandler() {
}
val indexDestinationRequest = IndexDestinationRequest(id, seqNo, primaryTerm, refreshPolicy, request.method(), destination)
return RestChannelConsumer {
channel ->
channel ->
client.execute(
IndexDestinationAction.INSTANCE, indexDestinationRequest,
indexDestinationResponse(channel, request.method())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class TransportIndexDestinationAction @Inject constructor(
var failureReasons = StringBuilder()
if (response.shardInfo.failed > 0) {
response.shardInfo.failures.forEach {
entry ->
entry ->
failureReasons.append(entry.reason())
}
return failureReasons.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class TransportIndexEmailAccountAction @Inject constructor(
val failureReasons = StringBuilder()
if (response.shardInfo.failed > 0) {
response.shardInfo.failures.forEach {
entry ->
entry ->
failureReasons.append(entry.reason())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class TransportIndexEmailGroupAction @Inject constructor(
val failureReasons = StringBuilder()
if (response.shardInfo.failed > 0) {
response.shardInfo.failures.forEach {
entry ->
entry ->
failureReasons.append(entry.reason())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class TransportIndexMonitorAction @Inject constructor(
val failureReasons = StringBuilder()
if (response.shardInfo.failed > 0) {
response.shardInfo.failures.forEach {
entry ->
entry ->
failureReasons.append(entry.reason())
}
return failureReasons.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ class MonitorRunnerIT : AlertingRestTestCase() {
val output = entityAsMap(response)
@Suppress("UNCHECKED_CAST")
(output["trigger_results"] as HashMap<String, Any>).forEach {
_, v ->
_, v ->
assertTrue((v as HashMap<String, Boolean>)["triggered"] as Boolean)
}
assertEquals(monitor.name, output["monitor_name"])
Expand Down Expand Up @@ -1037,7 +1037,7 @@ class MonitorRunnerIT : AlertingRestTestCase() {
val output = entityAsMap(response)
@Suppress("UNCHECKED_CAST")
(output["trigger_results"] as HashMap<String, Any>).forEach {
_, v ->
_, v ->
assertTrue((v as HashMap<String, Boolean>)["triggered"] as Boolean)
}
assertEquals(monitor.name, output["monitor_name"])
Expand All @@ -1064,7 +1064,7 @@ class MonitorRunnerIT : AlertingRestTestCase() {
val output = entityAsMap(response)
@Suppress("UNCHECKED_CAST")
(output["trigger_results"] as HashMap<String, Any>).forEach {
_, v ->
_, v ->
assertTrue((v as HashMap<String, Boolean>)["triggered"] as Boolean)
}
@Suppress("UNCHECKED_CAST")
Expand Down Expand Up @@ -1093,7 +1093,7 @@ class MonitorRunnerIT : AlertingRestTestCase() {
val output = entityAsMap(response)
@Suppress("UNCHECKED_CAST")
(output["trigger_results"] as HashMap<String, Any>).forEach {
_, v ->
_, v ->
assertFalse((v as HashMap<String, Boolean>)["triggered"] as Boolean)
}
@Suppress("UNCHECKED_CAST")
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ configurations {
}

dependencies {
add("ktlint", "com.pinterest:ktlint:0.41.0") {
add("ktlint", "com.pinterest:ktlint:0.45.1") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.EXTERNAL))
}
Expand Down

0 comments on commit 64f086f

Please sign in to comment.