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

bug: concurrent running of ElasticSearch tests may produce interferences due to same ports in use #2217

Closed
ghost opened this issue Jan 10, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jan 10, 2020

This is a speculative resolution for a problem we have noticed only recently.

One (or more) of the integration tests for ElasticSearch was failing to reindex a model when during the build on the Jenkins side, showing a socket timeout exception.

Given how those tests work (an ES runtime is launched by Allegro on specific ports), I suspect that multiple concurrent builds testing the ES integration tests at the same time might actually be stepping on each others' feet, when the build processes are not isolated.

I will try and randomize the ports used to spin the service with the following rules:

  • must be 4 digit ports
  • must not be the production ES ports, or other obvious entries

Hopefully this will limit the collisions well enough for the use case.

ghost pushed a commit to bosch-io/vorto that referenced this issue Jan 10, 2020
* Added randomizer class for ES ports
* Used in SearchTestInfrastructure for both Allegro and REST client
* Added some basic logging of ports
* Cleaned up imports

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
@ghost
Copy link
Author

ghost commented Jan 10, 2020

PR here.
Local tests doing good - hopefully no surprise upstream.

@ghost
Copy link
Author

ghost commented Jan 13, 2020

Looks like this solved one problem, aka the socket timeouts, but still does not allow multiple non-isolated builds running the ElasticSearch tests concurrently - maybe it's just a limitation on Allegro's side...
Working with @t-gauss to see if we can't force throttling builds.

Not sure what could be an alternative solution should that fail, save for disabling those tests (which does not sound like a great idea).

@t-gauss
Copy link
Contributor

t-gauss commented Jan 14, 2020

Hi @mena-bosch ,
being still a newbie in this topic I guess adding disableConcurrentBuilds() in the options block of the jenkinsfile could help as a temporary workaround.

from the docs:
disableConcurrentBuilds
Disallow concurrent executions of the Pipeline. Can be useful for preventing simultaneous accesses to shared resources, etc. For example: options { disableConcurrentBuilds() }

@t-gauss
Copy link
Contributor

t-gauss commented Jan 14, 2020

PR here.

t-gauss pushed a commit to bosch-io/vorto that referenced this issue Jan 14, 2020
Signed-off-by: Tobias Gauss <tobias.gauss@bosch-si.com>
@kolotu kolotu assigned ghost and t-gauss Jan 14, 2020
@kolotu kolotu added this to In Progress in 0.13 (E01.19) Jan 14, 2020
@kolotu kolotu added this to the 0.13 milestone Jan 14, 2020
@kolotu kolotu added the bug label Jan 14, 2020
@ghost
Copy link
Author

ghost commented Jan 14, 2020

Thanks @t-gauss . This one was merged by @kolotu now so closing.

@ghost ghost closed this as completed Jan 14, 2020
kolotu added a commit that referenced this issue Jan 14, 2020
added config option to disable concurrent builds. Fixes #2217
@kolotu kolotu moved this from In Progress to Done in 0.13 (E01.19) Jan 14, 2020
JulianFeinauer pushed a commit to JulianFeinauer/vorto that referenced this issue Jun 27, 2020
* Added randomizer class for ES ports
* Used in SearchTestInfrastructure for both Allegro and REST client
* Added some basic logging of ports
* Cleaned up imports

Signed-off-by: Menahem Julien Raccah Lisei <menahemjulien.raccahlisei@bosch-si.com>
JulianFeinauer pushed a commit to JulianFeinauer/vorto that referenced this issue Jun 27, 2020
Signed-off-by: Tobias Gauss <tobias.gauss@bosch-si.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
0.13 (E01.19)
  
Done
Development

No branches or pull requests

2 participants