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

build: Allow enforcement to reuse a container. #2837

Closed
wants to merge 1 commit into from

Conversation

michael-simons
Copy link
Collaborator

This orders reusable containers on wish and is meant for scenarios in which a CI does not allow "native" use of reusable test containers but will make sure to clean them up after CI ran. Export a variable SDN_FORCE_REUSE_OF_CONTAINERS as true and SDN tests won't close the container, regardless whether the underlying Testcontainers supports reuse or not.

This orders reusable containers on wish and is meant for scenarios in which a CI does not allow "native" use of reusable test containers but will make sure to clean them up after CI ran. Export a variable `SDN_FORCE_REUSE_OF_CONTAINERS` as `true` and SDN tests won't close the container, regardless whether the underlying Testcontainers supports reuse or not.
@michael-simons
Copy link
Collaborator Author

michael-simons commented Nov 28, 2023

@mp911de I am not to keen on touching the Jenkinsfile, but if you would please add an environment variable named SDN_FORCE_REUSE_OF_CONTAINERS with the value of true, things should improve.

@mp911de mp911de closed this in 16bbaf0 Nov 28, 2023
@mp911de mp911de deleted the feat/force-reuse branch November 28, 2023 13:02
@mp911de mp911de added the type: task A general task label Nov 28, 2023
@mp911de
Copy link
Member

mp911de commented Nov 28, 2023

From (average):

Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 32.447

To (average):

Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.601 s

That is a massive improvement to run the build in 1/5th of the original time. In the unlikely event of nerd sniping, as the driver is netty-base, the driver startup could be optimized by creating an EventLoopGroup instance with daemon threads, holding on to it throughout the tests and using DriverFactory directly. Just a random thought.

In any case, thanks a lot for the change, that's merged now and brings us down from roughly an hour to 20 minutes.

mp911de pushed a commit that referenced this pull request Nov 28, 2023
This orders reusable containers on wish and is meant for scenarios in which a CI does not allow "native" use of reusable test containers but will make sure to clean them up after CI ran. Export a variable `SDN_FORCE_REUSE_OF_CONTAINERS` as `true` and SDN tests won't close the container, regardless whether the underlying Testcontainers supports reuse or not.

Closes #2837
mp911de pushed a commit that referenced this pull request Nov 28, 2023
This orders reusable containers on wish and is meant for scenarios in which a CI does not allow "native" use of reusable test containers but will make sure to clean them up after CI ran. Export a variable `SDN_FORCE_REUSE_OF_CONTAINERS` as `true` and SDN tests won't close the container, regardless whether the underlying Testcontainers supports reuse or not.

Closes #2837
mp911de pushed a commit that referenced this pull request Nov 28, 2023
This orders reusable containers on wish and is meant for scenarios in which a CI does not allow "native" use of reusable test containers but will make sure to clean them up after CI ran. Export a variable `SDN_FORCE_REUSE_OF_CONTAINERS` as `true` and SDN tests won't close the container, regardless whether the underlying Testcontainers supports reuse or not.

Closes #2837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants