Skip to content

MODWRKFLOW-87: Add Liquibase bean that then disables Liquibase. - #179

Merged
kaladay merged 2 commits into
masterfrom
MODWRKFLOW-87
Nov 12, 2026
Merged

kaladay merged 2 commits into
masterfrom
MODWRKFLOW-87

Conversation

@kaladay

@kaladay kaladay commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Resolves MODWRKFLOW-87.

Details

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:

"errors:" [
  {
    "message": "JDBC exception executing SQL [ERROR: relation \"dev1_mod_workflow.trigger\" does not exist 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:

folioSpringLiquibase.setShouldRun(false);

Note that the following was attempted but did not work:

@SpringBootApplication(
  scanBasePackages = { "org.folio.rest", "org.folio.spring" },
  exclude = {
    LiquibaseAutoConfiguration.class
  }
)

References

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
@kaladay
kaladay requested a review from a team November 12, 2026 19:35
@sonarqubecloud

Copy link
Copy Markdown

@kaladay
kaladay merged commit 85025fb into master Nov 12, 2026
16 checks passed
@kaladay kaladay changed the title MODWRKFLOW-87: Add Liquibase bean that then disabled Liquibase. MODWRKFLOW-87: Add Liquibase bean that then disables Liquibase. Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants