Closed Severon96 closed 1 year ago
Hi @Severon96,
I've never heard of such a problem. I guess it could be caused by a wrong configuration. So please check spring profiles and other similar things that can affect the configuration. For further investigation I need a reproducer. You can use and fork embedded-database-demo for that purpose.
Would be hard to reproduce this topic, since I can't create a completely new build pipeline in our backend just for testing purposes. Is there another way to debug this behavior?
Since the problem is most likely related to your specific configuration, it is very difficult to investigate it without a reproducer. However, you can try to add some additional logging to the failing tests to detect if the error is in the configuration or in the library. Check out the example below. If all logged messages contain only ECR image, then the bug is in the library, otherwise the error is in the configuration of your project. Then you can enable trace logging on the org.springframework.core.env.PropertySourcesPropertyResolver
class to trace the source of the wrong configuration.
@Autowired
private Environment environment;
@Before // or @BeforeEach
public void logDockerImageProperty() {
String dockerImage = environment.getProperty("zonky.test.database.postgres.docker.image", "postgres:11-alpine");
logger.info("Docker image: {}", dockerImage);
}
I'm closing the issue. Feel free to reopen it if the problem persists.
Hello together,
i'm currently facing an issue where zonky is pulling the postgres db image from the docker registry in my AWS CodePipeline. Because of this problem i've used the "zonky.test.database.postgres.docker.image"-property to set the url of the image that instead should be pulled from my own ecr. My pipeline always logs in successfully but only sometimes pulls from the Elastic Container Registry. Locally it works all the time.
In my pom, the only dependency is:
My project has 3 .properties-Files (application.properties, application-aws.properties, application-junit.properties). Each of them got the "zonky.test.database.postgres.docker.image"-property added into them. Just to be sure that it will be pulled. But nevertheless it only randomly pulls from the ECR.
Anyone here who knows what could cause the issue?
Thanks in advance.