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

Lazy initialization of recommendation providers is not thread-safe for multiproject builds with --parallel #78

Open
cbue opened this issue Dec 19, 2017 · 0 comments

Comments

@cbue
Copy link

cbue commented Dec 19, 2017

Hi!

The recommendation plugin traverses up the project hierarchy to find a suitable recommendation in one of the parent projects, which is a good feature.

But as soon as the "--parallel" switch comes into play, a common parant project recommendation container gets requested by multiple threads in parallel.

My builds fail because a not completely preinitialized recommendation-HashMap is returned by the MavenBomRecommendationProvider in those situations.

Currenly we only use the MavenBomRecommendationProvider but by reviewing the code I found the same issue in:

  • MavenBomRecommendationProvider
  • DependencyLockProvider.groovy
  • IvyRecommendationProvider.groovy
  • PropertyFileRecommendationProvider.java

I will prepare two pull requests with fixes. One for the MavenBomRecommendationProvider which I tested successfully in my project and another one for the other three fixes.

Could you please review my code changes and merge the changes if suitable?

Thanks!

Regards
Christian

cbue pushed a commit to cbue/nebula-dependency-recommender-plugin that referenced this issue Dec 19, 2017
cbue pushed a commit to cbue/nebula-dependency-recommender-plugin that referenced this issue Dec 19, 2017
…r, IvyRecommendationProvider, PropertyFileRecommendationProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant