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

[Bug]: updating to slf4j 2.0.x is a breaking change #5950

Closed
marcindabrowski opened this issue Oct 4, 2022 · 8 comments
Closed

[Bug]: updating to slf4j 2.0.x is a breaking change #5950

marcindabrowski opened this issue Oct 4, 2022 · 8 comments
Labels

Comments

@marcindabrowski
Copy link

marcindabrowski commented Oct 4, 2022

Module

Core

Testcontainers version

1.17.4

Using the latest Testcontainers version?

Yes

Host OS

macOS

Host Arch

x86

Docker version

Client:
 Cloud integration: v1.0.22
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.16.10
 Git commit:        dea9396
 Built:             Thu Nov 18 00:36:09 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.11
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       847da18
  Built:            Thu Nov 18 00:35:39 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

What happened?

Slf4j 2.0 is not compatible with spring boot.
It was upgraded in #​5848
Upgrading any dependency to the next major version in the next minor release of Testcontainers is not a good idea.

Please revert it to the 1.7.36

Relevant log output

No response

Additional Information

No response

@kiview
Copy link
Member

kiview commented Oct 4, 2022

Thank you for raising this issue, We look into reverting and publishing a hotfix release for it. What has it to do with WireMock though?

@marcindabrowski
Copy link
Author

marcindabrowski commented Oct 4, 2022

@kiview Maybe it has nothing to do with WireMock, but as I wrote upgrading to the major version of the dependent library when you are releasing only the patch version is not a good practice.
For now, I could downgrade your dependency, but when you start to use the new API it will not be possible.
And, as I wrote slf4j itself it is not compatible with the previous version when you are using logback as the underlying log library. Probably the same is with log4j v2.
So slf4j itself is backward compatible, but to use it you need some logging engine which is not :(.
So probably almost everyone who is using it for testing REST API will have the same conflict as me using Spring Boot.

@kiview
Copy link
Member

kiview commented Oct 4, 2022

Thanks, I understand it. I was specifically wondering about this message from you:

Upgrading any dependency to the next major version in the next minor release of WireMock is not a good idea.

@marcindabrowski
Copy link
Author

I'm confused, do you want more info about it?
The WireMock released the next patch version of 1.17.x family, and this release included an upgrade of slf4j from 1.x.x to 2.x.x without checking the impact. Even if there is no impact on this, you should have a policy that prohibits such upgrades.
It should be possible only when you are moving from 1.17.x to 1.18.x or any other higher version.
Patch releases are not intended for improvements but for fixes.
You can find more here: https://semver.org/

@marcindabrowski
Copy link
Author

So if dependabot is creating PR for you, you should look into it and check what has changed, and decide if is it acceptable in the scope of the next release, and maybe reschedule it to the next one.

@marcindabrowski
Copy link
Author

Sorry for misleading you, WireMock has nothing to do with this.
I don't know why I mentioned it here.
Everywhere I wrote WireMock I meant testcontainers.
Probably I'm too tired.

@kiview
Copy link
Member

kiview commented Oct 4, 2022

Closed by #5951.

@marcindabrowski No problem, thanks for creating the issue.

@kiview kiview closed this as completed Oct 4, 2022
@sergey-morenets
Copy link

Hi @kiview

Any plans to use Slf4j 2.x in TestContainers? Spring Boot has already supported Slf4j 2.x in 3.x but TestContainers still uses 1.7.36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants