snowplow-incubator / common-streams

Other
1 stars 0 forks source link

Manually fetch container image before running StatsD spec #69

Closed peel closed 6 months ago

peel commented 6 months ago

Previously, we relied on org.testcontainers' method of fetching container image for StatsD. This was counted towards test timeout and rarely actually triggered the tests. Now, the image is fetched as part of beforeAll step and handled as part of setup time that's not counted towards the timeout. If the image is already available the cost of blocking is nearly zero.

testcontainers/ryuk is a resource reaper used for cleaning things up after tests complete. In CI we only run tests once after which the VM is shut down. Ryuk fetching happens while creating a CatsResource that is counted towards timeout. This can take a long time in CI and rarely happens at dev time. Therefore, for CI ryuk is now disabled.

peel commented 6 months ago

@istreeter sure, I can absolutely add them. One thing to consider is that whereas both statsd and localstack versions are explicitly managed by us, ryuk is directly fetched by testcontainers. There are two options: this is mostly a problem in CI w/ slow network, we can just disable ryuk there - we don't need to clean up running containers. Otherwise, set ryuk to explicit version and prevent the workaround from breaking the next time ryuk gets updated.