FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: handle missing 'module'/'class' keys in custom plugin config by sentry[bot] · Pull Request #770 · codecov/codecov-cli · GitHub

fix: handle missing 'module'/'class' keys in custom plugin config - #770

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/plugin-keyerror
Open

fix: handle missing 'module'/'class' keys in custom plugin config#770
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/plugin-keyerror

Conversation

sentry Bot commented Aug 22, 2026

Copy link
Copy Markdown

This PR addresses a KeyError: 'module' that occurred when a custom plugin was defined in codecov.yml without specifying the module or class keys. Previously, _load_plugin_from_yaml would directly subscript plugin_dict['module'] and plugin_dict['class'], leading to an unhandled KeyError if these keys were absent.

The fix adds an early validation check within _load_plugin_from_yaml. It now verifies the presence of both module and class keys. If either is missing, it logs an informative error message using click.secho and gracefully returns a NoopPlugin(), preventing the CLI from crashing. This approach is consistent with the existing error handling patterns within the function for other plugin loading issues.

Fixes CLI-BX

This PR was automatically generated by Sentry. You can adjust this setting at any time.

codecov Bot commented Aug 22, 2026
edited
Loading

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
723 1 722 1
View the full list of 1 ❄️ flaky test(s)
api.temp.calculator.test_calculator::test_divide

Flake rate in main: 100.00% (Passed 0 times, Failed 1726 times)

Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants


Back | FazBrowse Home | New Git URL