oamg / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.
Apache License 2.0
48 stars 144 forks source link

Fix incorrect lscpu parsing #1184

Closed dkubek closed 5 months ago

dkubek commented 6 months ago

Original solution expected always key: val pair on each line. However, it has not been expected that val could be actually empty string. Hence the following snippet:

NUMA node1 CPU(s):   
Flags:               fpu vme de pse tsc msr pae mce cx8 ...

has been parsed as:

{
  'NUMA node1 CPU(s)':   'Flags:               fpu vme de pse tsc msr pae mce cx8 ...'
}

instead of:

{
  'NUMA node1 CPU(s)': '',
  'Flags': 'fpu vme de pse tsc msr pae mce cx8 ...'
}

The new solution updates the parsing for output on RHEL 7, but also calls newly lscpu -J on RHEL 8+ to obtain data in the JSON format, which drops all possible parsing problems from our side.

Fixes #1182

github-actions[bot] commented 6 months ago

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable. If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp from PR#42, use /packit test oamg/leapp#42

It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones. To launch on-demand tests with packit:

[Deprecated] To launch on-demand regression testing public members of oamg organization can leave the following comment:

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra.

fernflower commented 6 months ago

To make codespell happy we'd need to exclude the test files with --exclude-file option https://github.com/oamg/leapp-repository/blob/master/.github/workflows/codespell.yml#L30

pirat89 commented 6 months ago

@dkubek update please also commit msg so it reflects all changes and problem description. I've updated the description of the PR already.

Also please rebase againt up-to-date master to fix some of crashing tests.