Skip to content

Commit

Permalink
Merge branch 'master' into upgradeTomcat
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmcintosh authored Feb 20, 2024
2 parents 32a6fa5 + 42d2de6 commit 646d293
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ class TestPluginGeneratorTest : JUnit5Minutests {
expectThat(resolve("classes")).describedAs("classes directory").isDirectory()
}

test("extensions index is written to META-INF") {
expectThat(resolve("classes/META-INF")).and {
isDirectory()
get { resolve("extensions.idx") }.and {
isRegularFile()
get { toFile().readText() }.isEqualTo("# Generated by PF4J\n")
}
}
}

test("generated class is written to subdirectories matching package") {
expectThat(resolve("classes/com/netflix/spinnaker/kork/plugins/testplugin/generated")).and {
isDirectory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ import org.pf4j.util.ExtensionFileFilter
/**
* A [PluginRepository] supporting [PluginRef] type [Plugin]s by matching files with the extension [PluginRef.EXTENSION].
*/
class PluginRefPluginRepository(pluginPath: Path) : BasePluginRepository(pluginPath, ExtensionFileFilter(PluginRef.EXTENSION)) {
class PluginRefPluginRepository(pluginPath: Path) : BasePluginRepository(listOf(pluginPath), ExtensionFileFilter(PluginRef.EXTENSION)) {
override fun deletePluginPath(pluginPath: Path?): Boolean = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,14 @@ public String getMessage() {
return super.getMessage();
}

if (getHttpMethod() == null) {
return String.format(
"Status: %s, URL: %s, Message: %s", responseCode, this.getUrl(), getRawMessage());
}

return String.format(
"Status: %s, URL: %s, Message: %s", responseCode, this.getUrl(), getRawMessage());
"Status: %s, Method: %s, URL: %s, Message: %s",
responseCode, getHttpMethod(), this.getUrl(), getRawMessage());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ void testNonJsonHttpErrorResponse() {
assertThat(spinnakerHttpException.getResponseBody()).isNull();
assertThat(spinnakerHttpException.getResponseCode()).isEqualTo(responseCode);
assertThat(spinnakerHttpException)
.hasMessage("Status: " + responseCode + ", URL: " + url + ", Message: " + reason);
.hasMessage(
"Status: " + responseCode + ", Method: GET, URL: " + url + ", Message: " + reason);
assertThat(spinnakerHttpException.getUrl()).isEqualTo(url);
assertThat(spinnakerHttpException.getReason()).isEqualTo(reason);
}
Expand Down
14 changes: 11 additions & 3 deletions spinnaker-dependencies/spinnaker-dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ dependencies {
api("com.google.cloud:google-cloud-secretmanager:2.3.10")
api("com.google.code.findbugs:jsr305:3.0.2")
api("com.google.guava:guava:30.0-jre")
// JinJava 2.5.3 has a bad bug: https://github.com/HubSpot/jinjava/issues/429
api("com.hubspot.jinjava:jinjava:2.5.2")
api("com.hubspot.jinjava:jinjava:2.7.1")
api("com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0")
api("com.jcraft:jsch:${versions.jsch}")
api("com.jcraft:jsch.agentproxy.connector-factory:${versions.jschAgentProxy}")
Expand Down Expand Up @@ -161,7 +160,16 @@ dependencies {
}
}
api("org.objenesis:objenesis:2.5.1")
api("org.pf4j:pf4j:3.2.0")
api("org.pf4j:pf4j:3.10.0")
// pf4j:3.10.0 brings in slf4j-api:2.0.6 which is not compatible with logback 1.2.x.
// And the upgraded logback version(1.3.8) is becoming incompatible with SpringBoot's LogbackLoggingSystem:
// java.lang.NoClassDefFoundError at LogbackLoggingSystem.java:293
// Hence pinning slf4j-api at 1.7.36 which spring boot 2.5.15 brings in.
api("org.slf4j:slf4j-api"){
version {
strictly("1.7.36")
}
}
api("org.pf4j:pf4j-update:2.3.0")

// snakeyaml 1.29 fails to parse yaml (including some k8s manifests), so
Expand Down

0 comments on commit 646d293

Please sign in to comment.