Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HelmRepository type switching from default to oci #1016

Merged
merged 2 commits into from
Feb 8, 2023

Commits on Feb 7, 2023

  1. Use condition checker with gomega WithT

    This allows using the condition checker as a test helper with proper
    test like assertion failure and stacktrace.
    
    Signed-off-by: Sunny <darkowlzz@protonmail.com>
    darkowlzz committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    75cde08 View commit details
    Browse the repository at this point in the history
  2. 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>
    darkowlzz committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    42bc3e8 View commit details
    Browse the repository at this point in the history