Skip to content

Don't fail when rpm is not installed#99

Merged
omajid merged 1 commit into
redhat-developer:mainfrom
omajid:alpine-no-rpm-crash
May 21, 2026
Merged

Don't fail when rpm is not installed#99
omajid merged 1 commit into
redhat-developer:mainfrom
omajid:alpine-no-rpm-crash

Conversation

@omajid
Copy link
Copy Markdown
Member

@omajid omajid commented May 19, 2026

In environments where rpm is not available, the
TestRunner.LogEnvironment method throws an exception:

Unhandled exception: System.ComponentModel.Win32Exception (2): An
error occurred trying to start process 'rpm' with working directory
'Samples'. No such file or directory

The code tries to handle these environments (like alpine), but doesn't catch the actual Win32Exception thrown when the rpm command is not found. It only catches InvalidOperationException (which happens when rpm command exits with an error).

@omajid omajid self-assigned this May 19, 2026
@omajid
Copy link
Copy Markdown
Member Author

omajid commented May 19, 2026

This fixes the root cause of the issue seen at redhat-developer/dotnet-regular-tests#412

cc @ayakael @nicrowe00

@omajid omajid force-pushed the alpine-no-rpm-crash branch 2 times, most recently from 66d5b61 to 150663a Compare May 19, 2026 21:52
@omajid omajid force-pushed the alpine-no-rpm-crash branch 7 times, most recently from 2eb5fc0 to f9c3baa Compare May 20, 2026 02:49
@omajid
Copy link
Copy Markdown
Member Author

omajid commented May 20, 2026

In environments where rpm is not available, the
TestRunner.LogEnvironment method throws an exception:

    Unhandled exception: System.ComponentModel.Win32Exception (2): An
    error occurred trying to start process 'rpm' with working directory
    'Samples'. No such file or directory

The code tries to handle these environments (like alpine), but doesn't
catch the actual Win32Exception thrown when the rpm command is not
found. It only catches InvalidOperationException (which happens when rpm
command exits with an error).

Also update CI to catch issues like this by adding an alpine leg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@omajid omajid force-pushed the alpine-no-rpm-crash branch from f9c3baa to 8a500d7 Compare May 20, 2026 03:47
@omajid omajid requested review from nicrowe00 and tmds May 20, 2026 13:20
@omajid
Copy link
Copy Markdown
Member Author

omajid commented May 20, 2026

cc @ayakael

@omajid omajid merged commit d6636da into redhat-developer:main May 21, 2026
111 of 120 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.

2 participants