Checkout adding random characters to folder name

This happened after uprade to Jenkins version 2.254 to 2.332.4 . We upgraded all of available plugins and noticed that TFVC checkout with Jenkinsfile adding random characters after workspace@script and path exceeds 260 characters which is a default limit in Linux.
We are not having problems with other TFVC or GIT checkouts we only have this problem with TFVC and Jenkinsfile. Also Ligthweight checkout option is not working for TFVC.
Is there any workaround for that problem? I googled it and found a solution here Why does Jenkins creates a subfolder within the workspace@script folder to checkout git code instead of the workspace@script itself? - Stack Overflow They advice downgrading
“Pipeline: Groovy plugin” but it has dependants so it is not easy to downgrade only that plugin.
When we try to get rid of it’s dependencies and delete some of that plugins like blue ocean and after restart jenkins didn’t work.

Can you give us some details? Like what random characters? Jenkins should be truncating the job name so its well within limits. Do you mean your repo has some super deep nested folders, and combined with jenkins folder name the full path is to long (ex a/b/c/d/e/f/g or abcdefg/)

Here is an example Console Output log.
tarted by an SCM change
Lightweight checkout support not available, falling back to full checkout.
Checking out hudson.plugins.tfs.TeamFoundationServerScm into /hdd2/jenkins/jobs/DEV/jobs/Interface/jobs/Interface.CurrentAccounts/workspace@script/e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3 to read Jenkinsfile
Querying for remote changeset at ‘$/V2/DEV/Interface/Modules/CurrentAccounts’ as of ‘D2022-07-20T06:31:31Z’…
Query result is: Changeset #2583233 by ‘MUHAMMYA’ on ‘2022-07-19T14:37:33Z’.
Checking if there exists a mapping for /hdd2/jenkins/jobs/DEV/jobs/Interface/jobs/Interface.CurrentAccounts/workspace@script/e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3…yes, in workspace ‘Jenkins-Interface.CurrentAccounts-MASTER’.
Downloading list of workspaces from http://tfsmaster:8080/tfs/DefaultCollection
Deleting workspaces named ‘Jenkins-Interface.CurrentAccounts-MASTER’ from computer ‘UBIPRDJNKSBLD01’…
Deleted 1 workspace(s) named ‘Jenkins-Interface.CurrentAccounts-MASTER’.
Creating workspace ‘Jenkins-Interface.CurrentAccounts-MASTER’ owned by ‘INTERTECH\TFSSERVICE’…
Mapping ‘$/V2/DEV/Interface/Modules/CurrentAccounts’ to local folder ‘/hdd2/jenkins/jobs/DEV/jobs/Interface/jobs/Interface.CurrentAccounts/workspace@script/e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3’ in workspace ‘Jenkins-Interface.CurrentAccounts-MASTER’…
Created workspace ‘Jenkins-Interface.CurrentAccounts-MASTER’.
Getting version ‘C2583233’ to ‘/hdd2/jenkins/jobs/DEV/jobs/Interface/jobs/Interface.CurrentAccounts/workspace@script/e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3’…
ERROR: Checkout failed
com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: TF400898: An Internal Error Occurred. Activity Id: db9d236c-58dd-4a94-8ba6-7f936e4f8a09.
at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:117)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:987)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:665)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:444)
at ms.tfs.versioncontrol.clientservices._03._Repository5Soap12Service.updateLocalVersion(_Repository5Soap12Service.java:1170)
at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3067)
Caused: com.microsoft.tfs.core.exceptions.TECoreException: TF400898: An Internal Error Occurred. Activity Id: db9d236c-58dd-4a94-8ba6-7f936e4f8a09.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:92)
at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.map(VersionControlExceptionMapper.java:43)
at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3081)
at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3114)
at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.sendToServer(UpdateLocalVersionQueue.java:769)
at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.flush(UpdateLocalVersionQueue.java:461)
at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.queueUpdate(UpdateLocalVersionQueue.java:392)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.AsyncGetOperation.queueLocalVersionUpdate(AsyncGetOperation.java:294)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.completeGetOperation(GetDownloadWorker.java:629)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.call(GetDownloadWorker.java:160)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.call(GetDownloadWorker.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.microsoft.tfs.core.clients.versioncontrol.internal.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:85)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.throwIfFatalError(GetEngine.java:2958)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processOperationsInternal(GetEngine.java:1142)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processOperations(GetEngine.java:957)
at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processGetOperations(GetEngine.java:808)
at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2459)
Caused: java.lang.RuntimeException
at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2470)
at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2341)
at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2331)
at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2308)
at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:72)
at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:18)
at hudson.remoting.LocalChannel.call(LocalChannel.java:47)
at hudson.plugins.tfs.model.Server.execute(Server.java:231)
Caused: java.lang.RuntimeException
at hudson.plugins.tfs.model.Server.execute(Server.java:235)
at hudson.plugins.tfs.model.Project.getFiles(Project.java:264)
at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:63)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:159)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:70)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE

Hi Gavin,
I posted all console output but it marked as spam. I will paste working folder from console output.
‘/hdd2/jenkins/jobs/DEV/jobs/Interface/jobs/Interface.CurrentAccounts/workspace@script/e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3’

This “e3b33d43fea4154732d483fa013f715b33f8d5c95dddff669d8180b6744f6fa3” character set randomly created and we didn’t have such kind of this set on our previous version.

Here we had same problem, solved using workflow-cps-2648.va9433432b33c, all other plugin are latest
hope it can help you.

These are useful links:
https://issues.jenkins.io/browse/JENKINS-67836

Hi Letizia. Thanks for the reply. Yes, we already saw that issue and solution but when we upgrade all plugins and after jenkins and after all plugins. The Pipeline: groovy (workflow-cps plugin) upgrades 2729.vea_17b_79ed57a_ version and we couldn’t downgrade it from ui. When we manually put hpi to plugins folder jenkins didn’t start up. It gives error on ui.

Now we tried to update plugins one by one and find which plugins are not upgrading Pipeline: Groovy plugin as a dependency. At least we have set of plugins and workflow cps plugin in 2.80 version now. But When we try to save anything after change on Configure System page Save and Apply buttons is not working.

What do you think about it?