Implement a mechanism to allow builds to leverage git describe
This is further technical debt introduced indirectly by #21 (closed) (!556 (merged)), as it was unacceptable to cache git repositories as a part of the build tree, and parallel work on using the build trees needed to be unblocked.
Background
More and more modules are using git describe
at build time in order to derive their version number from the git history, this functionality is no longer working as of landing !556 (merged) for issue #455 (closed).
Task description
Need to find a way to allow modules to continue using git describe
in the build sandbox, some research was done to allow staging of minimal history to allow this with the caveat of less determinism of builds, indeed having the .git
history available alone introduces some non determinism.
Acceptance Criteria
Ideally, we have a mechanism where git describe
works and builds are entirely deterministic, but seeing as this is difficult to achieve and also that using git describe
is very popular, a less than perfect approach of generating a condensed history when staging git
sources will be acceptable as a first step, this approach is already prototyped at https://gitlab.com/BuildStream/buildstream/snippets/1731497.
If the implemented solution introduces non-determinism, it should be opt in with a new option on the git plugin
, at least until a better solution can be achieved.