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

Re-add Missing Error class #1312

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Re-add Missing Error class #1312

merged 2 commits into from
Jul 10, 2024

Conversation

shundhammer
Copy link
Contributor

@shundhammer shundhammer commented Jul 10, 2024

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1227580

Problem

yast2-services-manager fails to build in its unit tests with the latest systemd V256.

Cause

A very rare error condition was met, and it turned out that a refactoring in August 2018, 6 years ago (!), removed an error class; an error that was raised only once in all the YaST code, so the unit tests didn't cover it.

That happens when the systemctl get-default command fails.

The Change that Caused This

e4ab100#diff-8ddc7418f9da5ef96888a536c77c9e4c3330414a4b9a14f4ad95830dd00547ae

part of #799

Fix

This only fixes the unit tests failing because of the Ruby NameError: It adds the missing error class again. This does not fix the part that this problem appears in the first place: That the systemctl get-default command fails.

Is that an intentional and well-documented change in the systemd behavior? Probably not. So the unit tests may still fail, but now it will give a much clearer error that includes what the systemctl command complained about.

@coveralls
Copy link

Coverage Status

coverage: 41.889% (+0.002%) from 41.887%
when pulling 70c3bf9 on huha-sysctl-err
into b49143a on master.

@shundhammer shundhammer requested a review from dgdavid July 10, 2024 12:33
Copy link
Member

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks a lot!

@shundhammer shundhammer merged commit 92f192a into master Jul 10, 2024
12 checks passed
@shundhammer shundhammer deleted the huha-sysctl-err branch July 10, 2024 14:01
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #231 successfully finished
✔️ Created OBS submit request #1186617

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.

4 participants