perforce / sonar-scm-perforce

SonarQube Perforce plugin
6 stars 23 forks source link

Disable writing to .p4ticket during authentication. #14

Open earthling opened 8 years ago

earthling commented 8 years ago

P4Java and the p4 command line tool both lock this file during updates. This can cause the scm plugin analysis to fail when analyses are conducted concurrently on the same machine (i.e., one or more may fail with permission denied errors). This pull request adds an option to disable writing to the tickets file.

henryju commented 8 years ago

We usually don't like adding configuration flags, so what about always skipping writing of ticket? Is there any reason to let the plugin write ticket?

earthling commented 8 years ago

I can't see a reason for the sonar-scm-perforce plugin to write this file. It's really just a side effect of authenticating with p4java. I think in most scenarios, the .p4tickets file will have been created ahead of time when the source code is checked out for analysis (by p4 or p4v). I'll remove the option.

earthling commented 8 years ago

For what it's worth, I've also been running this pull request in our environment. Haven't seen any issues.

henryju commented 8 years ago

@earthling As you may know we moved this plugin under "SonarQubeCommunity" umbrella since we have not the (human) bandwidth at SonarSource to test Perforce. Your P/R look good to me but I will not test it. I could merge the P/R but I think it would be easier if you could take the lead on this plugin. Of course I will stay available for review if you want. TL;DR would you accept to take the lead on this plugin?

earthling commented 8 years ago

Sure, I will take the lead on this plugin.

earthling commented 8 years ago

I don't have write permissions to this repo.

henryju commented 8 years ago

Sorry, I was also missing some permissions. You should now be able to commit. Feel free to update the pom.xml:

Once your changes are merged, if you want to release the plugin on SonarQube update center, please read: http://docs.sonarqube.org/display/DEV/Deploying+to+Update+Center