Skip to content

Conversation

@makubacki
Copy link
Member

@makubacki makubacki commented Jan 13, 2026

Description

This is a minor issue that has been present in the script for a very long time.

The function calls self._ReadMessageEntry() to read the next message entry from the log file. That function can return None for the MessageEntry if it encounters an invalid signature.

This function needs to handle that case properly to avoid trying to access fields of a None object, which would lead to an AttributeError.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • Force self._ReadMessageEntry() to enter the case where it returns (None, None) and verify the AttributeError does not occur.

Integration Instructions

  • N/A

Note: I'd normally use f-strings here, but this follows the convention used in the rest of the file.

@makubacki makubacki requested review from apop5, kuqin12 and os-d January 13, 2026 18:18
@makubacki makubacki self-assigned this Jan 13, 2026
@makubacki makubacki added the type:bug Something isn't working label Jan 13, 2026
@mu-automation mu-automation bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Jan 13, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202502@23b7d05). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/202502    #813   +/-   ##
================================================
  Coverage                  ?   4.71%           
================================================
  Files                     ?      36           
  Lines                     ?    4196           
  Branches                  ?     276           
================================================
  Hits                      ?     198           
  Misses                    ?    3996           
  Partials                  ?       2           
Flag Coverage Δ
AdvLoggerPkg 4.71% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

The function calls `self._ReadMessageEntry()` to read
the next message entry from the log file. That function can return
`None` for the `MessageEntry` if it encounters an invalid signature.

This function needs to handle that case properly to avoid trying to
access fields of a `None` object, which would lead to an
`AttributeError`.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki force-pushed the adv_logger_decode_py_fix branch from 519bda8 to 327ff0c Compare January 13, 2026 19:24
@makubacki makubacki enabled auto-merge (squash) January 13, 2026 19:51
@makubacki makubacki merged commit f84d42d into microsoft:release/202502 Jan 13, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact language:python Pull requests that update Python code type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants