source-controller/pkg/git
Sunny 581695b4d6
gitrepo: Intro contentConfigChecksum & improvement
Introduce contentConfigChecksum in the GitRepository.Status to track the
configurations that affect the content of the artifact. It is used to
detect a change in the configuration that requires rebuilding the whole
artifact. This helps skip the reconciliation early when we find out that
the remote repository has not changed.

Moves fetching the included repositories in reconcileSource() to collect
enough information in reconcileSource() to be able to decide if the full
reconciliation can be skipped. This results in reconcileInclude() to
just copy artifact to the source build directory.

Introduce a gitCheckout() method to perform construction of all the git
checkout options and perform the checkout operation. This helps to
easily perform checkout multiple times when we need it in
reconcileSource(). When we check with the remote repository if there's
an update, and find out that there's no update, we check if any other
configurations that affect the source content has changed, like
includes, ignore rules, etc. If there's a change, we need to perform a
full checkout of the remote repository in order to fetch the complete
source. The git checkout no-op optimization is enabled in this method
based on the presence of an artifact in the storage.

The failure notification handler is modifed to handle the recovery of a
no-op reconcile failure and create a notification message accordingly
with the partial commit.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-20 19:52:18 +05:30
..
gogit pkg/git: introduce concrete and partial commit 2022-05-20 19:52:18 +05:30
libgit2 pkg/git: introduce concrete and partial commit 2022-05-20 19:52:18 +05:30
strategy libgit2: Add support for hashed known_hosts 2022-05-16 16:57:22 +01:00
testdata/git/repo tests: algorithms test coverage for go-git and libgit2 2022-05-09 13:31:54 +01:00
git.go gitrepo: Intro contentConfigChecksum & improvement 2022-05-20 19:52:18 +05:30
git_test.go pkg/git: introduce concrete and partial commit 2022-05-20 19:52:18 +05:30
options.go pkg/git: introduce concrete and partial commit 2022-05-20 19:52:18 +05:30
options_test.go Add Host field check in AuthOptions.Validate() 2021-10-27 00:43:31 +05:30