Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ktlint and force common-codec version #575

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -301,7 +301,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 @@ -233,7 +233,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 @@ -478,7 +478,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 @@ -40,7 +40,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
7 changes: 7 additions & 0 deletions notification/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'signing'

configurations.all {
if (it.state != Configuration.State.UNRESOLVED) return
resolutionStrategy {
force "commons-codec:commons-codec:1.13"
}
}

dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
compile "org.apache.httpcomponents:httpcore:4.4.5"
Expand Down