Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
Jenkins 2.346.2
P4 Plugin Version 1.13.0
p4 Version Rev. P4/NTX64/2021.2/2273812 (2022/04/14).
OS Name Microsoft Windows Server 2019 Datacenter
OS Version 10.0.17763 Build 17763
OS System Manufacturer Amazon EC2
Description
After updating the plugin from v1.12.4 to v1.13.0 our unshelve operations resulted in the following error that looks related to saving the unshelve change to the changelog file:
[2022-07-28T21:22:34.503Z] P4 Task: unshelve review: 1153859 [2022-07-28T21:22:34.512Z] (p4):cmd:... p4 unshelve -f -s1153859 -cdefault [2022-07-28T21:22:34.512Z] p4 unshelve -f -s1153859 -cdefault ... [2022-07-28T21:22:34.676Z] ... duration: (173ms) [2022-07-28T21:22:34.709Z] (p4):cmd:... p4 change -o 1153859 [2022-07-28T21:22:34.709Z] p4 change -o 1153859 [2022-07-28T21:22:34.709Z] [2022-07-28T21:22:34.719Z] (p4):stop:11 [2022-07-28T21:22:34.781Z] (p4):stop:exception [2022-07-28T21:22:34.781Z] [2022-07-28T21:22:34.781Z] Unable to unshelve change: java.lang.IllegalStateException: Expected 1 instance of hudson.model.User$AllUsers but got 0
Rolling back the plugin to v1.12.4 unblocked us:
[2022-07-28T22:09:46.594Z] P4 Task: unshelve review: 1153859 [2022-07-28T22:09:46.604Z] (p4):cmd:... p4 unshelve -f -s1153859 -cdefault [2022-07-28T22:09:46.604Z] p4 unshelve -f -s1153859 -cdefault ... [2022-07-28T22:09:46.780Z] ... duration: (186ms) [2022-07-28T22:09:46.780Z] P4 Task: resolve: -Safe (-as) [2022-07-28T22:09:46.791Z] (p4):cmd:... p4 resolve -am C:\Workspace/... [2022-07-28T22:09:46.791Z] p4 resolve -am C:\Workspace/... [2022-07-28T22:09:46.791Z] [2022-07-28T22:09:46.800Z] C:\Workspace/... - no file(s) to resolve. [2022-07-28T22:09:46.800Z] [2022-07-28T22:09:46.800Z] (p4):stop:11 [2022-07-28T22:09:46.800Z] ... duration: (20ms)
This is the configuration of the unshelve command we are running:
p4unshelve( credential: env.P4CREDENTIAL, ignoreEmpty: true, resolve: "Safe (-as)", shelf: params.Shelveset, tidy: false, workspace: streamSpec( charset: "auto", format: env.P4WORKSPACE, pinHost: false, streamName: env.P4STREAM ) )
Thanks heiko_nardmann
I have also now been able to reproduce this with 2.289.2.
Reproduction steps:
(1) Install Jenkins 2.289.3
(2) Install P4-Plugin 1.13.0.
(3) Setup a Jenkins slave. Note I start mine from Linux with:
java -jar agent.jar -jnlpUrl http://JENKINS-SERVER:8080/computer/LinuxDesktop/jenkins-agent.jnlp -secret 6ecae164acb9f98d19e8449cd8fa3755f14bbb8c966208fab5216fe6ddd7305c -workDir "/filestoreSSD/Vagrant/Jenkins/slave1"
(4) Shelve a file from P4V or the command line and record the shelved CL.
(5) Create a freetyle job that sync the files related to the shelf then a build step that unshelves the known pending shelf to the slave. For example:
and:
(6) When you run the build you will see the error. For example when unshelving CL 2536: