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

[Backport 2024.2] fix(sct_config): str_or_list_or_eval to better return empty values #9539

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 11, 2024

in case we got empty envirment variable for on of the config option using str_or_list_or_eval, we end up with [''] which maps to True (python truthiness)

in turn it did break azure cleanup logic when SCT_AZURE_REGION_NAME= was passed empty, and the cleanup didn't found any resources groups to clean.

Testing

  • [ ]

PR pre-checks (self review)

  • I added the relevant backport labels
  • I didn't leave commented-out/debugging code

Reminders

  • Add New configuration option and document them (in sdcm/sct_config.py)
  • Add unit tests to cover my changes (under unit-test/ folder)
  • Update the Readme/doc folder relevant to this change (if needed)

(cherry picked from commit e680e5f)

Parent PR: #9537

in case we got empty envirment variable for on of the config option
using `str_or_list_or_eval`, we end up with `['']` which maps to
True (python truthiness)

in turn it did break azure cleanup logic when `SCT_AZURE_REGION_NAME=`
was passed empty, and the cleanup didn't found any resources groups
to clean.

(cherry picked from commit e680e5f)
@mergify mergify bot assigned fruch Dec 11, 2024
@fruch fruch merged commit 60ac589 into branch-2024.2 Dec 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant