Skip to content

Conversation

@jcastill
Copy link
Member

Per the man pages:

'In other words, config files will override defaults, presets override config files, and command line values override presets and config files.'

This commit is an attempt t on ensure that the
any option in a preset has precedence/overrides
an existing option in the config file.

Related: RHEL-104463


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

@jcastill jcastill requested a review from pmoravec July 21, 2025 09:42
@jcastill
Copy link
Member Author

I'm checking the too-many-boolean-expressions linting error, will push a new change as soon as possible

@jcastill jcastill force-pushed the jcastillo-fix-preset-opts-precedence branch from df2eb03 to 15364ae Compare July 22, 2025 07:48
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-4087
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@jcastill jcastill force-pushed the jcastillo-fix-preset-opts-precedence branch from 15364ae to 10bc579 Compare October 1, 2025 07:47
jcastill added a commit to jcastill/sos that referenced this pull request Oct 1, 2025
The default value for networking.namespaces in the file
tests/report_tests/options_tests/options_tests_sos.conf
is 100, while the value for this variable in
tests/report_tests/options_tests/options_tests_preset.json
is 200. To make sure that preset beats the config file
we need to change the value from 100 to 200.

Related: sosreport#4087

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
@jcastill
Copy link
Member Author

jcastill commented Oct 1, 2025

centos-stream-9 failure probably fixed via #4139

@pmoravec
Copy link
Contributor

pmoravec commented Oct 3, 2025

centos-stream-9 failure probably fixed via #4139

Good catch - could you pls. rebase this PR to main if it really makes the test green?

@jcastill jcastill force-pushed the jcastillo-fix-preset-opts-precedence branch from 10bc579 to 4aaf65f Compare October 3, 2025 14:51
@jcastill
Copy link
Member Author

jcastill commented Oct 3, 2025

Done

Copy link
Contributor

@pmoravec pmoravec left a comment

Choose a reason for hiding this comment

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

Sounds good to me up to the comment of the new option.

Per the man pages:

'In other words, config files will override defaults,
presets override config files, and command line values
override presets and config files.'

This commit is an attempt to ensure that
any option in a preset has precedence/overrides
an existing option in the config file.

Related: RHEL-104463

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
@jcastill jcastill force-pushed the jcastillo-fix-preset-opts-precedence branch from 4aaf65f to 535d6c3 Compare October 6, 2025 07:35
@pmoravec pmoravec added Reviewed/Needs 2nd Ack Require a 2nd ack from a maintainer Status/Needs Review This issue still needs a review from project members Kind/Bug Something is not working, and this fixes the issue labels Oct 22, 2025
dwolstroRH pushed a commit to dwolstroRH/sos that referenced this pull request Nov 5, 2025
The default value for networking.namespaces in the file
tests/report_tests/options_tests/options_tests_sos.conf
is 100, while the value for this variable in
tests/report_tests/options_tests/options_tests_preset.json
is 200. To make sure that preset beats the config file
we need to change the value from 100 to 200.

Related: sosreport#4087

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
@TurboTurtle TurboTurtle added Reviewed/Ready for Merge Has been reviewed, ready for merge and removed Reviewed/Needs 2nd Ack Require a 2nd ack from a maintainer Status/Needs Review This issue still needs a review from project members labels Nov 21, 2025
@TurboTurtle TurboTurtle merged commit bd3fdde into sosreport:main Nov 21, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind/Bug Something is not working, and this fixes the issue Reviewed/Ready for Merge Has been reviewed, ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants