bug: lock file does not work as expected when using `depth: 1`
What steps did you take:
When you have
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: src/swissfega/libs/_ytt_lib/custodian
contents:
- path: .
git:
url: https://gitlab.com/data-custodian/custodian.git
ref: main
depth: 1
newRootPath: tools/deploy/manifests/src/custodian/libs/_ytt_lib/custodian
and you create a lock file and then add another commit on main in https://gitlab.com/data-custodian/custodian.git and then do vendir sync --locked it fails due to not finding the Git SHA.
What happened:
- Could not
vendir sync --lockeddue todepth:1
What did you expect:
-
vendir sync --lockedmust not takedepth:1into account forcefully as it will not find the Git SHA in 99% of the cases. - The behaviour should do
git fetchwith exponential back off by alwaysgit fetch --depth 20and thengit fetch --depth 40and thengit fetch --depth 80etc till the refspec is found, giving the possibility to give up after a certainmaxDepthyou could set... (0= infinity till no parent any more).
Anything else you would like to add: Also it would be very welcome if vendir could somehow cache the fetching generically for all content types to not redo the stuff over and over again. Would be a crazy speed up:
Environment:
- vendir version (execute
vendir --version): 0.44.0 Nix - OS (e.g. from
/etc/os-release): NixOS
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.