[BUG]: Self-hosted agent fails to mount whole directory in container if previous job on same agent checks out repository with a path #4901
Labels
Area: ABTT
Area: Agent
bug
checkout
Issues/PRs related to the checkout pipeline step
Containers
Issues related to Docker, containerd, etc.
What happened?
Hey,
I have observed a bug where the my self hosted agent mounts only the source directory
/opt/azagent/_work/1/s
into the container instead of the pipeline workspace/opt/azagent/_work/1/
. This leads to the Default Working Directory being/opt/azagent/_work/1/s/checkedOutRepo
.The problem only occurs if you have 2 jobs with the first one checking out the repository into a specific path and the second job running on the same agent as the first job ran. To ensure that the second job runs on the same agent I divided both jobs into seperate stages. I also created a simple pipeline that reproduces this bug:
The bug does not occur if the second job is executed on another agent. So in this example only one job of the second stage mounts the directory in the wrong place.
There was already such an issue in the past though I don't think that it is not exactly the same.
#4479
Versions
Agent Version: 3.242.0
Agent OS: Linux
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure DevOps Server 2022.1
Operation system
No response
Version controll system
git
Relevant log output
The text was updated successfully, but these errors were encountered: