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

don't fail loading troubleshoot kinds if directory doesn't exist #4212

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

cbodonnell
Copy link
Contributor

@cbodonnell cbodonnell commented Dec 11, 2023

What this PR does / why we need it:

This PR modifies the LoadTSKindsFromPath function so that it will not fail if the path does not exist, but will instead return an empty TroubleshootKinds. This fixes an issue where re-running preflights for a sequence created on a KOTS version prior to 1.96.0 would hang indefinitely and log the error:

{"level":"error","ts":"2023-12-12T14:30:15Z","msg":"failed to run preflights: failed to load troubleshoot kinds from path: /tmp/kotsadm3762812014/rendered: failed to walk dir: /tmp/kotsadm3762812014/rendered: failed to walk dir: /tmp/kotsadm3762812014/rendered: lstat /tmp/kotsadm3762812014/rendered: no such file or directory"}

Which issue(s) this PR fixes:

https://app.shortcut.com/replicated/story/94221/re-running-preflights-for-versions-created-by-older-versions-of-kots-fails

Special notes for your reviewer:

Steps to reproduce

Does this PR introduce a user-facing change?

Fixes an issue where re-running preflights for sequences created by KOTS versions prior to 1.96.0 could hang indefinitely.

Does this PR require documentation?

NONE

@cbodonnell cbodonnell added type::bug Something isn't working bug::regression labels Dec 11, 2023
@cbodonnell cbodonnell marked this pull request as ready for review December 12, 2023 14:09
@cbodonnell cbodonnell requested a review from sgalsaleh December 12, 2023 14:43
@cbodonnell cbodonnell merged commit cf17c12 into main Dec 12, 2023
164 checks passed
@cbodonnell cbodonnell deleted the cbo/sc-94221/fix-re-running-old-preflights branch December 12, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::regression type::bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants