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

fix: issue where plugin config loading error was not shown #2150

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

antazoey
Copy link
Member

What I did

I had my config set up with some environment variables that did not exist, and i noticed that instead of Ape crashing where it was supposed to, my error s were dropped and the configs were turned to regular PluginConfig and i got attribute errors within the plugin instead, kinda weird...

How I did it

Removed duplicate get_config method that hid the errors for no reason.
instead, let ConfigManager run ApeConfig.get_config and the error shows up correctly.

How to verify it

foundry:
  fork:
    shibarium:
      mainnet:
        block_number: {asdf}

try to use foundry

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@@ -106,22 +104,6 @@ def extract_config(cls, manifest: PackageManifest, **overrides) -> ApeConfig:
"""
return ApeConfig.from_manifest(manifest, **overrides)

def get_config(self, plugin_name: str) -> PluginConfig:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug was fixed by deleting this method.
get_config still exists on ApeConfig class, and thus is still available here, only without swallowing every single error

@antazoey antazoey enabled auto-merge (squash) June 17, 2024 21:44
@antazoey antazoey merged commit 5e5649a into ApeWorX:main Jun 17, 2024
15 checks passed
@antazoey antazoey deleted the fix/plugin-cfg-attr-err branch June 17, 2024 22:55
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.

2 participants