Closed axel3rd closed 3 years ago
Synchronization can only solve problems caused by several threads concurrently modifying a shared state. Here there is only one thread initializing AgentBuild so synchronization won't help. Since runParameters isn't used anyway then probably BranchesAndPullRequestsParametersPreprocessor could be rewritten to BuildStartContextProcessor?
I'm currently /OOO, but I will try to achieve that this month.
Fixed by #84 (merged)
Currently, the header configuration log is displayed more than once (one by step in fact):
Initial implementation (#77) has not fixed the problem.
https://github.com/JetBrains/TeamCity.SonarQubePlugin/blob/eb0d53dad41183f7be56637a4a8f4863d2fdf3e7/sonar-plugin-server/src/main/java/jetbrains/buildserver/sonarplugin/buildfeatures/BranchesAndPullRequestsParametersPreprocessor.java#L42-L45
The code seems executed at same time => sysenv flag is not suffisant.
Adding a block synchronize is perhaps the solution. @Linfar : Is it tolerable in a
ParametersPreprocessor
?