Skip to content

Commit

Permalink
chore(dependency): pin org.liquibase to 3.10.3
Browse files Browse the repository at this point in the history
 While upgrading spring boot 2.5.x, liquibase version transitively upgrades to 4.3.5. The liquibase version starting from 4.0.0 till 4.12.0 has an [issue](liquibase/liquibase#2818) w.r.t parsing the changelog file, if found at multiple places within the classpath and encounter the below error:
 ```
 Caused by: liquibase.exception.ChangeLogParseException: Error parsing classpath:db/healthcheck.yml
	at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:89)
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:369)
	at liquibase.Liquibase.lambda$update$1(Liquibase.java:224)
	at liquibase.Scope.lambda$child$0(Scope.java:180)
	at liquibase.Scope.child(Scope.java:189)
	at liquibase.Scope.child(Scope.java:179)
	at liquibase.Scope.child(Scope.java:158)
	at liquibase.Liquibase.runInScope(Liquibase.java:2405)
	at liquibase.Liquibase.update(Liquibase.java:211)
	at liquibase.Liquibase.update(Liquibase.java:197)
	at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314)
	at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269)
	at com.netflix.spinnaker.kork.sql.migration.SpringLiquibaseProxy.afterPropertiesSet(SpringLiquibaseProxy.kt:65)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1858)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795)
	... 87 more
Caused by: java.io.IOException: Found 2 files that match classpath:db/healthcheck.yml: file:/spinnaker/kork/kork-sql/build/resources/main/db/healthcheck.yml, jar:file:/spinnaker/kork/kork-sql/build/libs/kork-sql.jar!/db/healthcheck.yml
	at liquibase.resource.AbstractResourceAccessor.openStream(AbstractResourceAccessor.java:25)
	at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:25)
	... 101 more
 ```
 This duplicate changelog issue is fixed in 4.13.0, but identified another issue that gets introduced in 4.13.0. This [issue](liquibase/liquibase#3091) hinders the migration of sql scripts available in [orca](https://github.com/spinnaker/orca/tree/master/orca-sql/src/main/resources/db/changelog), containing `afterColumn`, with a validation error for postgresql.
 The efforts to resolve the issue are in progress, so pinning the version of org.liquibase:liquibase-core to 3.10.3 (latest of 3.x series).
  • Loading branch information
j-sandy committed Mar 30, 2023
1 parent 3881934 commit 9520b03
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spinnaker-dependencies/spinnaker-dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,20 @@ dependencies {
api("org.jetbrains.spek:spek-subject-extension:${versions.spek}")
api("org.jooq:jooq:${versions.jooq}")
api("org.jooq:jooq-kotlin:${versions.jooq}")

// The liquibase version starting from 4.0.0 till 4.12.0
// has an issue w.r.t parsing the changelog file,
// if found at multiple places within the classpath
// https://github.com/liquibase/liquibase/issues/2818
// This duplicate changelog issue is fixed in 4.13.0,
// but identified another issue that gets introduced in 4.13.0.
// This issue(https://github.com/liquibase/liquibase/issues/3091)
// hinders the migration of sql scripts available in orca
// (https://github.com/spinnaker/orca/tree/master/orca-sql/src/main/resources/db/changelog),
// containing `afterColumn` construct, with a validation error for postgresql. So pin with 3.10.3
api("org.liquibase:liquibase-core:3.10.3"){
force = true
}
api("org.objenesis:objenesis:2.5.1")
api("org.pf4j:pf4j:3.2.0")
api("org.pf4j:pf4j-update:2.3.0")
Expand Down

0 comments on commit 9520b03

Please sign in to comment.