Refactor of the dimm collector - #288
Merged
Merged
Conversation
graepaul
commented
Sep 21, 2026
amd-ansonyim
requested changes
Sep 22, 2026
amd-ansonyim
left a comment
Collaborator
There was a problem hiding this comment.
Lgtm, just one thing
|
|
||
| return self._parse_wmic_csv(res.stdout) | ||
|
|
||
| def _log_cmd_error(self, res: CommandArtifact) -> None: |
Collaborator
There was a problem hiding this comment.
res is called but not used. Do we need to add that to the log_event? Right now I think end user will just see "Error checking dimms" with no further context
Collaborator
Author
There was a problem hiding this comment.
Now it uses it see code snippet:
def _log_cmd_error(self, res: CommandArtifact) -> None:
"""Log a failed memory query without aborting the rest of the collection.
Args:
res (CommandArtifact): result of the failed command.
"""
self._log_event(
category=EventCategory.OS,
description="Error checking dimms",
priority=EventPriority.ERROR,
data=res.model_dump(include={"command", "stderr", "exit_code"}),
console_log=True,
)
alexandraBara
requested changes
Sep 24, 2026
…e file since there was a typo
alexandraBara
requested changes
Sep 29, 2026
alexandraBara
left a comment
Collaborator
There was a problem hiding this comment.
@graepaul updates look good, but utest needs to be updated
Collaborator
Author
|
I renamed the fixture name in the unit test and it passes now. |
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.
Summary
Here is what a dimm looks like
{ "dimms": [ { "size_bytes": 103079215104, "locator": "CPU0_A", "bank_locator": "_Node0_Channel0_Dimm0", "manufacturer": "Samsung", "part_number": "M321RYGA0PB0-CWMXJ", "serial_number": "1234-567889AB", "memory_type": "DDR5", "form_factor": "DIMM", "speed_mts": 5600, "configured_speed_mts": 5600, "rank": 2, "data_width_bits": 64, "total_width_bits": 80, "size": "96GB" }, ...Test plan
pytest test/unit- Improved unit-tests which now runs against a large fixtures file validating functionality.pytest test/functional(if applicable) - N/Apre-commit run --all-filesChecklist