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

Unable to run ElasticSearch integration tests in parallel #2229

Closed
ghost opened this issue Jan 15, 2020 · 2 comments
Closed

Unable to run ElasticSearch integration tests in parallel #2229

ghost opened this issue Jan 15, 2020 · 2 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jan 15, 2020

This issue relates to a few issues already created, namely #2217 and #2224 - none of which solved the original problem so far.

#2217 was about randomizing ports to avoid collisions between parallel builds when running Allegro+ES but it was not sufficient to prevent issues that ultimately failed the tests (e.g. later issues were about Allegro "unable" to access the /tmp folders it requires for temp data, broadly speaking).

#2224 tackled the problem at Jenkins level, by attempting to throttle concurrent builds. Aside from the fact that it doesn't seem to work at least when builds are (re-)started manually, it seems a bit overkill to limit our build concurrency just for some integration tests to work.

The current situation leaves 3 options open (in order of priority to investigate):

  1. Investigate the Allegro framework to see if we didn't miss out an existing option to allow running it concurrently
  2. If not, either consider getting rid of Allegro altogether and spinning a Docker container with ES directly (port randomization would then be very relevant)
  3. Or, investigate the Allegro source itself and find a way to allow concurrent runs - then propose it in the project and use a fork in the meantime

Will start with n. 1 shortly.

@kolotu kolotu added the bug label Jan 15, 2020
@kolotu kolotu assigned ghost Jan 15, 2020
@ghost
Copy link
Author

ghost commented Jan 15, 2020

Regarding point 1 - research what Allegro offers in terms of build/test parallelism.

There is a section of their documentation that specifically addresses this...
... but fails to provide clarity on our specific use case.

We already have PopularProperties.TRANSPORT_TCP_PORT and PopularProperties.HTTP_PORT randomized per implementation of #2217 , which did solve one of the issues but not the overall problem.

We do not use withInstallationDirectory, so that section of the docs is either inaccurate (cannot reuse same installation dir when using concurrently) or irrelevant to our case.

Per @t-gauss ' changes, we are using withInResourceLocation pointing to a zip with ES.

Things to try

  • Specify a randomized withInstallationDirectory for each running test, or
  • Not clean the installation directory (withCleanInstallationDirectoryOnStop(false) - defaults to true when not specified).

These experiments will require:

  1. Having two fake pull requests to run concurrent builds
  2. Unblocking our pipeline (currently stuck at yet another compliance issue only @t-gauss can waive)

Will wait until tomorrow and get cracking again if all goes well.

ghost pushed a commit to bosch-io/vorto that referenced this issue Jan 16, 2020
* tried randomizing ES installation directory too, as a string composed of random ports and relative to running target

Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
kolotu added a commit that referenced this issue Jan 16, 2020
@ghost
Copy link
Author

ghost commented Jan 20, 2020

This seems to have partially worked, but the tests then complained about timeouts to start ES emanating from Allegro itself.
Looks like the default value was 15".
I changed it to a more generous 1' in #2242.

After merging the latest into those PRs and running them concurrently, I can see everything green again, which I find encouraging.

There is no 100% certainty these cumulated tweaks will hold indefinitely, but it's encouraging enough.

Will have to monitor a while longer but I think I can close this and #2242.

@ghost ghost closed this as completed Jan 20, 2020
@kolotu kolotu added this to the 0.13 milestone Jan 20, 2020
JulianFeinauer pushed a commit to JulianFeinauer/vorto that referenced this issue Jun 27, 2020
* tried randomizing ES installation directory too, as a string composed of random ports and relative to running target

Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
This issue was closed.
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

1 participant