[JIRA] [perforce-plugin] (JENKINS-34445) Auto cleanup and sync does not clean workspace properly using custom workspace

90 views
Skip to first unread message

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 26, 2016, 4:50:01 AM4/26/16
to jenkinsc...@googlegroups.com
Staffan Forsell created an issue
 
Jenkins / Bug JENKINS-34445
Auto cleanup and sync does not clean workspace properly using custom workspace
Issue Type: Bug Bug
Assignee: Rob Petti
Attachments: job-273-log-replace.txt, job-273-ScmConfig-replace.xml
Components: perforce-plugin
Created: 2016/Apr/26 8:49 AM
Environment: Jenkins ver. 1.635
Perforce plugin 1.3.35
Perforce Server version: P4D/LINUX26X86_64/2013.1/875993 (2014/06/09)
Priority: Major Major
Reporter: Staffan Forsell

We are trying to convert from the old perforce plugin to the new plugin p4-plugin.
We want to use the "Auto cleanup and sync" options to create pristine workspace to run builds in. Currently I have a job that fails because the old build files are not removed properly by the plugin.

I have attached the build log and scm config (sed:ed to remove specifics) for an build.

Notes:
1. The sync only runs for a sub dir of instead of whole project, but this might be a
optimization.
2. There is not output from rm. All the build directories should be detected as non-versioned and removed if I understand the "DELETE generated files" option for "Auto cleanup and sync" .
3. The build dirs that should have been deleted are normally ignored using P4IGNORE=.p4ignore for development, but in the jenkins slaves does not have this defined and should therefore not ignore these files when running reconcile.
4. p4 revert prints "/data/jenkins/workspace/utils-mainutils2_main/... - file(s) not opened on this client." which seems strange.

Will supply any additional info needed.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 26, 2016, 4:55:01 AM4/26/16
to jenkinsc...@googlegroups.com
Staffan Forsell updated an issue
Change By: Staffan Forsell
Environment: Jenkins ver. 1.635

Perforce plugin 1.3.35
Perforce Server version: P4D/LINUX26X86_64/2013.1/875993 (2014/06/09)

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 26, 2016, 4:56:01 AM4/26/16
to jenkinsc...@googlegroups.com
Staffan Forsell updated an issue
Change By: Staffan Forsell
Environment: Jenkins ver. 1.635

Perforce plugin
P4 Plugin  1.3. 35 8
Perforce Server version: P4D/LINUX26X86_64/2013.1/875993 (2014/06/09)

rob.petti@gmail.com (JIRA)

unread,
Apr 26, 2016, 11:09:02 AM4/26/16
to jenkinsc...@googlegroups.com
Rob Petti updated an issue
Change By: Rob Petti
Component/s: p4-plugin
Component/s: perforce-plugin

rob.petti@gmail.com (JIRA)

unread,
Apr 26, 2016, 11:09:02 AM4/26/16
to jenkinsc...@googlegroups.com

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 26, 2016, 11:35:01 AM4/26/16
to jenkinsc...@googlegroups.com

pallen@perforce.com (JIRA)

unread,
Apr 26, 2016, 12:00:03 PM4/26/16
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-34445
 
Re: Auto cleanup and sync does not clean workspace properly using custom workspace

Hi Staffan,

The automated cleanup will only run within the scope of the client Workspace view. So, base on (1) it will fail to cleanup files outside the view.

(2) The "... rm [abandoned files]" is only for files reverted, which is why it reported '/data/jenkins/workspace/utils-mainutils2_main/... - file(s) not opened on this client.'

(3) I'd need to check P4IGNORE, but it is generally better to use the client workspace view.

(4) Revert is reporting this as there are no files 'opened' in your client. It is there to support the cleanup of shelves, where files are unshelved into the workspace from previous builds and are left open for add/edit/etc...

I hope that helps to clear up the workflow, feel free to contact our support team (sup...@perforce.com) for help too.

Kind regards,
Paul

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 26, 2016, 5:24:04 PM4/26/16
to jenkinsc...@googlegroups.com

OK. So I'm starting to understand. I checked out github and from what I understand tidyRevisions() (due to our older server) will run reconcile mark the previous build files for add and then all files that are marked for add is deleted.

FYI, The view spec is: in the XML snippet:
"//utils/mainutils2/... //jenkins-$

{NODE_NAME}

-$

{JOB_NAME}

/..."
and the dirs/files I expect cleaned are definately in that view at e.g. "/data/jenkins/workspace/utils-mainutils2_main/projA/main/output".

Is there some other way to debug this?

pallen@perforce.com (JIRA)

unread,
Apr 27, 2016, 8:27:01 AM4/27/16
to jenkinsc...@googlegroups.com

Do the files (not being deleted) exist in Perforce, perhaps as deleted revisions?

As for debug the, you already have the quiet option turned off. For even more detail I would try and login to the slave and run the reconcile command with P4 as the Jenkins user. e.g.

   p4 -u <user> -p perforce:1666 -c jenkins-virt-node-2-utils-mainutils2_main reconcile -n -a -e -d -l -f /data/jenkins/workspace/utils-mainutils2_main/...

and see if the results are consistent.

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 27, 2016, 11:30:01 AM4/27/16
to jenkinsc...@googlegroups.com

I cannot find any such files as deleted revisions.
I ran this command on the build node and got 1497 lines of added files, exactly as expected.

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Apr 27, 2016, 11:32:01 AM4/27/16
to jenkinsc...@googlegroups.com
Staffan Forsell edited a comment on Bug JENKINS-34445
I cannot find any such files as deleted revisions.
I ran this command on the build node and got 1497 lines of added files,  exactly as expected  so using the reconcile command on the command line seems to do the correct thing .

stalle+jenkins-ci@gmail.com (JIRA)

unread,
Dec 7, 2016, 3:51:01 AM12/7/16
to jenkinsc...@googlegroups.com

Paul Allen I cannot reproduce this issue anymore since we have upgraded our server. From my point of view you can close this, but there might be other with some similar problem.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

pallen@perforce.com (JIRA)

unread,
Dec 7, 2016, 8:24:01 AM12/7/16
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Cannot Reproduce
 

Hi Staffan,
Thanks for looking at this again. Hopefully later changes have resolved the issue; as suggested I have closed it as Cannot Reproduce. Feel free to reopen the issue if you seen a new occurrence.
Kind regards,
Paul

Change By: Paul Allen
Status: Open Closed
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages