Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-28367] fallback on 'p4 login -p' when '-a' fails
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Rob for the fix. I think the code change is okay for my issue. How can I update my plugin for the fix?
55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not released yet since I haven't had any time to test it.
Here's a snapshot containing the fix if you want to test it: https://dl.dropboxusercontent.com/u/1897231/perforce.hpi
55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change does effectively nothing, since there is no detection for the error that doesn't allow the
-a
option.If
-a
is not allowed, p4 outputsUser not allowed to create a ticket that is valid on all host machines.
with exit value 1. This isn't detected bycheckAuthnErrors(String)
, so a PerforceException is never thrown andp4 login -p
never gets called.55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this?
55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we're getting auth errors right now when attempting to use a server that does not allow the
-a
option.Only
p4 login -a -p
gets executed then attempts to runp4 workspace -o
again without falling back top4 login -p
.I haven't had a chance to actually load up the IDE and make a change to test out, but after carefully looking through the source I'm 99% certain this is the problem. I think adding
User not allowed to create a ticket that is valid on all host machines.
toprivate static final String p4errors[]
would solve the problem.55762a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request inbound