Comment 1 for bug 2055697

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/910680
Committed: https://opendev.org/starlingx/config/commit/c9b71ebd65c698ff8fa6fb28b477a84c823b8203
Submitter: "Zuul (22348)"
Branch: master

commit c9b71ebd65c698ff8fa6fb28b477a84c823b8203
Author: David Bastos <email address hidden>
Date: Thu Feb 29 21:42:30 2024 -0300

    Fix delete process to apps that have charts disabled

    When deleting an application that has one chart or more disabled,
    the app framework was not able to correctly delete the disabled
    charts from the helm repository.

    If, after deleting an app, an attempt was made to upload that same
    app, a failure would occur, informing that the charts were already
    in the helm repository.

    The correction consists of using the kustomization-orig.yaml file
    instead of kustomization.yaml in the deletion process to list the
    enabled and disabled charts.

    Another fix was made in case an application has the status of
    "upload failed" and an attempt is made to delete another app. This
    caused a Python runtime error because the get_chart_tarball_path
    function tried to access the dictionary key and it wasn't there.

    The solution was to check if the key for that chart exists and only
    then try to access it. New logs are added to alert the user if the
    chart does not exist.

    Test Plan:
    PASS: Build-pkgs
    PASS: Upload, apply, remove and delete dell-storage
    PASS: Upload, apply, remove and delete oidc-auth-apps
    PASS: upload, apply, remove and delete metrics-server
    PASS: Deletes app that has charts disabled and all charts are
          deleted from the helm repository correctly.
    PASS: After deleting and trying to upload the same app, no error
          occurs and the upload and apply process is completed
          successfully.
    PASS: Deleting an app with another app with "upload failed"
          status and no Python runtime error occurs

    Closes-Bug: 2055697

    Change-Id: I22de414e8780fe3691d06bdd015e4c927dcc10f0
    Signed-off-by: David Bastos <email address hidden>