Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uefi_helper_plugin.py: Log plugin load exception message at error level #561

Merged

Conversation

makubacki
Copy link
Member

@makubacki makubacki commented May 20, 2023

Logs the message at error level so it is more likely to be seen by the user in their console so they know what to do.

Before:

> stuart_update -c .\Platforms\QemuQ35Pkg\PlatformBuild.py TOOL_CHAIN_TAG=VS2022
SECTION - Init Self Describing Environment
SECTION - Loading Plugins
WARNING - Unable to register Supervisor Policy Maker
Traceback (most recent call last):
  ...
Exception: One or more helper plugins failed to load.

After:

> stuart_update -c .\Platforms\QemuQ35Pkg\PlatformBuild.py TOOL_CHAIN_TAG=VS2022
SECTION - Init Self Describing Environment
SECTION - Loading Plugins
WARNING - Unable to register Supervisor Policy Maker
ERROR - Function MakeSupervisorPolicy already registered from plugin file D:\src\mu_tiano_platforms\Features\MM_SUPV\MmSupervisorPkg\SupervisorPolicyTools\SupervisorPolicyMaker.py.  Can't register again from D:\src\mu_tiano_platforms\Features\MM_SUPV_Redundant\MmSupervisorPkg\SupervisorPolicyTools\SupervisorPolicyMaker.py
Traceback (most recent call last):
  ...
Exception: One or more helper plugins failed to load.

Logs the message at error level so it is more likely to be seen by
the user in their console so they know what to do.

Before:

```
> stuart_update -c .\Platforms\QemuQ35Pkg\PlatformBuild.py TOOL_CHAIN_TAG=VS2022
SECTION - Init Self Describing Environment
SECTION - Loading Plugins
WARNING - Unable to register Supervisor Policy Maker
Traceback (most recent call last):
  ...
Exception: One or more helper plugins failed to load.
```

After:

```
> stuart_update -c .\Platforms\QemuQ35Pkg\PlatformBuild.py TOOL_CHAIN_TAG=VS2022
SECTION - Init Self Describing Environment
SECTION - Loading Plugins
WARNING - Unable to register Supervisor Policy Maker
ERROR - Function MakeSupervisorPolicy already registered from plugin file D:\src\mu_tiano_platforms\Features\MM_SUPV\MmSupervisorPkg\SupervisorPolicyTools\SupervisorPolicyMaker.py.  Can't register again from D:\src\mu_tiano_platforms\Features\MM_SUPV_Redundant\MmSupervisorPkg\SupervisorPolicyTools\SupervisorPolicyMaker.py
```

Signed-off-by: Michael Kubacki <[email protected]>
@makubacki makubacki added the enhancement New feature or request label May 20, 2023
@makubacki makubacki requested a review from Javagedes May 20, 2023 00:09
@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Merging #561 (7972924) into master (681503b) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #561   +/-   ##
=======================================
  Coverage   78.49%   78.49%           
=======================================
  Files          47       47           
  Lines        4767     4767           
=======================================
  Hits         3742     3742           
  Misses       1025     1025           
Impacted Files Coverage Δ
...lext/environment/plugintypes/uefi_helper_plugin.py 50.00% <0.00%> (ø)

@Javagedes Javagedes added this to the 0.23.4 milestone May 22, 2023
@Javagedes Javagedes merged commit 6176a48 into tianocore:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants