[JIRA] (JENKINS-56162) p4 plugin doesn't add '/...' to older p4sync calls.

2 views
Skip to first unread message

mhall@tivo.com (JIRA)

unread,
Feb 15, 2019, 4:50:02 PM2/15/19
to jenkinsc...@googlegroups.com
Matthew Hall created an issue
 
Jenkins / Bug JENKINS-56162
p4 plugin doesn't add '/...' to older p4sync calls.
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: a.txt
Components: p4-plugin
Created: 2019-02-15 21:49
Priority: Major Major
Reporter: Matthew Hall

Updating our p4 plugin from 1.8.12 to 1.9.6, we find that jobs using the older p4sync, where the trailing '/...' was optional, fails to write out useful/working p4 clients.

For p4sync call:

p4sync(charset: 'none', credential: credential, depotPath: '//depot/svrtools/mainline/sme-tools/jenkins_test',
format: user + '${NODE_NAME}${JOB_NAME}', populate: [
$class: 'AutoCleanImpl', delete: true, modtime: false,
parallel: [
enable: false, minbytes: '1024', minfiles: '1',
path: '/usr/local/bin/p4', threads: '4'
],
pin: '', quiet: true, replace: true
]
)

We get in the resultant client:

View:
//depot/svrtools/mainline/sme-tools/jenkins_test //build-repo01-jenkins-test/jenkins_test

Which then fails to sync/checkout anything.

The log output is attached as 'a.txt'

Behaviour of this seems changed in :

https://swarm.workshop.perforce.com/changes/24767

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mhall@tivo.com (JIRA)

unread,
Feb 15, 2019, 4:51:02 PM2/15/19
to jenkinsc...@googlegroups.com
Matthew Hall updated an issue
Change By: Matthew Hall
Updating our p4 plugin from 1.8.12 to 1.9.6, we find that jobs using the older p4sync, where the trailing '/...' was optional, fails to write out useful/working p4 clients.

For p4sync call:


{code:java}
p4sync(charset: 'none', credential: credential, depotPath: '//depot/svrtools/mainline/sme-tools/jenkins_test',
           format: user + '-${NODE_NAME}-${JOB_NAME}', populate: [

             $class: 'AutoCleanImpl', delete: true, modtime: false,
             parallel: [
               enable: false, minbytes: '1024', minfiles: '1',
               path: '/usr/local/bin/p4', threads: '4'
             ],
             pin: '', quiet: true, replace: true
           ]
          )
{code}



We get in the resultant client:


{noformat}
View:
//depot/svrtools/mainline/sme-tools/jenkins_test //build-repo01-jenkins-test/jenkins_test
{noformat}


Which then fails to sync/checkout anything.

The log output is attached as 'a.txt'

Behaviour of this seems changed in :

https://swarm.workshop.perforce.com/changes/24767

mhall@tivo.com (JIRA)

unread,
Feb 15, 2019, 4:56:01 PM2/15/19
to jenkinsc...@googlegroups.com


If we revert plugin to older, and then delete generated client, we see the difference in c.txt output.

mhall@tivo.com (JIRA)

unread,
Feb 15, 2019, 4:56:02 PM2/15/19
to jenkinsc...@googlegroups.com

mhall@tivo.com (JIRA)

unread,
Feb 15, 2019, 4:58:02 PM2/15/19
to jenkinsc...@googlegroups.com
Matthew Hall updated an issue
Updating our p4 plugin from 1.8.12 to 1.9.6, we find that jobs using the older p4sync, where the trailing '/...' was optional, fails to write out useful/working p4 clients.

For p4sync call:


{code:java}
p4sync(charset: 'none', credential: credential, depotPath: '//depot/svrtools/mainline/sme-tools/jenkins_test',
           format: user + '-${NODE_NAME}-${JOB_NAME}', populate: [
             $class: 'AutoCleanImpl', delete: true, modtime: false,
             parallel: [
               enable: false, minbytes: '1024', minfiles: '1',
               path: '/usr/local/bin/p4', threads: '4'
             ],
             pin: '', quiet: true, replace: true
           ]
          )
{code}



We get in the resultant client:


{noformat}
View:
//depot/svrtools/mainline/sme-tools/jenkins_test //build-repo01-jenkins-test/jenkins_test
{noformat}


Which then fails to sync/checkout anything.

The log output is attached as 'a.txt'

Behaviour of this seems changed in :

https://swarm.workshop.perforce.com/changes/24767

If we revert plugin to older, and then delete generated client, we see the difference in c.txt output.

We also see our view has changed :


{noformat}
View:
//d-alviso/svrtools/mainline/sme-tools/jenkins_test/... //build-repo01-jenkins-test/...
{noformat}

kwirth@perforce.com (JIRA)

unread,
Feb 18, 2019, 6:29:01 AM2/18/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-56162
 
Re: p4 plugin doesn't add '/...' to older p4sync calls.

Hi Matthew Hall, Thanks for highlighting this. It's an interesting one because the developers seem to have corrected the behavior to be correct Perforce behavior and documented it in the bubble help:

List of one or more depot paths (separated by new lines)

For example //depot/A/...
//depot/B/...

//depot/C/file.txt

So in your example '//depot/svrtools/mainline/sme-tools/jenkins_test' is specifying the file not the folder 'jenkins_test'.

However that breaks backward compatible systems that relied on the old behavior. I know we have been asked to support the usage case of only syncing a single file so we cant just revert to the old behavior without additional checking. Therefore I'm going to flag this to the product managers.

kwirth@perforce.com (JIRA)

unread,
Feb 18, 2019, 6:33:02 AM2/18/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Feb 18, 2019, 6:33:02 AM2/18/19
to jenkinsc...@googlegroups.com
 
Re: p4 plugin doesn't add '/...' to older p4sync calls.

Reproduction Steps:
(1) Install p4-plugin 1.8.12
(2) Create pipeline job (editor is fine) and a 'p4sync' step that has a classic depot view that ends in a folder. For example '//depot/Project1/main'.
(3) Run the job. '/...' is appended to client view and files under path are synced.
(4) Upgrade to 1.9.6
(5) Force run the same job. '/...' is not appended to client view. No files are synced because 'main' is a folder not a file.

kwirth@perforce.com (JIRA)

unread,
Feb 18, 2019, 6:33:04 AM2/18/19
to jenkinsc...@googlegroups.com

mhall@tivo.com (JIRA)

unread,
Feb 19, 2019, 1:21:01 PM2/19/19
to jenkinsc...@googlegroups.com
Matthew Hall commented on Bug JENKINS-56162
 
Re: p4 plugin doesn't add '/...' to older p4sync calls.

Thanks for the info Karl. This is a rough change to suddenly run into, because we now have to go and fix several hundred Jenkinsfiles across multiple teams and groups.

kwirth@perforce.com (JIRA)

unread,
Feb 20, 2019, 4:04:01 AM2/20/19
to jenkinsc...@googlegroups.com

Hi Matthew Hall. Happy to help and I appreciate how painful that's going to be. FYI Wrishi Basu

kwirth@perforce.com (JIRA)

unread,
Feb 20, 2019, 4:05:03 AM2/20/19
to jenkinsc...@googlegroups.com

wbasu@perforce.com (JIRA)

unread,
Jun 4, 2019, 9:19:01 AM6/4/19
to jenkinsc...@googlegroups.com
W Basu Perforce commented on Bug JENKINS-56162
 
Re: p4 plugin doesn't add '/...' to older p4sync calls.

Matthew Hall - we appreciate the pain, however, adding the support back as feature will cause more disruption than help. However, as Karl Wirth said, he can help you for this one-off update where possible.

wbasu@perforce.com (JIRA)

unread,
Jun 4, 2019, 9:20:02 AM6/4/19
to jenkinsc...@googlegroups.com
W Basu Perforce closed an issue as Won't Do
 

Punting as it no longer matches our direction and features

Change By: W Basu Perforce
Status: Open Closed
Resolution: Won't Do
Reply all
Reply to author
Forward
0 new messages