[JIRA] (JENKINS-57327) changeView option ignored, not added to client spec

16 views
Skip to first unread message

aaronkmiller@gmail.com (JIRA)

unread,
May 4, 2019, 5:11:03 PM5/4/19
to jenkinsc...@googlegroups.com
Aaron Miller created an issue
 
Jenkins / Bug JENKINS-57327
changeView option ignored, not added to client spec
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2019-05-04 21:10
Environment: Jenkins v2.175
p4-plugin v1.9.7
Perforce Server: P4D/LINUX26X86_64/2017.1/1559660 (2017/08/31)
Labels: plugin
Priority: Major Major
Reporter: Aaron Miller

Using the following checkout step, the changeView option is ignored. It is not added to the client spec and files from later changelists are synced to the workspace:

Stage('Test') {
    checkout([
        $class: 'PerforceScm',
        credential: 'mycredentials',
        populate: [
            $class: 'ForceCleanImpl',
            have: true,
            pin:  '',
            quiet: true,
            parallel: [
                enable: false,
                minbytes: '1024',
                minfiles: '1',
                path: '/usr/bin/p4',
                threads: '4'
            ]
        ],
        workspace: [
            $class: 'ManualWorkspaceImpl',
            charset: 'none',
            name: 'jenkins-mynode-testing',
            syncID: 'jenkins-mynode-testing',
            pinHost: false,
            spec: [
                allwrite: true,
                backup: false,
                clobber: false,
                compress: false,
                line: 'LOCAL',
                locked: false,
                modtime: false,
                rmdir: false,
                serverID: '',
                streamName: '',
                type: 'WRITABLE',
                view: '//depot/mypath/... //jenkins-mynode-testing/...',
                changeView: '//depot/mypath/...@1185739'
            ]
        ]
    ])
}

Console output:

Started by user Aaron Miller
Replayed #12
Running in Durability level: PERFORMANCE_OPTIMIZED
Loading library sharedlibrary@now
(p4):cmd:... p4 changes -m1 //depot/jenkins-path/sh___
p4 changes -m1 //depot/jenkins-path/shared/.../...@now

Change 1187280 on 2019/05/04 by amiller@am_ws_kilo 'Remove debug code

reviewed by:'
(p4):stop:3
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:6
(p4):cmd:... p4 client -i
p4 client -i

Client jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5 saved.

(p4):stop:7
(p4):cmd:...   View:
      //depot/jenkins-path/shared/... //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...
...   Root: /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary
(p4):stop:
(p4):cmd:... p4 counter change
p4 counter change

