Fix Perforce authentication and errors on 2026.1.
Review Request #15133 — Created June 23, 2026 and updated — Latest diff uploaded
Perforce 2026.1 was a big security-by-default release, which focused on
an increased default security level for authentication, no password-less
access, no set-password-on-first-connect behavior, and other changes.This requires some changes on our end. Specifically, we now need to
ensure we do an explicit login when we connect (and after we've verified
we've successfully connected), as thep4.passwordwe set will no
longer apply otherwise.The list of authentication error strings was updated to handle "Password
invalid", which may have already existed but was not being handled by
our code.Authentication is now only performed once a connection is established.
This avoids an attempt at a login when we've hit an outage or cert error
(which would trigger a "not connected" P4 error).The unit test database has been updated for p4d 2026.1, and as part of
this, each user had to be given a password. These areguest12345,
samwise12345, anddavid12345(for those respective users). The unit
tests have been updated to set these credentials for the connection
where appropriate.
Unit tests pass with p4d 2026.1, p4 2026.1, and p4python 2026.1.
Tested the code changes with the previous 2021.2 database and matching
versions ofp4d,p4, andp4python. Unit tests passed.Manually tested review requests and diffs with a local P4 server, using
both the 2021.2 and 2026.1 versions, without ticket auth (using the new
password login flow). These failed on 2026.1 before, but worked with the
new changes.