Skip to content

Add check for missing Liquibase's class CustomResolverServiceLocator #11625

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

Closed
wants to merge 1 commit into from

Conversation

eddumelendez
Copy link
Contributor

CustomResolverServiceLocator was introduced in Liquibase 2.0.4, this
check prevents failures during initialization when previous versions are
used.

See gh-11608

`CustomResolverServiceLocator` was introduced in Liquibase 2.0.4, this
check prevents failures during initialization when previous versions are
used.

See spring-projectsgh-11608
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 13, 2018
Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @eddumelendez - Can you please add a test for the scenario?

CommonsLoggingLiquibaseLogger.class.getPackage().getName());
ServiceLocator.setInstance(customResolverServiceLocator);
liquibase.logging.LogFactory.reset();
if (ClassUtils.isPresent("liquibase.servicelocator.CustomResolverServiceLocator", null)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please have a test that exercises this behaviour. You can use the FilteredClassLoader for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new check is in the wrong place. I’d expect it to replace the existing check above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, given that we use Liquibase 3.5.x in 1.5, it would be worth looking to see if there’s a class that’s new in 3.5 that we can check for. We should review the auto-configuration conditions too.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Jan 14, 2018
@snicoll
Copy link
Member

snicoll commented Jan 16, 2018

@eddumelendez I've applied those suggestions to 08ec3d2. Thanks for the PR

@snicoll snicoll closed this Jan 16, 2018
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Jan 16, 2018
@eddumelendez
Copy link
Contributor Author

eddumelendez commented Jan 16, 2018

sorry, I couldn't apply changes on time :( Thanks @snicoll for the hint to test this scenario

@eddumelendez eddumelendez deleted the gh-11608 branch January 17, 2018 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants