You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the header configuration log is displayed more than once (one by step in fact):
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
[13:01:16] SonarQube plugin detects pull-request, 'env.SONARQUBE_SCANNER_PARAMS' set with '{"sonar.pullrequest.key":"42","sonar.pullrequest.branch":"Foo bar","sonar.pullrequest.base":"master","sonar.pullrequest.provider":"github","sonar.pullrequest.github.repository":"foo/bar"}'
But log "SonarQube plugin detects [pull-request|branch], 'env.SONARQUBE_SCANNER_PARAMS' set with ..." is displayed 3 times ... I should understand why 😒
Fixed by Execute process once (and not 4 each steps). It was because ParametersPreprocessor is executed for each steps of build.
Initial implementation (#77) has not fixed the problem.
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?
Currently, the header configuration log is displayed more than once (one by step in fact):
Initial implementation (#77) has not fixed the problem.
TeamCity.SonarQubePlugin/sonar-plugin-server/src/main/java/jetbrains/buildserver/sonarplugin/buildfeatures/BranchesAndPullRequestsParametersPreprocessor.java
Lines 42 to 45 in eb0d53d
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
?The text was updated successfully, but these errors were encountered: