Validate your P4 Code Review installation
When P4 Code Review starts it verifies the Redis cache, during this time you cannot log in to P4 Code Review. The time taken to verify the Redis cache depends on the number of users, groups, and projects P4 Code Review has. Start-up time can be improved by persisting the memory cache. You can persist the memory cache by disabling background saves and enabling append saves in the redis-server.conf file, see Redis server configuration file.
Now that P4 Code Review is fully installed the final step is to check that your P4 Code Review installation is working correctly by doing the following:
- Create a new changelist that:
- Contains at least one modified file
- Contains the #review keyword in the changelist description
- Right click on the new changelist in P4V and click Shelve Files...
- Check that a new review is created for the changelist.
- If a review is created, the P4 Code Review P4 Server extension is working. If you are using P4 Code Review P4 Server Triggers instead of the P4 Code Review P4 Server extension and the review is created, the triggers are working.
- If a review is not created, see Review not created.
Do not select Request New Review... because this method uses the API and will not fully test the P4 Code Review P4 Server extension.
This is also true if you are using P4 Code Review P4 Server Triggers instead of the P4 Code Review P4 Server extension.
You are now all set to start using P4 Code Review, enjoy!
To get started with P4 Code Review, see the Quickstart chapter.
Optional P4 Code Review integrations
P4 Code Review provides a number of optional integrations that can be enabled if required, see Integrations.
Review not created
If you are using the P4 Code Review P4 Server extension
If a new review is not created when you validate your installation, your P4 Code Review P4 Server extension is probably not working correctly on the P4 Server.
Check the P4 Code Review P4 Server extension is working
To check that the P4 Code Review P4 Server extension is working, run the following command on your P4 Server:
p4 extension --run swarm ping
Success message:
OK
Example failure message:
BAD (Cannot reach https://swarm-example.com/)
For information about P4 Server Extensions on your P4 Server, see the P4 Extensions Documentation.
Check installed versions
To check your P4 Code Review version and your P4 Code Review P4 Server extension version, run the following command on your P4 Server:
p4 extension --run swarm version
Example response:
Swarm Version: SWARM/2022.1/2226999 (2022/03/20) Extension Version: 2022.1.20221215
If you are using P4 Code Review P4 Server Triggers
If a new review is not created when you validate your installation, your P4 Code Review P4 Server Triggers are probably not installed correctly on the P4 Server. For instructions on how to install the P4 Code Review P4 Server Triggers on your P4 Server, see Installing Triggers.
Review cannot be updated when using triggers
This is rare but can sometimes happen if your P4 Code Review server is configured for SSL.
Issue
The swarm-trigger.pl tries to use the Perl HTTP::Tiny module if it is installed. Sometimes it has a problem with certificates and a 599 error is generated.
To check if this is the issue, examine the operating system log of your P4 Server for errors logged by swarm-trigger.pl.
- Windows platforms, look in the Windows Event viewer
- Linux platforms:
- Ubuntu/Debian: look in /var/log/syslog
- RedHat: look in /var/log/messages
The error message looks something like: Error: (599/Internal Exception) (probably invalid SSL certificate) .....
Workaround
If you see this error, modify the P4 Code Review trigger script file on the P4 Server so that it uses Curl instead of HTTP::Tiny.
Modify the trigger script to use Curl:
There are two lines in the swarm-trigger.pl script that enable the use of HTTP::Tiny, edit these two lines to make the script fallback to Curl:
- Find both instances of the following line:
- Add ! to $HAVE_TINY for each line so that they look like this:
- Save the trigger script file.
if ($HAVE_TINY) {
if (!$HAVE_TINY) {