Repository navigation
Conversation
Contributor
|
We don't publish DEVs .whl. |
There was a problem hiding this comment.
Pull request overview
This PR improves robustness of FreeBSD pciconf interface parsing by handling cases where the optional regex device group is missing, and adds a unit test to validate the new behavior and expected debug logging.
Changes:
- Add safe handling for missing/empty
match.group("device")when buildingLinuxInterfaceInfoobjects in the FreeBSD adapter owner. - Emit a module-debug log when device data is missing for an interface.
- Add a unit test covering the missing-device-data scenario and asserting the debug log message.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
mfd_network_adapter/network_adapter_owner/freebsd.py |
Makes interface parsing resilient to missing device regex group and logs when device data is empty. |
tests/unit/test_mfd_network_adapter/test_network_adapter_owner/test_freebsd_network_owner.py |
Adds a unit test ensuring missing device data is handled and logged as expected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…face parsing Signed-off-by: Lasota, Adrian <adrian.lasota@intel.com>
mchromin
approved these changes
Jul 29, 2026
a-gorczew
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the robustness of interface parsing in the FreeBSD network adapter owner and adds a corresponding unit test to verify the new behavior. The main focus is on handling cases where device data is missing during interface information extraction.
Error handling improvements:
network_adapter_owner/freebsd.py: Adds a check for empty device data when parsing interface information, logging a debug message if device data is missing, and uses the safedevice_datavariable throughout instead of directly accessing the regex group. [1] [2]Testing enhancements:
test_network_adapter_owner/test_freebsd_network_owner.py: Introduces a new unit test,test__get_all_interfaces_info_empty_device_data, to verify that the code handles empty device data correctly and logs the expected debug message.