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

linux/udev: fix udevadm info parser to not be fatal #132

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

raharper
Copy link
Collaborator

The current parser returns an error when it encounters newer prefix values in the output of udevadm info. Anytime a system upgrades to a newer release, there is a change new fields will be present preventing disko from producing any output.

  • Update and document prefixes defined in systemd v255
  • Replace error with an warning output

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (7c6624f) 65.78% compared to head (0ef4318) 65.38%.

Files Patch % Lines
linux/util.go 21.73% 17 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   65.78%   65.38%   -0.40%     
==========================================
  Files          17       17              
  Lines        2531     2551      +20     
==========================================
+ Hits         1665     1668       +3     
- Misses        667      683      +16     
- Partials      199      200       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@raharper raharper force-pushed the fix/linux-udevadm-parsing branch 2 times, most recently from 3c5810f to b0f7b9a Compare February 16, 2024 20:07
The current parser returns an error when it encounters newer prefix
values in the output of udevadm info.  Anytime a system upgrades to
a newer release, there is a change new fields will be present preventing
disko from producing any output.

- Update and document prefixes defined in systemd v255
- Replace error with an warning output
- make sure we have two tokens when parsing udevadm info output

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
@raharper raharper force-pushed the fix/linux-udevadm-parsing branch from b0f7b9a to 0ef4318 Compare February 16, 2024 21:36
@hallyn hallyn merged commit 7b7d307 into project-machine:main Feb 16, 2024
2 of 4 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.

3 participants