Source Control Management: Use latest remote HEAD on clone & ensure required commit is fetched
Description
Release Notes
n/a
Activity
Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee

Reporter

Triaged
Yes
Components
Fix versions
Priority
Created February 16, 2023 at 4:45 PM
Updated April 11, 2023 at 6:29 AM
Resolved March 17, 2023 at 8:57 AM
Imagine a situation:
Operation 1
Worker 1: clone repo, a1 branch, head at A
Operation 1 finished
Commit B is added to git a1 branch
Operation 2
Worker 2: clone repo, a2 branch, head at B is returned
Worker 1: getFileHash(file, B)
Worker 1: Can't find commit B, failed
Operation 2 failed
Overall, you need to handle this by
Always fetching for clone() to ensure latest remote HEAD is returned
For other operations either fetch always or handle the use case where commit is not found, then fetch and retry