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(dependency): upgrade kotlin to 1.5.32 #1119

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Nov 15, 2023

Upgrade kotlin from 1.4.0 to 1.5.32, in order to sync with spring boot 2.5.15.
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.5.15/spring-boot-dependencies-2.5.15.pom

Upgrade kotlinx-coroutines-bom to 1.5.2, in order to sync with kotlin 1.5.x.
https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.pom

While upgrading kotlin 1.5.32, encounter below errors in kork-plugins module:

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBeansOfType(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.PluginSecretTest$tests$1$2.invoke$lambda-0(PluginSecretTest.kt:46)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'PluginSecretTest.TestSecretEngineConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.PluginSecretTest$TestSecretEngineConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ComplexInjectionScenarioTest$tests$1$2.invoke$lambda-0(ComplexInjectionScenarioTest.kt:55)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'ComplexInjectionScenarioTest.ComplexInjectionTestConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ComplexInjectionScenarioTest$ComplexInjectionTestConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceDependenciesScenarioTest$tests$1$2.invoke$lambda-0(ServiceDependenciesScenarioTest.kt:49)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'ServiceDependenciesScenarioTest.TestApplicationConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceDependenciesScenarioTest$TestApplicationConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceInjectionScenarioTest$tests$1$2.invoke$lambda-0(ServiceInjectionScenarioTest.kt:48)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'ServiceInjectionScenarioTest.ServiceInjectionTestConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceInjectionScenarioTest$ServiceInjectionTestConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

To fix these errors make Configuration classes as generic scope by removing private.

Upgrade kotlin from 1.4.0 to 1.5.32, in order to sync with spring boot 2.5.15.
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.5.15/spring-boot-dependencies-2.5.15.pom

Upgrade kotlinx-coroutines-bom to 1.5.2, in order to sync with kotlin 1.5.x.
https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.pom

While upgrading kotlin 1.5.32, encounter below errors in kork-plugins module:

```
Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBeansOfType(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.PluginSecretTest$tests$1$2.invoke$lambda-0(PluginSecretTest.kt:46)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @configuration class 'PluginSecretTest.TestSecretEngineConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.PluginSecretTest$TestSecretEngineConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ComplexInjectionScenarioTest$tests$1$2.invoke$lambda-0(ComplexInjectionScenarioTest.kt:55)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @configuration class 'ComplexInjectionScenarioTest.ComplexInjectionTestConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ComplexInjectionScenarioTest$ComplexInjectionTestConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceDependenciesScenarioTest$tests$1$2.invoke$lambda-0(ServiceDependenciesScenarioTest.kt:49)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @configuration class 'ServiceDependenciesScenarioTest.TestApplicationConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceDependenciesScenarioTest$TestApplicationConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)

Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
java.lang.IllegalStateException: Unstarted application context org.springframework.boot.test.context.assertj.AssertableApplicationContext[startupFailure=org.springframework.beans.factory.parsing.BeanDefinitionParsingException] failed to start
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getStartedApplicationContext(AssertProviderApplicationContextInvocationHandler.java:156)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invokeApplicationContextMethod(AssertProviderApplicationContextInvocationHandler.java:147)
	at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.invoke(AssertProviderApplicationContextInvocationHandler.java:85)
	at com.sun.proxy.$Proxy68.getBean(Unknown Source)
	at com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceInjectionScenarioTest$tests$1$2.invoke$lambda-0(ServiceInjectionScenarioTest.kt:48)
	...
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @configuration class 'ServiceInjectionScenarioTest.ServiceInjectionTestConfiguration' may not be final. Remove the final modifier to continue.
Offending resource: com.netflix.spinnaker.kork.plugins.v2.scenarios.ServiceInjectionScenarioTest$ServiceInjectionTestConfiguration
	at app//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
	at app//org.springframework.context.annotation.ConfigurationClass.validate(ConfigurationClass.java:217)
	at app//org.springframework.context.annotation.ConfigurationClassParser.validate(ConfigurationClassParser.java:215)
```
To fix these errors make `Configuration` classes as generic scope by removing `private`.
@j-sandy j-sandy marked this pull request as ready for review November 21, 2023 15:17
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Nov 21, 2023
@mergify mergify bot added the auto merged label Nov 21, 2023
@mergify mergify bot merged commit 9de47ff into spinnaker:master Nov 21, 2023
6 checks passed
@j-sandy j-sandy deleted the kotlin-1-5 branch November 24, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants