Skip to content

Conversation

@richm
Copy link
Contributor

@richm richm commented Aug 28, 2025

This is mainly needed on el7 - NetworkManager is installed by default, or
somewhere else, on el8 and later.

Additionally, if the NetworkManager-server-config package is installed, then
the secondary interface will not be active, so ensure it is active.

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Ensure NetworkManager is installed, running, and at a sufficient version for the MAC address match tests and update test configurations accordingly

Tests:

  • Install NetworkManager, gather its version, and start its service in the MAC address match test playbook
  • Add a condition to require NetworkManager version >= 1.18.0 before running the MAC address match test
  • Update the minimum supported NetworkManager version to 1.18.0 in the provider tests configuration

@richm richm requested a review from liangwen12year as a code owner August 28, 2025 00:57
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 28, 2025

Reviewer's Guide

This PR explicitly installs and starts NetworkManager for the MAC address match test on EL7, captures its version to enforce a minimum version requirement (>=1.18.0), and updates the provider tests accordingly.

File-Level Changes

Change Details Files
Add installation and version detection of NetworkManager in test setup
  • Introduce a block to install NetworkManager when not on EL6
  • Collect package facts to retrieve installed versions
  • Set a fact 'networkmanager_version' from the fetched package info
tests/tests_mac_address_match_nm.yml
Guard playbook import with a minimum NetworkManager version check
  • Add a condition 'networkmanager_version is version("1.18.0", ">=")' to the import task
tests/tests_mac_address_match_nm.yml
Ensure NetworkManager service is running before tests
  • Add a service task to start NetworkManager at the beginning of the playbook
tests/playbooks/tests_mac_address_match.yml
Update minimum NetworkManager version requirement in provider tests
  • Set MINIMUM_VERSION to '1.18.0' for the MAC address match playbook in ensure_provider_tests.py
tests/ensure_provider_tests.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.25%. Comparing base (1b57520) to head (882ecfa).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #801      +/-   ##
==========================================
+ Coverage   43.11%   43.25%   +0.13%     
==========================================
  Files          12       12              
  Lines        3124     3121       -3     
==========================================
+ Hits         1347     1350       +3     
+ Misses       1777     1771       -6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@richm richm force-pushed the test-fix-mac-match-el7 branch from 5c73660 to 7aa9739 Compare August 28, 2025 01:02
@richm
Copy link
Contributor Author

richm commented Aug 28, 2025

[citest]

spetrosi
spetrosi previously approved these changes Aug 28, 2025
@richm
Copy link
Contributor Author

richm commented Aug 28, 2025

[citest]

1 similar comment
@richm
Copy link
Contributor Author

richm commented Aug 28, 2025

[citest]

This is mainly needed on el7 - NetworkManager is installed by default, or
somewhere else, on el8 and later.

Additionally, if the NetworkManager-server-config package is installed, then
the secondary interface will not be active, so ensure it is active.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm force-pushed the test-fix-mac-match-el7 branch from ef9cf3d to 882ecfa Compare August 28, 2025 17:35
@richm richm changed the title test: ensure NetworkManager is installed and running for mac match test test: ensure NetworkManager, ensure eth1 is active Aug 28, 2025
@richm
Copy link
Contributor Author

richm commented Aug 28, 2025

[citest]

@richm richm merged commit 942e01d into linux-system-roles:main Aug 29, 2025
49 of 50 checks passed
@richm richm deleted the test-fix-mac-match-el7 branch August 29, 2025 23:15
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