I know this issue is old, but I think it's repro'ing for me on Jenkins 2.164.3 with P4 Plugin 1.9.7. The key difference is that I'm loading a DYNAMIC library. I don't know if that's relevant. Near the top of my pipeline, I load a library with this snippet:
String stream_name = 'stream_name'
String client_name = "jenkins-${env.JOB_NAME}-${stream_name}-library"
String library_source = "//depot/${stream_name}/Jenkinsfile/lib/..."
library(
identifier: stream_name + '-library@now',
retriever: legacySCM(
[
$class: 'PerforceScm', credential: 'p4creds',
populate: [
$class: 'AutoCleanImpl',
delete: true,
modtime: false,
parallel: [
enable: false,
minbytes: '1024',
minfiles: '1',
threads: '4'
],
pin: '',
quiet: true,
replace: true,
tidy: false
],
workspace: [
$class: 'ManualWorkspaceImpl',
charset: 'none',
name: client_name,
pinHost: false,
spec: [
allwrite: true,
clobber: false,
compress: false,
line: 'LOCAL',
locked: false,
modtime: false,
rmdir: false,
streamName: '',
view: "${library_source} //${client_name}/..."
]
]
]
)
)
// rest of the pipeline
This works great in isolation. But my job is failing intermittently with this error. It seems to happen most (but not always!) when multiple builds are triggered at the same time.
P4 Task: reverting all pending and shelved revisions.
... p4 revert d:\JenkinsHome\jobs\stream_name\workspac___
-
p4 revert d:\JenkinsHome\jobs\stream_name\jobs\stream_name-build\workspace_libs\stream_name-library_2/...
Path 'd:\JenkinsHome\jobs\stream_name\workspace_libs\stream_name-library_2/...' is not under client's root 'd:\JenkinsHome\jobs\stream_name\workspace_libs\stream_name-library'.
I can't figure out what logic it uses to append "_2" to the folder name, nor why it's failing to update the p4 client accordingly. It also seems like a bug that one path ends with "/..." while the other does not. |