source-controller/controllers
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
..
testdata test: source ignore for subdirectories in a repo 2022-03-23 17:17:06 +05:30
artifact.go Introduce `artifactSet` to replace `hasArtifactUpdated` 2022-02-23 12:35:30 +01:00
artifact_matchers_test.go Implement Size field on archived artifacts 2022-02-28 16:01:34 +01:00
artifact_test.go Introduce `artifactSet` to replace `hasArtifactUpdated` 2022-02-23 12:35:30 +01:00
bucket_controller.go Add flags to configure exponential back-off retry 2022-04-12 10:44:46 +01:00
bucket_controller_fetch_test.go test: use `T.TempDir` to create temporary test directory 2022-04-29 23:01:39 +08:00
bucket_controller_test.go test: use `T.TempDir` to create temporary test directory 2022-04-29 23:01:39 +08:00
gitrepository_controller.go gitrepo: Intro contentConfigChecksum & improvement 2022-05-20 19:52:18 +05:30
gitrepository_controller_test.go gitrepo: Intro contentConfigChecksum & improvement 2022-05-20 19:52:18 +05:30
helmchart_controller.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
helmchart_controller_test.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
helmrepository_controller.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
helmrepository_controller_oci.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
helmrepository_controller_oci_test.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
helmrepository_controller_test.go [RFC 0002] Flux OCI support for Helm (#690) 2022-05-19 14:50:16 +02:00
source_predicate.go Switch to v1beta2 API package 2022-02-23 12:35:25 +01:00
storage.go Reduce file permission 2022-04-13 17:14:45 +02:00
storage_test.go test: use `T.TempDir` to create temporary test directory 2022-04-29 23:01:39 +08:00
suite_test.go gitrepo: Enable default feature gates in tests 2022-05-20 19:52:18 +05:30