(p4):stop:8
(p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...
p4 changes -m1 -ssubmitted //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...

Change 1187280 on 2019/05/04 by amiller@am_ws_kilo 'Remove debug code

reviewed by:'
(p4):stop:9
(p4):cmd:... p4 repos -C
p4 repos -C

(p4):stop:10
P4: builds: 1187280 
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:6

P4 Task: establishing connection.
... server: p4.mydomain.com:1666
... node: jenkins2.mydomain.com
Building on Node: master
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:6

P4 Task: establishing connection.
... server: p4.mydomain.com:1666
... node: jenkins2.mydomain.com

P4 Task: reverting all pending and shelved revisions.
(p4):cmd:... p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...

/home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/... - file(s) not opened on this client.

(p4):stop:7
... rm [abandoned files]
duration: (4ms)

(p4):cmd:... p4 sync -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...#none
p4 sync -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...#none

(p4):stop:8
... rm -rf /home/jenkins/jobs/testing/workspace@libs/sharedlibrary

P4 Task: syncing files at change: 1187280
(p4):cmd:... p4 sync -f -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...@1187280
p4 sync -f -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...@1187280

... totalFileSize 75308
... totalFileCount 18

(p4):stop:9
duration: (21ms)

P4: unable to save changes, null changelogFile.

P4Task: cleanup Client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:6

P4 Task: establishing connection.
... server: p4.mydomain.com:1666
... node: jenkins2.mydomain.com
P4 Task: cleanup client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
(p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

(p4):stop:7
(p4):cmd:... p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...

/home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/... - file(s) not opened on this client.

(p4):stop:8
P4 Task: remove client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
(p4):cmd:... p4 client -d jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
p4 client -d jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5

Client jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5 deleted.

(p4):stop:9
[Pipeline] Start of Pipeline
Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
[Pipeline] stage
[Pipeline] { (Test)
Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
[Pipeline] node
Running on mynode in /home/jenkins/workspace/testing
[Pipeline] {
Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
[Pipeline] checkout
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:6
(p4):cmd:... p4 counter change
p4 counter change

(p4):stop:7
(p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-mynode-testing/...
p4 changes -m1 -ssubmitted //jenkins-mynode-testing/...

Change 1186739 on 2019/05/01 by someone@vm-ca-2 'Don't consume license if the De'
(p4):stop:8
(p4):cmd:... p4 repos -C
p4 repos -C

(p4):stop:9
P4: builds: 1186739 
Building on Node: mynode
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:6

P4 Task: establishing connection.
... server: p4.mydomain.com:1666
... node: mynode.mydomain.com
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:6

P4 Task: establishing connection.
... server: p4.mydomain.com:1666
... node: mynode.mydomain.com

P4 Task: reverting all pending and shelved revisions.
(p4):cmd:... p4 revert /home/jenkins/workspace/testing/...
p4 revert /home/jenkins/workspace/testing/...

/home/jenkins/workspace/testing/... - file(s) not opened on this client.

(p4):stop:7
... rm [abandoned files]
duration: (6ms)

(p4):cmd:... p4 sync -q /home/jenkins/workspace/testing/...#none
p4 sync -q /home/jenkins/workspace/testing/...#none

... totalFileSize 0
... totalFileCount 21818

(p4):stop:8
... rm -rf /home/jenkins/workspace/testing

P4 Task: syncing files at change: 1186739
(p4):cmd:... p4 sync -f -q /home/jenkins/workspace/testing/...@1186739
p4 sync -f -q /home/jenkins/workspace/testing/...@1186739

... totalFileSize 5853084823
... totalFileCount 28808

P4: saving built changes.
Found last change 1186739 on syncID jenkins-mynode-testing
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:6
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:3
(p4):cmd:... p4 info
p4 info

(p4):stop:4
(p4):cmd:... p4 info
p4 info

(p4):stop:5
(p4):cmd:... p4 client -o jenkins-mynode-testing
p4 client -o jenkins-mynode-testing

(p4):stop:6
... done

[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
Finished: SUCCESS

If I manually create a comparable client spec and sync with the command-line p4 client, the workspace is limited to the specified changelist as expected.

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

kwirth@perforce.com (JIRA)

unread,
May 7, 2019, 4:32:02 AM5/7/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
May 7, 2019, 4:32:02 AM5/7/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-57327
 
Re: changeView option ignored, not added to client spec

Hi Aaron Miller. Thanks for highlighting this. I'll test it here and update the job with my findings.

kwirth@perforce.com (JIRA)

unread,
May 7, 2019, 10:00:02 AM5/7/19
to jenkinsc...@googlegroups.com

Hi Aaron Miller,

Strangely mine works.

checkout perforce(credential: 'JenkinsMaster',
	 populate: forceClean(have: false,
	 parallel: 
		[
		 enable: false,
		 minbytes: '1024',
		 minfiles: '1',
		 threads: '4'
		],
	 pin: '',
	 quiet: false),
	 workspace: manualSpec(charset: 'none',
	 cleanup: false,
	 name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-changeview',
	 pinHost: false,
	 spec: clientSpec(allwrite: false,
	 backup: true,
	 changeView: '//depot/Project1/...@307',
	 clobber: true,
	 compress: false,
	 line: 'LOCAL',
	 locked: false,
	 modtime: false,
	 rmdir: false,
	 serverID: '',
	 streamName: '',
	 type: 'WRITABLE',
	 view: '//depot/Project1/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-changeview/...')))

You can see that '307' is the CL I have set for my 'changeview'. In the job output I see it correctly syncing 307:

P4 Task: syncing files at change: 307
... p4 sync /var/lib/jenkins/ANOTHER_SLAVE/workspace/PipelineEditor/...@307

Note - The latest CL is '363' on this path:

$ p4 changes -m1 //depot/Project1/...
Change 363 on 2019/04/08 by super@test_ws 'Submit of ./f363'

Can you please try a simple test where your checkout step is the only one in the code from a fresh job. Do you still see the same bug?

 

 

 

kwirth@perforce.com (JIRA)

unread,
May 7, 2019, 10:00:02 AM5/7/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_SUPPORT plugin

kwirth@perforce.com (JIRA)

unread,
May 21, 2019, 7:51:01 AM5/21/19
to jenkinsc...@googlegroups.com
 
Re: changeView option ignored, not added to client spec

Hi Aaron Miller - I just wanted to check if you got my last message - included above.

aaronkmiller@gmail.com (JIRA)

unread,
May 22, 2019, 9:24:02 PM5/22/19
to jenkinsc...@googlegroups.com

Hi Karl,

Apologies for not getting back to you sooner.

I created a new job with only the checkout step shown above wrapped in a node() step and got the same result. I also used a workspace name that didn't already exist. I verified with

p4 client -o jenkins-mynode-testing

that the ChangeView was not added to the client spec, and that the workspace contains the latest file revisions.

Let me know if there's any other info I can provide, thanks.

Reply all
Reply to author
Forward
0 new messages