[JIRA] (JENKINS-61156) Regression: P4 Plugin 1.10.10 trigger doesn't run jobs

20 views
Skip to first unread message

tcramer@stoicstudio.com (JIRA)

unread,
Feb 19, 2020, 6:53:02 PM2/19/20
to jenkinsc...@googlegroups.com
Tom Cramer created an issue
 
Jenkins / Bug JENKINS-61156
Regression: P4 Plugin 1.10.10 trigger doesn't run jobs
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2020-02-19 23:52
Environment: Jenkins LTS 2.204.2 on Windows Server 2016 (64bit)
Java 1.8.0_144-b01
p4-plugin 1.10.10
Priority: Major Major
Reporter: Tom Cramer

We use a Perforce Trigger that calls curl to POST to the /p4/change endpoint exposed by the p4-plugin. With 1.10.6, this trigger worked, and the relevant job would run.  Upgrading to 1.10.10, and the trigger stopped working.

 

In investigating the issue, 1.10.10 was still logging "doChange: Received trigger event for: <p4port here>", but the usual followup log "probeJobs: P4: probing: <jenkins job>" never appeared. Rolling the plugin back to 1.10.6 restored the ability to trigger the jenkins job.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

tcramer@stoicstudio.com (JIRA)

unread,
Feb 19, 2020, 7:00:02 PM2/19/20
to jenkinsc...@googlegroups.com

williambrode@gmail.com (JIRA)

unread,
Feb 19, 2020, 8:05:03 PM2/19/20
to jenkinsc...@googlegroups.com

We are on Jenkins 2.204.2 and P4 plugin 1.10.9 and its still working for us.  So might just be 1.10.10.  I'll try upgrading next week and see if it breaks on 1.10.10 for us.

kwirth@perforce.com (JIRA)

unread,
Feb 20, 2020, 4:26:02 AM2/20/20
to jenkinsc...@googlegroups.com

Hi Tom Cramer - Thanks for reporting this.

What type of job are you triggering? Freestyle or pipeline?

Please send me screenshots showing the 'Build Triggers' section of the job and the complete URL (with hostname replaced with a dummy hostname) you use to trigger the job.

I will then try and repro this here.

kwirth@perforce.com (JIRA)

unread,
Feb 20, 2020, 12:20:03 PM2/20/20
to jenkinsc...@googlegroups.com

Hi Tom Cramer - Quick update. I just upgraded my test instance to 1.10.10 and for me the trigger is still working so it's possible this is to do with the paths involved or could be Jenkins version related also. If you can get me the data mentioned above and the paths involved that would be great (for example is it a stream, are there spaces, numbers or non ASCII characters). If you'd feel more comfortable in sending the data to me directly please send it to sup...@perforce.com for my attention.

kwirth@perforce.com (JIRA)

unread,
Feb 26, 2020, 10:11:07 AM2/26/20
to jenkinsc...@googlegroups.com

Hi Tom Cramer

Can you please send me your trigger to 'sup...@perforce.com'. I want to check how you are calling the trigger.

Thanks in advance,

Karl

msmeeth@perforce.com (JIRA)

unread,
Feb 26, 2020, 10:50:02 AM2/26/20
to jenkinsc...@googlegroups.com

I have just checked this. In P4Hook we use an anonymous thread to run the job. If we call getAllItems(to find the list of Jobs) inside the thread it seems to ignore your credentials and return no jobs. We may need to back out https://github.com/jenkinsci/p4-plugin/pull/116/files to fix this.

Adam Butler, are there alternatives for this fix?

Adam.J.Butler@gmail.com (JIRA)

unread,
Feb 26, 2020, 12:33:10 PM2/26/20
to jenkinsc...@googlegroups.com

Hi Matthew Smeeth apologies if this has caused a regression.  I'm unable to reproduce the issue on our instance of Jenkins (version 2.190.3) and am not in a position to upgrade it at the moment to do further testing due to it being a corporate instance, so it's going to be difficult for me to come up with alternatives at this time.

I think that your only option is to back this change out for the time being.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

williambrode@gmail.com (JIRA)

unread,
Feb 26, 2020, 12:43:25 PM2/26/20
to jenkinsc...@googlegroups.com

I and another colleague have installed 1.10.10 and the triggering still seems to be working as expected for us.

msmeeth@perforce.com (JIRA)

unread,
Feb 27, 2020, 6:48:03 AM2/27/20
to jenkinsc...@googlegroups.com

Hi William Brode, what access does anonymous users have set in Jenkins?

The reason I ask is because I've observed that if you allow anonymous users read and build access(or anything higher) on your Jenkins server, the perforce triggers will still work as expected. Whereas if Jenkins is set up to only allow authenticated users read and build access(or higher), that's when I'm see the issue.

msmeeth@perforce.com (JIRA)

unread,
Feb 27, 2020, 6:50:04 AM2/27/20
to jenkinsc...@googlegroups.com
Matthew Smeeth edited a comment on Bug JENKINS-61156
Hi [~wbrode], what access does can you confirm whether anonymous users have build and read permissions set in on your Jenkins server ?


The reason I ask is because I've observed that if you allow anonymous users read and build access(or anything higher) on your Jenkins server, the perforce triggers will still work as expected. Whereas if Jenkins is set up to only allow authenticated users read and build access(or higher), that's when I'm see the issue.

williambrode@gmail.com (JIRA)

unread,
Mar 9, 2020, 5:50:02 PM3/9/20
to jenkinsc...@googlegroups.com

Matthew Smeeth Sorry for the delay I missed the notification for this.  We do allow anonymous read but not Build.  Maybe Karl Wirth can verify if anonymous read access is necessary for p4 plugin triggering starting at 1.10.10.  Then again if you updated jenkins core or security plugins around the same time it could be one of them exposing/causing the issue.

msmeeth@perforce.com (JIRA)

unread,
Mar 10, 2020, 12:56:03 PM3/10/20
to jenkinsc...@googlegroups.com

Hi William Brode, I'm a bit surprised that it would work without build access, however given that anonymous user has read access on your system, It's possible that's all that's needed to avoid this issue. However once you upgrade to 1.10.11 I think you'll almost certainly hit this issue due to extra security measures we've implemented. 

 

For now unfortunately I'm going to revert the changes, with a plan to look into implementing this another way in the future.

 

FYI Adam Butler

Reply all
Reply to author
Forward
0 new messages