linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

[BUILD] weave/rest-smtp-sink issue with deprecated Docker schema #5138

Closed quantranhong1999 closed 4 months ago

quantranhong1999 commented 4 months ago

This is causing some tests to fail cf: https://ci-builds.apache.org/blue/organizations/jenkins/james%2FApacheJames/detail/PR-2149/7/tests/

Can reproduce locally after upgrading Docker to version 26. https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1

DoD: fix the issue (may need to refactor to another image...)

Arsnael commented 4 months ago

So if I understand we need to be able to maybe investigate if other images are concerned by this or not and move all of them to a more recent one using the new docker manifest version correct?

quantranhong1999 commented 4 months ago

So if I understand we need to be able to maybe investigate if other images are concerned by this or not and move all of them to a more recent one using the new docker manifest version correct?

Yes, so far we have only encountered the issue with the weave/rest-smtp-sink image (9 years old).

I am trying to find a way to avoid refactoring to another image (that may need to change our test code with the new REST API...)

Arsnael commented 4 months ago

A quick way to unlock the build for now would be to add that environment variable DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE when pulling that image.

Of course we should still fix this problem asap as this env variable will be removed next docker version, which means getting this issue back soon enough

quantranhong1999 commented 4 months ago

A quick way to unlock the build for now would be to add that environment variable DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE when pulling that image.

I tried but it does not work (via normal terminal session env set), likely it needs to be configured within the docker config file.

Arsnael commented 4 months ago

What about adding it as an environment var in the testcontainer docker builder of the fake smtp container?

quantranhong1999 commented 4 months ago

What about adding it as an environment var in the testcontainer docker builder of the fake smtp container?

Do you mean smth like this? image

Then it does not work.

But good news: likely I found a way.

quantranhong1999 commented 4 months ago

https://github.com/apache/james-project/pull/2152

chibenwa commented 4 months ago

Cool, thanks a lot!