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

chore(dependencies): Autobump korkVersion #4782

Merged
merged 2 commits into from
Sep 23, 2024
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fiatVersion=1.49.0
korkVersion=7.237.0
korkVersion=7.238.0
kotlinVersion=1.6.21
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4g
Expand Down
2 changes: 1 addition & 1 deletion gradle/groovy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
apply plugin: "groovy"

dependencies {
implementation("org.codehaus.groovy:groovy")
implementation("org.apache.groovy:groovy")
testImplementation("org.spockframework:spock-core")
testImplementation("cglib:cglib-nodep")
testImplementation("org.objenesis:objenesis")
Expand Down
2 changes: 1 addition & 1 deletion gradle/spock.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
testImplementation("org.spockframework:spock-core")
testImplementation("cglib:cglib-nodep")
testImplementation("org.objenesis:objenesis")
testImplementation("org.codehaus.groovy:groovy")
testImplementation("org.apache.groovy:groovy")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}

Expand Down
2 changes: 1 addition & 1 deletion orca-bakery/orca-bakery.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-guava")
implementation("io.spinnaker.fiat:fiat-core:$fiatVersion")
implementation("org.codehaus.groovy:groovy-datetime")
implementation("org.apache.groovy:groovy-datetime")
implementation("io.spinnaker.kork:kork-retrofit")

api("io.spinnaker.kork:kork-web")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ abstract class AbstractClusterWideClouddriverTask implements RetryableTask, Clou
}

static boolean isActive(TargetServerGroup serverGroup) {
return serverGroup.disabled == false || serverGroup.instances.any { it.healthState == HealthState.Up }
return serverGroup.isDisabled() == false || serverGroup.instances.any { it.healthState == HealthState.Up }
}

static class IsActive implements Comparator<TargetServerGroup> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class SourceResolver {
}

