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 ) )