Comment 5 for bug 1991115

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

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

commit 78040d2017c1edcf9f173af3e408499b23913529
Author: Thales Elero Cervi <email address hidden>
Date: Wed Sep 28 14:49:07 2022 -0300

    Add type checks to AppImageParser

    Recent changes [1] to AppImageParser _find_images_in_dict and
    generate_download_images_list methods made this code to break with both
    AttributeError and TypeError when stx-openstack application is being
    uploaded.

    This change includes extra protection against these types of errors and
    restablish the flow for generating stx-openstack image list based on its
    overrides.

    It also adds a new image resource to TestKubeAppImageParser unit tests,
    using an Openstack resource extracted from when debugging the original
    error. It should prevent this issue to happen again for future changes
    at AppImageParser logic.
    The original change to generate_download_images_list, for example, would
    fail the test:
        * TestKubeAppImageParser.test_generate_download_images_list

    [1] https://review.opendev.org/c/starlingx/config/+/858762

    Test Plan:
    PASS - Locally execute unit tests: TestKubeAppImageParser
    PASS - Build the sysinv package with this change
    PASS - Upload stx-openstack app
    PASS - Apply stx-openstack app

    Closes-Bug: 1991115

    Signed-off-by: Thales Elero Cervi <email address hidden>
    Change-Id: I8a1384bfefd12f8a893249853cbeae3a9d3661e0