def instanceSize = { ServerGroup asg -> asg.instances?.size() ?: 0 }
def created = { ServerGroup asg -> asg.createdTime ?: 0 }
def created = { ServerGroup asg -> asg.createdTime ?: 0L }
if (stageData.useSourceCapacity) {
regionalAsgs = regionalAsgs.sort { a1, a2 -> instanceSize(a1) <=> instanceSize(a2) ?: created(a2) <=> created(a1) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.netflix.spinnaker.orca.kato.tasks
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler
import com.netflix.spinnaker.orca.api.pipeline.models.StageExecution
import com.netflix.spinnaker.orca.clouddriver.model.Instance.InstanceInfo
import org.slf4j.Logger
import retrofit.converter.JacksonConverter

import java.util.concurrent.TimeUnit
Expand Down Expand Up @@ -66,6 +67,10 @@ class JarDiffsTask implements DiffTask {

int platformPort = 8077

private Logger getLog() {
return log
}

@Override
public TaskResult execute(StageExecution stage) {
def retriesRemaining = stage.context.jarDiffsRetriesRemaining != null ? stage.context.jarDiffsRetriesRemaining : MAX_RETRIES
Expand Down Expand Up @@ -137,19 +142,19 @@ class JarDiffsTask implements DiffTask {
int numberOfInstancesChecked = 0;
instances.find { key, instanceInfo ->
if (numberOfInstancesChecked++ >= 5) {
log.info("Unable to check jar list after 5 attempts, giving up!")
getLog().info("Unable to check jar list after 5 attempts, giving up!")
return true
}

String hostName = instanceInfo.privateIpAddress ?: instanceInfo.hostName
log.debug("attempting to get a jar list from : ${key} (${hostName}:${platformPort})")
getLog().debug("attempting to get a jar list from : ${key} (${hostName}:${platformPort})")
def instanceService = createInstanceService("http://${hostName}:${platformPort}")
try {
def instanceResponse = instanceService.getJars()
jarMap = objectMapper.readValue(instanceResponse.body.in().text, Map)
return true
} catch(Exception e) {
log.debug("could not get a jar list from : ${key} (${hostName}:${platformPort}) - ${e.message}")
getLog().debug("could not get a jar list from : ${key} (${hostName}:${platformPort}) - ${e.message}")
// swallow it so we can try the next instance
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.netflix.spinnaker.orca.api.pipeline.models.StageExecution
import com.netflix.spinnaker.orca.api.pipeline.TaskResult
import com.netflix.spinnaker.orca.clouddriver.InstanceService
import groovy.util.logging.Slf4j
import org.slf4j.Logger
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import retrofit.client.Client
Expand All @@ -45,6 +46,10 @@ class TriggerQuipTask extends AbstractQuipTask implements RetryableTask {
long backoffPeriod = 10000
long timeout = 600000 // 10min

private Logger getLog() {
return log
}

@Override
TaskResult execute(StageExecution stage) {
Map taskIdMap = [:]
Expand Down Expand Up @@ -76,7 +81,7 @@ class TriggerQuipTask extends AbstractQuipTask implements RetryableTask {
taskIdMap.put(instanceHostName, ref.substring(1 + ref.lastIndexOf('/')))
patchedInstanceIds << instanceId
} catch (SpinnakerServerException e) {
log.warn("Error in Quip request: {}", e.message)
getLog().warn("Error in Quip request: {}", e.message)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DetermineTerminationCandidatesTask implements Task {
.orElseGet { serverGroupInstances*.instanceId }
def terminationInstancePool = knownInstanceIds
if (stage.context.termination?.instances) {
terminationInstancePool = knownInstanceIds.intersect(stage.context.termination?.instances)
terminationInstancePool = stage.context.termination?.instances.intersect(knownInstanceIds)
if (stage.context.termination.order == 'given') {
terminationInstancePool = terminationInstancePool.sort { stage.context.termination.instances.indexOf(it) }
}
Expand Down
2 changes: 1 addition & 1 deletion orca-core/orca-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
implementation("javax.validation:validation-api")
implementation("com.jayway.jsonpath:json-path")
implementation("org.yaml:snakeyaml")
implementation("org.codehaus.groovy:groovy")
implementation("org.apache.groovy:groovy")
implementation("net.javacrumbs.shedlock:shedlock-spring:4.44.0")
implementation("net.javacrumbs.shedlock:shedlock-provider-jdbc-template:4.44.0")

Expand Down
4 changes: 2 additions & 2 deletions orca-front50/orca-front50.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation(project(":orca-core"))
implementation(project(":orca-retrofit"))

api("org.codehaus.groovy:groovy")
api("org.apache.groovy:groovy")

implementation("io.spinnaker.fiat:fiat-api:$fiatVersion")
implementation("io.spinnaker.fiat:fiat-core:$fiatVersion")
Expand All @@ -38,7 +38,7 @@ dependencies {
testImplementation(project(":orca-test-groovy"))
testImplementation(project(":orca-pipelinetemplate"))
testImplementation("com.github.ben-manes.caffeine:guava")
testImplementation("org.codehaus.groovy:groovy-json")
testImplementation("org.apache.groovy:groovy-json")
testRuntimeOnly("net.bytebuddy:byte-buddy")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
implementation(project(":orca-core"))

implementation("org.jetbrains:annotations")
testImplementation("org.codehaus.groovy:groovy")
testImplementation("org.apache.groovy:groovy")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.assertj:assertj-core")
testImplementation("org.mockito:mockito-core:2.25.0")
Expand Down
2 changes: 1 addition & 1 deletion orca-keel/orca-keel.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
testImplementation("io.mockk:mockk")
testImplementation("io.strikt:strikt-jackson")
testImplementation("org.assertj:assertj-core")
testImplementation("org.codehaus.groovy:groovy")
testImplementation("org.apache.groovy:groovy")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("com.github.tomakehurst:wiremock-jre8-standalone")
Expand Down
2 changes: 1 addition & 1 deletion orca-pipelinetemplate/orca-pipelinetemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {

testImplementation("org.slf4j:slf4j-simple")
testImplementation("org.assertj:assertj-core")
testImplementation("org.codehaus.groovy:groovy-json")
testImplementation("org.apache.groovy:groovy-json")
testImplementation("io.spinnaker.fiat:fiat-core:$fiatVersion")
testImplementation("io.spinnaker.kork:kork-retrofit")
testRuntimeOnly("net.bytebuddy:byte-buddy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ class V1SchemaIntegrationSpec extends Specification {
}

if (it.filename.endsWith('-config.yml')) {
test.configuration = objectMapper.convertValue(yaml.load(it.file.text), TemplateConfiguration)
test.configuration = objectMapper.convertValue(yaml.load(it.getFile().text), TemplateConfiguration)
} else if (it.filename.endsWith('-expected.json')) {
test.expected = objectMapper.readValue(it.file, Map)
test.expected = objectMapper.readValue(it.getFile(), Map)
} else if (it.filename.endsWith('-request.json')) {
test.request = objectMapper.readValue(it.file, Map)
test.request = objectMapper.readValue(it.getFile(), Map)
} else {
test.template.add(objectMapper.convertValue(yaml.load(it.file.text), PipelineTemplate))
test.template.add(objectMapper.convertValue(yaml.load(it.getFile().text), PipelineTemplate))
}
}

Expand Down
2 changes: 1 addition & 1 deletion orca-queue/orca-queue.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ dependencies {
testImplementation(project(":orca-queue-tck"))
testImplementation(project(":orca-queue-redis"))
testImplementation(project(":orca-echo"))
testImplementation("org.codehaus.groovy:groovy")
testImplementation("org.apache.groovy:groovy")
testImplementation("org.assertj:assertj-core")
}
2 changes: 1 addition & 1 deletion orca-retrofit/orca-retrofit.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply from: "$rootDir/gradle/groovy.gradle"
dependencies {
api("com.squareup.retrofit:retrofit")
api("com.squareup.retrofit:converter-jackson")
api("org.codehaus.groovy:groovy")
api("org.apache.groovy:groovy")
api("io.spinnaker.kork:kork-web")
api("com.jakewharton.retrofit:retrofit1-okhttp3-client")

Expand Down
2 changes: 1 addition & 1 deletion orca-web/orca-web.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dependencies {
testImplementation("dev.minutest:minutest")
testImplementation("io.strikt:strikt-core")
testImplementation("io.mockk:mockk")
testImplementation("org.codehaus.groovy:groovy-json")
testImplementation("org.apache.groovy:groovy-json")
}

test {
Expand Down
2 changes: 1 addition & 1 deletion orca-webhook/orca-webhook.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
implementation("com.squareup.okhttp3:okhttp")
implementation("com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0")
testImplementation("org.springframework:spring-test")
testImplementation("org.codehaus.groovy:groovy-json")
testImplementation("org.apache.groovy:groovy-json")
testRuntimeOnly("net.bytebuddy:byte-buddy")

implementation("io.spinnaker.fiat:fiat-api:$fiatVersion")
Expand Down