Self hosted agent retention issue with workspaces

Wouter Vercruysse 20 Reputation points
2023-12-13T10:56:15.2466667+00:00

A client has a need to rerun certain deployment stages of an azure pipeline. The pipeline is ran on a self-hosted agent (because we need some installed CLI on that machine to build the app). The problem is that I expected each run of the pipeline to have a separate workspace folder, like this:

  • c:/agent/_work/1
  • c:/agent/_work/2
  • etc

This way, rerunning a stage would just work with the files in the workspace directory coupled to the run.

At some point, the agent stopped creating new workspace folders, and now each run is executed in the same folder (overwriting files that may have changed), which causes the reruns to fail or using the wrong version of the files.

Is this expected behavior? I already restarted the agent service and tried a lot of things, but it just keeps setting the same folder as my Pipeline.Workspace one. On the build server, I found a file Mappings.json which holds this:

{
	"lastBuildFolderCreatedOn": "12/13/2023 11:04:56 +01:00",
	"lastBuildFolderNumber": 35
}

Which I guess keeps track of this, but doesn't update on new runs of the pipeline.

Community Center | Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2023-12-13T11:10:55.3733333+00:00

    Hi @Wouter Vercruysse ,

    Azure DevOps is running their own community forum. Maybe it's better to post your Azure DevOps related question over there: AzureDevOps Forums


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.