Repository navigation
MODWRKFLOW-87: Add Liquibase bean that then disables Liquibase. - #179
Merged
Merged
Conversation
Previously Liquibase had been disabled due to `folio-spring-support` enabling it and mod-workflow doesn’t do anything with it. This caused lots of problems. The `folio-spring-support` at some point in time following and update started getting NPEs. This was addressed in https://folio-org.atlassian.net/browse/MODWRKFLOW-65 by removing things. Thanks to the update in `folio-spring-support`, the unused Liquibase wasn’t causing problems. A significant amount of time later, under Eureka, Liquibase suddenly started acting up again. With problems like the following: ```json errors: [ { message: 'JDBC exception executing SQL [ERROR: relation "dev1_mod_workflow.trigger" does not exist\n' + ' Position: 77] [select t1_0.id,t1_0.description,t1_0.method,t1_0.name,t1_0.pathPattern from dev1_mod_workflow.Trigger t1_0 where t1_0.id=?]', type: 'SQLGrammarException', code: '500 INTERNAL_SERVER_ERROR', parameters: [] } ] ``` The problem is not relating to the Liquibase table but somehow Liquibase caused it to not exist. Setting `SPRING_LIQUIBASE_ENABLED="false"` results in further problems because `folio-spring-support` forces the requirement, even if it should be disabled: Parameter 2 of constructor in org.folio.spring.service.TenantService required a bean of type 'org.folio.spring.liquibase.FolioSpringLiquibase' that could not be found. Action: Consider defining a bean of type 'org.folio.spring.liquibase.FolioSpringLiquibase' in your configuration. The solution appears to be to bring back the previously remove FolioSpringLiquibaseConfig class but this time call this on bean creation: ```java folioSpringLiquibase.setShouldRun(false); ``` Note that the following was attempted but did not work: ```java @SpringBootApplication( scanBasePackages = { "org.folio.rest", "org.folio.spring" }, exclude = { LiquibaseAutoConfiguration.class } ) ``` ## References - https://folio-org.atlassian.net/browse/MODWRKFLOW-65
|
lacarbo05
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
Resolves MODWRKFLOW-87.
Details
Previously Liquibase had been disabled due to
folio-spring-supportenabling it and mod-workflow doesn’t do anything with it. This caused lots of problems.The
folio-spring-supportat some point in time following and update started getting NPEs. This was addressed in https://folio-org.atlassian.net/browse/MODWRKFLOW-65 by removing things. Thanks to the update infolio-spring-support, the unused Liquibase wasn’t causing problems.A significant amount of time later, under Eureka, Liquibase suddenly started acting up again. With problems like the following:
The problem is not relating to the Liquibase table but somehow Liquibase caused it to not exist.
Setting
SPRING_LIQUIBASE_ENABLED="false"results in further problems becausefolio-spring-supportforces the requirement, even if it should be disabled:Parameter 2 of constructor in org.folio.spring.service.TenantService required a bean of type 'org.folio.spring.liquibase.FolioSpringLiquibase' that could not be found. Action:
Consider defining a bean of type 'org.folio.spring.liquibase.FolioSpringLiquibase' in your configuration.
The solution appears to be to bring back the previously remove FolioSpringLiquibaseConfig class but this time call this on bean creation:
Note that the following was attempted but did not work:
References