source-controller/controllers
Sunny 42bc3e8b0a helmrepo-oci: check before rec on type switching
When a HelmRepository with "default" spec.type is switched to "oci", the
existing HelmRepository is processed by HelmRepositoryReconciler by
running reconcileDelete() which removes all the previous status
information and allows the HelmRepositoryOCIReconciler to process the
object and add its own status data. But at times, when
HelmRepositoryOCIReconciler starts processing a HelmRepository with
stale status data from the client cache, it contains the stale
conditions that are owned only by HelmRepositoryReconciler and isn't
managed by HelmRepositoryOCIReconciler. This results in situations where
Ready is marked as True with the latest generation of the object and the
unmanaged stale conditions remain in the previous generation, resulting
in unexpected status conditions.

In the observed flaky tests,
`TestHelmRepositoryReconciler_ReconcileTypeUpdatePredicateFilter` would
fail because of stale ArtifactInStorage condition with previous
generation value.

This change adds a check in the HelmRepositoryOCIReconciler to start
processing the object only once the stale unmanaged conditions have been
removed.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-02-07 20:11:49 +05:30
..
testdata Add tests for reconcile delete 2022-08-02 13:11:08 +03:00
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 Update dependencies 2023-01-27 14:03:04 +02: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 Use condition checker with gomega WithT 2023-02-07 20:11:46 +05:30
common_test.go controllers: Allow deletion of suspended objects 2022-10-20 17:22:11 +05:30
gitrepository_controller.go Prevent panic when cloning empty git repository 2023-02-07 13:53:31 +01:00
gitrepository_controller_fuzz_test.go Set rate limiter option in test reconcilers 2023-01-18 16:10:30 +05:30
gitrepository_controller_test.go Use condition checker with gomega WithT 2023-02-07 20:11:46 +05:30
helmchart_controller.go Update dependencies 2023-01-27 14:03:04 +02:00
helmchart_controller_test.go Use condition checker with gomega WithT 2023-02-07 20:11:46 +05:30
helmrepository_controller.go Update dependencies 2023-01-27 14:03:04 +02:00
helmrepository_controller_oci.go helmrepo-oci: check before rec on type switching 2023-02-07 20:11:49 +05:30
helmrepository_controller_oci_test.go helmrepo-oci: check before rec on type switching 2023-02-07 20:11:49 +05:30
helmrepository_controller_test.go Use condition checker with gomega WithT 2023-02-07 20:11:46 +05:30
ocirepository_controller.go Update dependencies 2023-01-27 14:03:04 +02:00
ocirepository_controller_test.go Use condition checker with gomega WithT 2023-02-07 20:11:46 +05:30
source_predicate.go Switch to v1beta2 API package 2022-02-23 12:35:25 +01:00
storage.go storage: take lock files into consideration while garbage collecting 2022-12-20 16:28:34 +05:30
storage_test.go Use filepath instead of path in storage tests 2022-12-21 05:25:49 +05:30
suite_test.go Set rate limiter option in test reconcilers 2023-01-18 16:10:30 +05:30