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

Allow plugins without installation procedures #589

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

theboringstuff
Copy link
Collaborator

@theboringstuff theboringstuff commented Jan 23, 2024

Description

Plugins which do not have installation.procedures cause upgrade failures

File "/usr/local/lib/python3.12/site-packages/kubemarine/thirdparties.py", line 418, in <genexpr>
     for plugin_procedure in plugin_configs['installation']['procedures']
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
 KeyError: 'procedures'

Solution

Set keys installation and installation.procedures as optional, allowing empty values.

Test Cases

TestCase 1

Steps:

  1. Add a custom plugins which does not have installation.procedures sections, run upgrade

Results:

Before After
Upgrade fails on thirdparties Upgrade continues

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

@koryaga koryaga self-assigned this Jan 23, 2024
@koryaga koryaga requested a review from ilia1243 January 23, 2024 14:25
@koryaga koryaga added the improvement New feature or request label Jan 23, 2024
@ilia1243 ilia1243 self-requested a review January 23, 2024 14:28
@koryaga koryaga merged commit fb1adfc into main Jan 24, 2024
37 checks passed
@theboringstuff theboringstuff deleted the fix/allow-no-install-plugins branch March 27, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants